[Pkg-cyrus-sasl2-commits] [cyrus-sasl2] 01/44: Imported Upstream version 69-g4c8e3f2

Ondřej Surý ondrej at debian.org
Sat Dec 31 13:07:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

ondrej pushed a commit to branch master
in repository cyrus-sasl2.

commit 3fd959d37b6751b330a4c148ac6893bfd0b49c6b
Author: Ondřej Surý <ondrej at sury.org>
Date:   Fri Jul 1 09:21:10 2016 +0200

    Imported Upstream version 69-g4c8e3f2
---
 .gitignore                                         |    13 +
 .indent.pro                                        |     1 +
 AUTHORS                                            |    12 +-
 ChangeLog                                          |     4 +-
 INSTALL                                            |   302 -
 Makefile.am                                        |     3 +-
 Makefile.in                                        |   918 -
 README.GS2                                         |     3 +
 README.andrew                                      |   130 +
 README.ldapdb                                      |    53 +
 README.rpm                                         |     6 +
 aclocal.m4                                         |   977 -
 autogen.sh                                         |    37 +
 cmulocal/COPYING                                   |    39 -
 cmulocal/README.andrew                             |    71 -
 cmulocal/afs.m4                                    |   314 -
 cmulocal/agentx.m4                                 |    46 -
 cmulocal/arx.m4                                    |   155 -
 cmulocal/ax_path_bdb.m4                            |   566 -
 cmulocal/c-fpic.m4                                 |    35 -
 cmulocal/clamav.m4                                 |    35 -
 cmulocal/com_err.m4                                |    28 -
 cmulocal/com_err_link.m4                           |   157 -
 cmulocal/db.m4                                     |    46 -
 cmulocal/find-func-no-libs.m4                      |     9 -
 cmulocal/find-func-no-libs2.m4                     |    61 -
 cmulocal/find-func.m4                              |     9 -
 cmulocal/heimdal.m4                                |   197 -
 cmulocal/init_automake.m4                          |     8 -
 cmulocal/kafs.m4                                   |   167 -
 cmulocal/kerberos_v4.m4                            |   285 -
 cmulocal/kerberos_v5.m4                            |   185 -
 cmulocal/libXau.m4                                 |   147 -
 cmulocal/libcyrus.m4                               |   155 -
 cmulocal/libloguse.m4                              |   103 -
 cmulocal/libnet.m4                                 |   192 -
 cmulocal/libpcap.m4                                |   142 -
 cmulocal/librestrict.m4                            |   102 -
 cmulocal/libssl.m4                                 |   153 -
 cmulocal/libtoolhack.m4                            |    33 -
 cmulocal/libwrap.m4                                |    30 -
 cmulocal/mips-abi.m4                               |    93 -
 cmulocal/nadine.m4                                 |   164 -
 cmulocal/nana.m4                                   |    27 -
 cmulocal/opendkim.m4                               |    71 -
 cmulocal/pthreads.m4                               |    23 -
 cmulocal/sasl.m4                                   |    94 -
 cmulocal/sql.m4                                    |   221 -
 cmulocal/tcl.m4                                    |   160 -
 cmulocal/telnet.m4                                 |   180 -
 cmulocal/ucdsnmp.m4                                |    72 -
 cmulocal/util.m4                                   |    73 -
 cmulocal/zephyr.m4                                 |   155 -
 cmulocal/zlib.m4                                   |    39 -
 config.h.in                                        |   622 -
 config/.gitignore                                  |     4 +
 config/config.guess                                |  1516 --
 config/config.sub                                  |  1764 --
 config/depcomp                                     |   423 -
 config/install-sh                                  |   276 -
 config/kerberos_v4.m4                              |   153 -
 config/libtool.m4                                  |   430 -
 config/ltconfig                                    |  3150 ---
 config/ltmain.sh                                   |  4059 ----
 config/missing                                     |   336 -
 config/mkinstalldirs                               |   111 -
 configure                                          | 20241 -------------------
 configure.in => configure.ac                       |   202 +-
 contrib/README                                     |     5 +
 contrib/change-sasldb2-realm.py                    |    65 +
 contrib/cyrus-sasl-1.5.24-ltdl.patches             |   340 +
 contrib/cyrus-sasl-2.1-upgrade.h                   |   254 +
 contrib/cyrus-sasl-libltdl                         |    69 +
 contrib/pwcheck-pam.patch                          |   317 +
 contrib/saslauthd-unix.pl                          |    63 +
 contrib/securid.patches                            |   151 +
 contrib/stripplus_canonuser.patch                  |   315 +
 contrib/tclsasl/README                             |     7 +
 contrib/tclsasl/doc/tclsasl.html                   |  1576 ++
 contrib/tclsasl/doc/tclsasl.xml                    |  1003 +
 {sasldb => contrib/tclsasl/tcl}/Makefile.am        |    43 +-
 contrib/tclsasl/tcl/tclsasl.c                      |  3011 +++
 contrib/tclsasl/tcl/test.tcl                       |   580 +
 contrib/tclsasl/tclsasl.patch                      |   265 +
 dlcompat-20010505/APPLE_LICENSE                    |   372 +
 dlcompat-20010505/ChangeLog                        |    20 +
 dlcompat-20010505/Makefile                         |    63 +
 dlcompat-20010505/README                           |    71 +
 dlcompat-20010505/dlfcn.h                          |    57 +
 dlcompat-20010505/dlopen.c                         |   516 +
 doc/Makefile.in                                    |   496 -
 doc/draft-burdis-cat-srp-sasl-xx.txt               |  2858 +++
 doc/draft-ietf-sasl-anon-xx.txt                    |   507 +
 doc/draft-ietf-sasl-crammd5-xx.txt                 |   434 +
 doc/draft-ietf-sasl-gssapi-xx.txt                  |   841 +
 doc/draft-ietf-sasl-plain-xx.txt                   |   507 +
 doc/draft-ietf-sasl-rfc2222bis-xx.txt              |  1320 ++
 doc/draft-ietf-sasl-rfc2831bis-xx.txt              |  2340 +++
 doc/draft-ietf-sasl-saslprep-xx.txt                |   339 +
 doc/draft-murchison-sasl-login-xx.txt              |   396 +
 doc/draft-newman-sasl-c-api-xx.txt                 |  1681 ++
 doc/draft-newman-sasl-passdss-xx.txt               |  1122 +
 doc/options.html                                   |    26 +
 doc/os390.html                                     |    56 +
 doc/rfc1321.txt                                    |  1179 ++
 doc/rfc1939.txt                                    |  1291 ++
 doc/rfc2104.txt                                    |   619 +
 doc/rfc2195.txt                                    |   283 +
 doc/rfc2222.txt                                    |   899 +
 doc/rfc2243.txt                                    |   563 +
 doc/rfc2245.txt                                    |   283 +
 doc/rfc2289.txt                                    |  1403 ++
 doc/rfc2444.txt                                    |   395 +
 doc/rfc2595.txt                                    |   843 +
 doc/rfc2831.txt                                    |  1515 ++
 doc/rfc2945.txt                                    |   451 +
 doc/rfc3174.txt                                    |  1235 ++
 include/.gitignore                                 |     8 +
 include/Makefile.am                                |    15 +-
 include/Makefile.in                                |   653 -
 include/md5global.h                                |    38 -
 include/sasl.h                                     |     5 +
 java/CyrusSasl/Makefile.am                         |     2 +-
 java/CyrusSasl/Makefile.in                         |   665 -
 java/CyrusSasl/javasasl.h                          |   324 -
 java/Makefile.in                                   |   635 -
 java/Test/Makefile.in                              |   434 -
 java/doc/draft-weltman-java-sasl-02.txt            |  1444 ++
 java/javax/Makefile.in                             |   650 -
 java/javax/security/Makefile.in                    |   650 -
 java/javax/security/auth/Makefile.in               |   650 -
 java/javax/security/auth/callback/Makefile.in      |   496 -
 lib/.gitignore                                     |     6 +
 lib/Makefile.am                                    |    22 +-
 lib/Makefile.in                                    |   705 -
 lib/checkpw.c                                      |    16 +-
 lib/client.c                                       |    19 +-
 lib/common.c                                       |    13 +-
 lib/config.c                                       |     4 +-
 lib/saslutil.c                                     |     4 +-
 lib/server.c                                       |     2 +-
 libsasl2.pc.in                                     |     6 +-
 m4/ax_prog_cc_for_build.m4                         |   125 +
 {cmulocal => m4}/berkdb.m4                         |     0
 {cmulocal => m4}/bsd_sockets.m4                    |    22 +-
 {cmulocal => m4}/c-attribute.m4                    |     9 +-
 {cmulocal => m4}/common.m4                         |     2 -
 {cmulocal => m4}/cyrus.m4                          |     1 -
 {cmulocal => m4}/ipv6.m4                           |     0
 {saslauthd/config => m4}/kerberos_v4.m4            |     8 +-
 {cmulocal => m4}/openldap.m4                       |     1 -
 {cmulocal => m4}/openssl.m4                        |     4 +-
 {config => m4}/plain.m4                            |     0
 {cmulocal => m4}/sasl2.m4                          |    27 +-
 {config => m4}/sasldb.m4                           |    21 +-
 .../TicketKeeper/TicketKeeperMenuStateProtocol.h   |     1 +
 man/Makefile.in                                    |   547 -
 plugins/.gitignore                                 |     6 +
 plugins/Makefile.am                                |    34 +-
 plugins/Makefile.in                                |   818 -
 plugins/NTMakefile                                 |    21 +-
 plugins/anonymous_init.c                           |    43 -
 plugins/crammd5_init.c                             |    43 -
 plugins/digestmd5.c                                |    39 +-
 plugins/digestmd5_init.c                           |    43 -
 plugins/gs2.c                                      |     2 +-
 plugins/gs2_init.c                                 |    43 -
 plugins/gssapi.c                                   |   273 +-
 plugins/gssapiv2_init.c                            |    43 -
 plugins/kerberos4_init.c                           |    43 -
 plugins/ldapdb.c                                   |     1 +
 plugins/ldapdb_init.c                              |    39 -
 plugins/login_init.c                               |    43 -
 plugins/ntlm.c                                     |   115 +-
 plugins/ntlm_init.c                                |    43 -
 plugins/otp.c                                      |   152 +-
 plugins/otp_init.c                                 |    43 -
 plugins/passdss_init.c                             |    43 -
 plugins/plain_init.c                               |    43 -
 plugins/plugin_common.c                            |    10 +-
 plugins/sasldb.c                                   |     2 +-
 plugins/sasldb_init.c                              |    38 -
 plugins/scram.c                                    |    61 +-
 plugins/scram_init.c                               |    43 -
 plugins/securid.c                                  |   916 +
 plugins/sql.c                                      |   102 +-
 plugins/sql_init.c                                 |    38 -
 plugins/srp_init.c                                 |    43 -
 pwcheck/Makefile.am                                |     2 +-
 pwcheck/Makefile.in                                |   591 -
 pwcheck/pwcheck_getpwnam.c                         |     3 +-
 pwcheck/pwcheck_getspnam.c                         |     4 +-
 sample/Makefile.am                                 |     3 +-
 sample/Makefile.in                                 |   607 -
 sample/client.c                                    |    14 +-
 sample/server.c                                    |    20 +-
 saslauthd/.gitignore                               |    11 +
 saslauthd/AUTHORS                                  |    23 -
 saslauthd/INSTALL                                  |     3 -
 saslauthd/Makefile.am                              |    13 +-
 saslauthd/Makefile.in                              |   729 -
 saslauthd/NEWS                                     |     3 -
 saslauthd/README                                   |     4 -
 saslauthd/README.cache                             |   252 +
 saslauthd/README.ipc                               |    84 +
 saslauthd/aclocal.m4                               |   962 -
 saslauthd/auth_getpwent.c                          |     5 +-
 saslauthd/auth_httpform.c                          |    59 +-
 saslauthd/auth_krb5.c                              |    25 +-
 saslauthd/auth_ldap.c                              |     6 -
 saslauthd/auth_rimap.c                             |    14 +-
 saslauthd/auth_shadow.c                            |    17 +-
 saslauthd/cache.c                                  |     2 +-
 saslauthd/cache.h                                  |     2 +-
 saslauthd/cfile.c                                  |     1 -
 saslauthd/config/config.guess                      |  1516 --
 saslauthd/config/config.sub                        |  1764 --
 saslauthd/config/depcomp                           |   423 -
 saslauthd/config/install-sh                        |   276 -
 saslauthd/config/libtool.m4                        |   430 -
 saslauthd/config/ltconfig                          |  3150 ---
 saslauthd/config/ltmain.sh                         |  4053 ----
 saslauthd/config/missing                           |   336 -
 saslauthd/config/mkinstalldirs                     |   111 -
 saslauthd/config/plain.m4                          |    32 -
 saslauthd/config/sasldb.m4                         |   156 -
 saslauthd/configure                                | 15983 ---------------
 saslauthd/configure.in                             |   340 -
 saslauthd/ipc_unix.c                               |     2 +-
 saslauthd/krbtf.c                                  |     3 +-
 saslauthd/lak.c                                    |    11 +-
 saslauthd/mechanisms.h                             |     2 +-
 saslauthd/saslauthd-main.c                         |     2 -
 saslauthd/saslauthd-main.h                         |     3 +-
 saslauthd/saslauthd.8                              |   191 -
 saslauthd/saslauthd.h.in                           |   343 -
 saslauthd/testsaslauthd.8                          |    16 +
 saslauthd/testsaslauthd.c                          |    10 +-
 saslauthd/utils.h                                  |     3 +-
 sasldb/.gitignore                                  |     6 +
 sasldb/Makefile.am                                 |    17 +-
 sasldb/Makefile.in                                 |   599 -
 sasldb/db_lmdb.c                                   |   498 +
 sasldb/sasldb.h                                    |    10 +-
 utils/.gitignore                                   |    14 +
 utils/Makefile.am                                  |     2 +-
 utils/Makefile.in                                  |   859 -
 utils/dbconverter-2.c                              |     2 +-
 utils/pluginviewer.c                               |    10 +-
 utils/sasldbconverter2.8                           |    61 +
 utils/sasldblistusers.c                            |     4 +
 utils/saslpasswd.c                                 |     5 +-
 utils/sasltestsuite.8                              |    22 +
 win32/common.mak                                   |    16 +-
 win32/include/config.h                             |     2 +-
 255 files changed, 37209 insertions(+), 82626 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0a0a1cb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+autom4te*.cache
+stamp-h.in
+config.h.in*
+Makefile.in
+aclocal.m4
+configure
+config.log
+config.h
+config.cache
+libtool
+config.status
+stamp-h1
+Makefile
diff --git a/.indent.pro b/.indent.pro
new file mode 100644
index 0000000..56726b4
--- /dev/null
+++ b/.indent.pro
@@ -0,0 +1 @@
+-i2 -cli0 -bl -nce
diff --git a/AUTHORS b/AUTHORS
index 437a27e..aaff307 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -45,4 +45,14 @@ getaddrinfo.c was written by Hajimu UMEMOTO <ume at mahoroba.org>
 which is based on the IPv6 code written by KIKUCHI Takahiro
 <kick at kyoto.wide.ad.jp>
 
-$Id: AUTHORS,v 1.18 2006/12/01 17:34:58 mel Exp $
+Igor Brezac <igor at ipass.net> has done a good deal of work on the saslauthd
+LDAP module.
+
+Jeremy Rumpf <jrumpf at heavyload.net> implemented the credential cache, unified
+the different IPC methods under a common framework.
+
+Fabian Knittel <fknittel at gmx.de> wrote auth_pam plugin, based on
+Debian's pwcheck_pam daemon by Michael-John Turner <mj at debian.org>.
+
+saslauthd was originally contributed by Lyndon Nerenberg on
+behalf of MessagingDirect Ltd.
diff --git a/ChangeLog b/ChangeLog
index 4b97e79..c7be303 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
-2012-10-12  Alexey Melnikov <alexey.melnikov at isode.com>
-	* Getting ready for 2.1.25.
+2012-11-19  Alexey Melnikov <alexey.melnikov at isode.com>
+	* Final 2.1.26 tagged and released by Ken.
 
 2012-07-06  Alexey Melnikov <alexey.melnikov at isode.com>
 	* saslauthd/auth_krb5.c: Fixed a crash in the auth_krb5.c
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 2550dab..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,302 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS
-     KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
-
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/Makefile.am b/Makefile.am
index 2091dd1..f72bb26 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
 AUTOMAKE_OPTIONS = 1.7
+ACLOCAL_AMFLAGS = -I m4
 # Top-level Makefile.am for SASL
 # Rob Earhart
 #
@@ -70,7 +71,7 @@ INSTALLOSX =
 endif
 
 SUBDIRS=include sasldb lib plugins utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
-EXTRA_DIST=config cmulocal win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
+EXTRA_DIST=config win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
     libsasl2.pc.in
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 14798bc..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,918 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
-	$(srcdir)/libsasl2.pc.in $(top_srcdir)/configure AUTHORS \
-	COPYING ChangeLog INSTALL NEWS config/config.guess \
-	config/config.sub config/depcomp config/install-sh \
-	config/ltconfig config/ltmain.sh config/missing \
-	config/mkinstalldirs
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = libsasl2.pc
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
-DATA = $(pkgconfig_DATA)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir dist dist-all distcheck
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = include sasldb lib plugins utils doc man pwcheck sample \
-	java saslauthd
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.7
- at SASLAUTHD_FALSE@SAD = 
-# Top-level Makefile.am for SASL
-# Rob Earhart
-#
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
- at SASLAUTHD_TRUE@SAD = saslauthd
- at PWCHECK_FALSE@PWC = 
- at PWCHECK_TRUE@PWC = pwcheck
- at SAMPLE_FALSE@SAM = 
- at SAMPLE_TRUE@SAM = sample
- at JAVA_FALSE@JAV = 
- at JAVA_TRUE@JAV = java
- at MACOSX_FALSE@INSTALLOSX = 
- at MACOSX_TRUE@INSTALLOSX = install-exec-local-osx
-SUBDIRS = include sasldb lib plugins utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
-EXTRA_DIST = config cmulocal win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
-    libsasl2.pc.in
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libsasl2.pc
-framedir = /Library/Frameworks/SASL2.framework
-all: config.h
-	$(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-am--refresh:
-	@:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    echo ' $(SHELL) ./config.status'; \
-	    $(SHELL) ./config.status;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	$(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	$(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-	@rm -f stamp-h1
-	cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in:  $(am__configure_deps) 
-	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
-	rm -f stamp-h1
-	touch $@
-
-distclean-hdr:
-	-rm -f config.h stamp-h1
-libsasl2.pc: $(top_builddir)/config.status $(srcdir)/libsasl2.pc.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool config.lt
-install-pkgconfigDATA: $(pkgconfig_DATA)
-	@$(NORMAL_INSTALL)
-	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
-	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
-	done
-
-uninstall-pkgconfigDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	$(am__remove_distdir)
-	test -d "$(distdir)" || mkdir "$(distdir)"
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
-	-test -n "$(am__skip_mode_fix)" \
-	|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r "$(distdir)"
-dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
-
-dist-xz: distdir
-	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
-
-dist-tarZ: distdir
-	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
-
-dist-shar: distdir
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
-
-dist-zip: distdir
-	-rm -f $(distdir).zip
-	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
-
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-	case '$(DIST_ARCHIVES)' in \
-	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
-	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
-	*.tar.xz*) \
-	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-	*.tar.Z*) \
-	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
-	*.zip*) \
-	  unzip $(distdir).zip ;;\
-	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
-	chmod a-w $(distdir)
-	test -d $(distdir)/_build || exit 0; \
-	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build \
-	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
-	  && $(MAKE) $(AM_MAKEFLAGS) check \
-	  && $(MAKE) $(AM_MAKEFLAGS) install \
-	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-	        distuninstallcheck \
-	  && chmod -R a-w "$$dc_install_base" \
-	  && ({ \
-	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
-	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist \
-	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
-	  && cd "$$am__cwd" \
-	  || exit 1
-	$(am__remove_distdir)
-	@(echo "$(distdir) archives ready for distribution: "; \
-	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
-	@$(am__cd) '$(distuninstallcheck_dir)' \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-	   || { echo "ERROR: files left after uninstall:" ; \
-	        if test -n "$(DESTDIR)"; then \
-	          echo "  (check DESTDIR support)"; \
-	        fi ; \
-	        $(distuninstallcheck_listfiles) ; \
-	        exit 1; } >&2
-distcleancheck: distclean
-	@if test '$(srcdir)' = . ; then \
-	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-	  exit 1 ; \
-	fi
-	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-	  || { echo "ERROR: files left in build directory after distclean:" ; \
-	       $(distcleancheck_listfiles) ; \
-	       exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(DATA) config.h
-installdirs: installdirs-recursive
-installdirs-am:
-	for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr \
-	distclean-libtool distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-pkgconfigDATA
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am: install-exec-local
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-pkgconfigDATA
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
-	ctags-recursive install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-am clean clean-generic \
-	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-	dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
-	dist-zip distcheck distclean distclean-generic distclean-hdr \
-	distclean-libtool distclean-tags distcleancheck distdir \
-	distuninstallcheck dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-exec-local \
-	install-html install-html-am install-info install-info-am \
-	install-man install-pdf install-pdf-am install-pkgconfigDATA \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-pkgconfigDATA
-
-
-dist-hook:
-	@find $(distdir) -exec chmod o+w {} ';'
-	@find $(distdir) -name CVS -print | xargs -t rm -rf
-	(cd $(distdir)/plugins && sh makeinit.sh)
-install-exec-local: $(INSTALLOSX)
-	@if test "$(plugindir)" != "$(prefix)/lib/sasl2"; then \
-	  echo "********************************************************"; \
-	  echo "* WARNING:"; \
-	  echo "* Plugins are being installed into $(prefix)/lib/sasl2,"; \
-	  echo "* but the library will look for them in $(plugindir)."; \
-	  echo "* You need to make sure that the plugins will eventually"; \
-	  echo "* be in $(plugindir) -- the easiest way is to make a"; \
-	  echo "* symbolic link from $(plugindir) to $(prefix)/lib/sasl2,"; \
-	  echo "* but this may not be appropriate for your site, so this"; \
-	  echo "* installation procedure won't do it for you."; \
-	  echo "*"; \
-          echo "* If you don't want to do this for some reason, you can"; \
-          echo "* set the location where the library will look for plugins"; \
-	  echo "* by setting the environment variable SASL_PATH to the path"; \
-	  echo "* the library should use."; \
-	  echo "********************************************************"; \
-	fi
-install-exec-local-osx:
-	$(mkinstalldirs) $(framedir)/Versions/A/Headers
-	$(mkinstalldirs) $(framedir)/Versions/A/Resources
-	cd $(framedir)/Versions ; ln -fs A Current
-	cd $(framedir) ; ln -fs Versions/A/Headers .
-	cd $(framedir) ; ln -fs Versions/A/Resources .
-	$(INSTALL_DATA) $(srcdir)/config/Info.plist $(framedir)/Versions/A/Resources
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/README.GS2 b/README.GS2
new file mode 100644
index 0000000..973cee8
--- /dev/null
+++ b/README.GS2
@@ -0,0 +1,3 @@
+To build the GS2 SASL mechanism, you need MIT Kerberos 1.9.
+
+Please e-mail lukeh at padl.com with any bug reports.
diff --git a/README.andrew b/README.andrew
new file mode 100644
index 0000000..6591aad
--- /dev/null
+++ b/README.andrew
@@ -0,0 +1,130 @@
+#!/bin/sh
+smake -gnu init install
+exit 0
+
+To wash, "smake -gnu wash install".
+
+Use the vendor cc if possible on platforms which have purify (it has
+problems dealing with code produced by gcc 2.8.1).
+
+	On IRIX, setenv CC cc and setenv CFLAGS -O2 - no -sopt for now
+	On Solaris, setenv CC cc and setenv CFLAGS -fast
+
+----
+To release:
+- run testsuite successfully
+- compile successfully without kerberos or gssapi support
+- compile successfully on all andrew systypes
+- increment version in configure.in and saslauthd/configure.in
+- synchronize version with include/sasl.h, win32/common.mak and
+  win32/include/config.h
+- increment version in saslauthd/configure.in as needed
+- modify library versions in lib/Makefile.am, sasldb/Makefile.am
+  and plugins/Makefile.am accordingly (see libtool info file for details) 
+- add release notice to ChangeLog
+- add user visible changes to NEWS
+
+- tag the GIT repository with sasl-Major_Minor_Revision
+- check out the tag into a CLEAN repository
+- to make tarball: make distcheck (make sure you are on a machine that
+  is not using GNU tar!  Solaris tar seems to not get along with it well.)
+- compile on non-andrew machine
+  - be sure to compile saslauthd as well
+
+- copy to /afs/andrew/system/archive/cmu/anonftp/pub/cyrus-mail
+- sign the distribution (pgp -sb foo.tar.gz)
+
+- update asg.web.cmu.edu
+- announce to:
+    cyrus-announce at lists.andrew.cmu.edu
+    info-cyrus at andrew.cmu.edu
+    cyrus-sasl at lists.andrew.cmu.edu
+
+    comp.os.linux.announce
+    comp.mail.imap
+    comp.mail.sendmail after 8.10 comes out
+    
+    www.freshmeat.net
+
+sample announcement:
+
+To: cyrus-sasl at lists.andrew.cmu.edu, info-cyrus at andrew.cmu.edu
+Subject: Beta release of Cyrus SASL 1.5.18
+BCC: tmartin+sent at cyrus.andrew.cmu.edu
+--text follows this line--
+
+I'd like to announce the beta release of Cyrus SASL 1.5.18 on
+ftp.andrew.cmu.edu. This version includes bug fixes, a java SASL
+library that conforms to draft-weltman-java-sasl-02.txt, and man pages
+for all functions. This is a beta release because it has not been
+thoroughly tested against all applications that make use of it.
+
+Please send any feedback either to cyrus-sasl at lists.andrew.cmu.edu
+(public list) or to cyrus-bugs at andrew.cmu.edu.
+
+Download at:
+ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/BETA/cyrus-sasl-1.5.18.tar.gz
+
+Thanks,
+Tim Martin
+
+
+To: post+comp.mail.imap at andrew.cmu.edu
+Subject: Cyrus SASL 1.5.18 released (authentication library)
+BCC: tmartin+sent at cyrus.andrew.cmu.edu
+--text follows this line--
+
+I'm pleased to announce the release of the Cyrus SASL library, version
+1.5.18.  This represents primarily a bugfix release with a few new
+features, such as a java SASL library conforming to
+draft-weltman-java-sasl-02.txt, and man pages for all functions.
+  
+The Cyrus SASL library is a generic library for SASL authentication,
+as used in SMTP and IMAP protocols.  It's used for authentication by
+the Cyrus IMAP server as well as the Sendmail 8.10 release.
+  
+Make sure you read the README file.
+
+Download at:
+ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/BETA/cyrus-sasl-1.5.18.tar.gz
+
+  
+Please report bugs to cyrus-bugs at andrew.cmu.edu.
+  
+Join the cyrus-sasl at lists.andrew.cmu.edu mailing list by
+cyrus-sasl-request at lists.andrew.cmu.edu
+  
+Thanks,
+Tim Martin
+
+
+X-Mailer: BatIMail version 3.2
+To: post+comp.mail.sendmail at andrew.cmu.edu
+Subject: Cyrus SASL 1.5.18 released (authentication library)
+BCC: tmartin+sent at cyrus.andrew.cmu.edu
+Mime-Version: 1.0 (generated by tm-edit 7.108)
+Content-Type: text/plain; charset=US-ASCII
+--text follows this line--
+
+I'm pleased to announce the release of the Cyrus SASL library, version
+1.5.18.  This represents primarily a bugfix release with a few new
+features, such as a java SASL library conforming to
+draft-weltman-java-sasl-02.txt, and man pages for all functions.  
+  
+The Cyrus SASL library is a generic library for SASL
+authentication. It's used for authentication by the Sendmail 8.10
+release as well as the Cyrus IMAP server.
+  
+Make sure you read the README file if you are upgrading.
+
+Please report bugs to cyrus-bugs at andrew.cmu.edu.
+  
+Join the cyrus-sasl at lists.andrew.cmu.edu mailing list by
+cyrus-sasl-request at lists.andrew.cmu.edu
+
+Download at:
+ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/BETA/cyrus-sasl-1.5.18.tar.gz
+  
+  
+Thanks,
+Tim Martin
diff --git a/README.ldapdb b/README.ldapdb
new file mode 100644
index 0000000..d632af3
--- /dev/null
+++ b/README.ldapdb
@@ -0,0 +1,53 @@
+ldapdb auxprop plugin is contributed to cyrus-sasl by the OpenLDAP Project
+(http://www.openldap.org) under the license below.  The code is written by
+Howard Chu (hyc at openldap.org) and it is integrated to the cyrus-sasl
+distribution by Igor Brezac (igor at ypass.net).  See doc/options.html for the
+plugin documentation.
+
+The OpenLDAP Public License
+  Version 2.8, 17 August 2003
+
+Redistribution and use of this software and associated documentation
+("Software"), with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions in source form must retain copyright statements
+   and notices,
+
+2. Redistributions in binary form must reproduce applicable copyright
+   statements and notices, this list of conditions, and the following
+   disclaimer in the documentation and/or other materials provided
+   with the distribution, and
+
+3. Redistributions must contain a verbatim copy of this document.
+
+The OpenLDAP Foundation may revise this license from time to time.
+Each revision is distinguished by a version number.  You may use
+this Software under terms of this license revision or under the
+terms of any subsequent revision of the license.
+
+THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
+CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT
+SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
+OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+The names of the authors and copyright holders must not be used in
+advertising or otherwise to promote the sale, use or other dealing
+in this Software without specific, written prior permission.  Title
+to copyright in this Software shall at all times remain with copyright
+holders.
+
+OpenLDAP is a registered trademark of the OpenLDAP Foundation.
+
+Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
+California, USA.  All Rights Reserved.  Permission to copy and
+distribute verbatim copies of this document is granted.
diff --git a/README.rpm b/README.rpm
new file mode 100644
index 0000000..95e0b35
--- /dev/null
+++ b/README.rpm
@@ -0,0 +1,6 @@
+
+CMU does not provide any binary distributions.
+
+The following sites are known to have rpms:
+
+http://home.teleport.ch/simix/
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index 930b0e2..0000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,977 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
-You have another version of autoconf.  It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 16
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-			     [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
-		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES(CXX)],
-		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES(OBJC)],
-		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes.	            -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([config/kerberos_v4.m4])
-m4_include([config/libtool.m4])
-m4_include([config/plain.m4])
-m4_include([config/sasldb.m4])
-m4_include([cmulocal/berkdb.m4])
-m4_include([cmulocal/bsd_sockets.m4])
-m4_include([cmulocal/c-attribute.m4])
-m4_include([cmulocal/common.m4])
-m4_include([cmulocal/cyrus.m4])
-m4_include([cmulocal/init_automake.m4])
-m4_include([cmulocal/ipv6.m4])
-m4_include([cmulocal/openldap.m4])
-m4_include([cmulocal/openssl.m4])
-m4_include([cmulocal/sasl2.m4])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..38e3be2
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+olddir=`pwd`
+
+cd $srcdir
+
+(test -f configure.ac) || {
+	echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
+	exit 1
+}
+
+PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+	echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
+	echo "*** If you wish to pass any to it, please specify them on the" >&2
+	echo "*** \`$0\' command line." >&2
+	echo "" >&2
+fi
+
+aclocal --install || exit 1
+autoreconf --verbose --force --install -Wno-portability || exit 1
+
+cd $olddir
+if [ "$NOCONFIGURE" = "" ]; then
+	$srcdir/configure "$@" || exit 1
+
+	if [ "$1" = "--help" ]; then exit 0 else
+		echo "Now type \`make\' to compile $PKG_NAME" || exit 1
+	fi
+else
+	echo "Skipping configure process."
+fi
+
diff --git a/cmulocal/COPYING b/cmulocal/COPYING
deleted file mode 100644
index 5f4b634..0000000
--- a/cmulocal/COPYING
+++ /dev/null
@@ -1,39 +0,0 @@
-
-Copyright (c) 1994-2008 Carnegie Mellon University.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the
-   distribution.
-
-3. The name "Carnegie Mellon University" must not be used to
-   endorse or promote products derived from this software without
-   prior written permission. For permission or any legal
-   details, please contact
-     Carnegie Mellon University
-     Center for Technology Transfer and Enterprise Creation
-     4615 Forbes Avenue
-     Suite 302
-     Pittsburgh, PA  15213
-     (412) 268-7393, fax: (412) 268-7395
-     innovation at andrew.cmu.edu
-
-4. Redistributions of any form whatsoever must retain the following
-   acknowledgment:
-   "This product includes software developed by Computing Services
-    at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-
-CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/cmulocal/README.andrew b/cmulocal/README.andrew
deleted file mode 100644
index 801e157..0000000
--- a/cmulocal/README.andrew
+++ /dev/null
@@ -1,71 +0,0 @@
-This is a collection of autoconf macros which've been written by
-various people at CMU.  To use it, use "aclocal -I cmulocal" (after
-the first time, automake should automatically use the -I cmulocal, if
-you've called CMU_INIT_AUTOMAKE in configure.in).
-
-CMU_INIT_AUTOMAKE
-  If you use automake, you should call this after AM_INIT_AUTOMAKE.
-  It adds "-I cmulocal" to the aclocal command line, so that when
-  automake runs aclocal, aclocal'll continue to pick up these macros.
-
-CMU_ADD_LIBPATH
-  Add -L(arg), and possibly -R(arg) (or whatever the runpath is) to 
-  LDFLAGS.
-
-CMU_ADD_LIBPATH_TO
-  Likewise to above, except adds it to the specified variable (arg 2).
-
-CMU_GUESS_RUNPATH_SWITCH
-  Attempts to guess what the runpath switch is (-R or whatever).
-
-CMU_COMERR
-  Requires that com_err exist in the collection (at CMU, do this by
-  running "cvs checkout com_err", and adding com_err to DIST_SUBDIRS
-  in your Makefile.am).
-
-  It sets the output variable COMPILE_ET to the compile_et program to
-  use, and adds the appropriate paths to LDFLAGS and CPPFLAGS.
-
-  It does *not* add -lcom_err to LIBS (this would cause later library
-  checks to fail if com_err needs to be built), so Makefiles need to
-  explicitly add -lcom_err (which, after all, should always exist as
-  long as the com_err compile doesn't blow up).  Makefiles should do
-  this by using LIB_COMERR, which will substitute to the appropriate
-  magic to use to grab the library.  (This may involve a libtool archive;
-  you should be using libtool to link your program if you distribute
-  libraries with it that the program may link against).
-
-  Note that com_err will only be compiled if the configure script
-  can't find compile_et or libcom_err; if the system already has them,
-  the configure script will use the system installation (although, due
-  to some autoconf wonkiness, com_err will still be configured; it just
-  won't show up in the @subdirs@ expansion).
-
-CMU_NANA
-  Adds --with-nana, set by default; if set, attempts to link against
-  libnana.  If not set, or if libnana is unavailable, or if we're not
-  using gcc, it defines WITHOUT_NANA.
-
-CMU_PROG_LIBTOOL
-  Just like AM_PROG_LIBTOOL, except it performs a couple little hacks
-  to make sure that things don't break on picky vendor compilers
-  which whine about empty translation units. [DEPRECATED - DO NOT USE]
-
-CMU_PTHREADS
-  This attempts to link against libpthread (failing if it can't be found),
-  and attempts to do any system-specific setup required for thread
-  support (for example, most things want _REENTRANT to be defined,
-  but Solaris wants _POSIX_PTHREAD_SEMANTICS and __EXTENSIONS__, IRIX
-  wants to see _SGI_REENTRANT_FUNCTIONS, etc).
-
-CMU_SASL
-  This tries to find a SASL library, and calls AC_SUBST on LIB_SASL
-  if it finds one, or tells the user to go ftp it if it doesn't exist.
-
-  Provides --with-sasldir.
-
-CMU_KRB4
-  This attempts to find Kerberos 4 libraries and set up CFLAGS and LIBS
-  appropriately. It also updates and substitutes RPATH for shared library 
-  stuff.
-
diff --git a/cmulocal/afs.m4 b/cmulocal/afs.m4
deleted file mode 100644
index 1987d69..0000000
--- a/cmulocal/afs.m4
+++ /dev/null
@@ -1,314 +0,0 @@
-dnl afs.m4--AFS libraries, includes, and dependencies
-dnl $Id: afs.m4,v 1.29 2005/04/26 19:14:07 shadow Exp $
-dnl Chaskiel Grundman
-dnl based on kerberos_v4.m4
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-
-AC_DEFUN([CMU_AFS_INC_WHERE1], [
-cmu_save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$cmu_save_CPPFLAGS -I$1"
-AC_TRY_COMPILE([#include <afs/param.h>],
-[#ifndef SYS_NAME
-choke me
-#endif
-int foo;],
-ac_cv_found_afs_inc=yes,
-ac_cv_found_afs_inc=no)
-CPPFLAGS=$cmu_save_CPPFLAGS
-])
-
-AC_DEFUN([CMU_AFS_LIB_WHERE1], [
-save_LIBS="$LIBS"
-save_LDFLAGS="$LDFLAGS"
-
-LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS"
-LDFLAGS="-L$1 -L$1/afs $LDFLAGS"
-dnl suppress caching
-AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no)
-LIBS="$save_LIBS"
-LDFLAGS="$save_LDFLAGS"
-])
-
-AC_DEFUN([CMU_AFS_WHERE], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-   for i in $1; do
-      AC_MSG_CHECKING(for AFS in $i)
-      CMU_AFS_INC_WHERE1("$i/include")
-      ac_cv_found_lwp_inc=$ac_cv_found_afs_inc
-      CMU_TEST_INCPATH($i/include, lwp) 
-      ac_cv_found_afs_inc=$ac_cv_found_lwp_inc
-      if test "$ac_cv_found_afs_inc" = "yes"; then
-        CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR")
-        if test "$ac_cv_found_afs_lib" = "yes"; then
-          ac_cv_afs_where=$i
-          AC_MSG_RESULT(found)
-          break
-        else
-          AC_MSG_RESULT(not found)
-        fi
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_AFS], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_LIBSSL])
-AC_ARG_WITH(AFS,
-	[  --with-afs=PREFIX      Compile with AFS support],
-	[if test "X$with_AFS" = "X"; then
-		with_AFS=yes
-	fi])
-
-	if test "X$with_AFS" != "X"; then
-	  ac_cv_afs_where=$with_AFS
-	fi
-	if test "X$ac_cv_afs_where" = "X"; then
-	  CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools)
-	fi
-
-	AC_MSG_CHECKING(whether to include AFS)
-	if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then
-	  ac_cv_found_afs=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_afs=yes
-	  AC_MSG_RESULT(yes)
-	  AFS_INC_DIR="$ac_cv_afs_where/include"
-	  AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR"
-	  AFS_TOP_DIR="$ac_cv_afs_where"
-	  AFS_INC_FLAGS="-I${AFS_INC_DIR}"
-          AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs"
-          cmu_save_LIBS="$LIBS"
-          cmu_save_CPPFLAGS="$CPPFLAGS"
-          CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}"
-	  cmu_save_LDFLAGS="$LDFLAGS"
- 	  LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}"
-                        
-          AC_CHECK_HEADERS(afs/stds.h)
-
-          AC_MSG_CHECKING([if libdes is needed])
-          AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe")
-          if test "X$AFS_DES_LIB" != "X"; then
-              LIBS="$cmu_save_LIBS -ldes"
-              AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes")
-              if test "X$AFS_DES_LIB" = "Xyes"; then
-                  AC_MSG_RESULT([yes])
-    	          AFS_LIBDES="-ldes"
-    	          AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a"
-    	      else
-   	          LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
- 	          AC_TRY_LINK([],
-	          [des_quad_cksum();],AFS_DES_LIB="libcrypto")
-	          if test "X$AFS_DES_LIB" = "Xlibcrypto"; then
-	              AC_MSG_RESULT([libcrypto])
-		      AFS_LIBDES="$LIBSSL_LIB_FLAGS"
-	              AFS_LIBDESA="$LIBSSL_LIB_FLAGS"
-    	          else
-   	              LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
- 	              AC_TRY_LINK([],
-	              [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat")
-	              if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then
-	                  AC_MSG_RESULT([libcrypto+descompat])
-		          AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-	                  AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-	              else
-         	          AC_MSG_RESULT([unknown])
-	                  AC_MSG_ERROR([Could not use -ldes])
-	              fi 
-	          fi 
-	      fi 
-	  else
-             AC_MSG_RESULT([no])
-          fi
-
-
-	  AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
-          AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
-	  AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
-	  AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
-          AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a"
-
-          LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
-          AC_CHECK_FUNC(des_pcbc_init)
-          if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then
-           AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat")
-           if test "X$AFS_DESCOMPAT_LIB" != "X" ; then
-                AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB"
-                AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB"
-                AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB"
-                AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB"
-           else
-
-           AC_MSG_CHECKING([if rxkad needs des_pcbc_init])
-           AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe)
-            if test "$RXKAD_PROBLEM" = "maybe"; then
-              AC_TRY_LINK([int des_pcbc_init() { return 0;}],
-              [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error)
-              if test "$RXKAD_PROBLEM" = "yes"; then
-                    AC_MSG_RESULT([yes])
-                    AC_MSG_ERROR([cannot use rxkad])
-              else
-                    AC_MSG_RESULT([unknown])        
-                    AC_MSG_ERROR([Unknown error testing rxkad])
-              fi
-            else
-              AC_MSG_RESULT([no])
-            fi
-           fi
-          fi
-
-          LIBS="$cmu_save_LIBS"
-          AC_CHECK_FUNC(flock)
-          LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
-          if test "X$ac_cv_func_flock" != "Xyes"; then
-             AC_MSG_CHECKING([if AFS needs flock])
-             AC_TRY_LINK([#include <afs/param.h>
-#ifdef HAVE_AFS_STDS_H
-#include <afs/stds.h>
-#endif
-#include <ubik.h>
-#include <afs/cellconfig.h>
-#include <afs/auth.h>
-#include <afs/volser.h>
-struct ubik_client * cstruct;
-int sigvec() {return 0;}
-extern int UV_SetSecurity();],
-             [vsu_ClientInit(1,"","",0,
-                             &cstruct,UV_SetSecurity)],
-             AFS_FLOCK=no,AFS_FLOCK=yes)
-             if test $AFS_FLOCK = "no"; then
-                AC_MSG_RESULT([no])
-             else
-               AC_MSG_RESULT([yes])
-               LDFLAGS="$LDFLAGS -L/usr/ucblib"
-               AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)])
-             fi
-          fi
-          LIBS="$cmu_save_LIBS"
-          AC_CHECK_FUNC(sigvec)
-          LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
-          if test "X$ac_cv_func_sigvec" != "Xyes"; then
-             AC_MSG_CHECKING([if AFS needs sigvec])
-             AC_TRY_LINK([#include <afs/param.h>
-#ifdef HAVE_AFS_STDS_H
-#include <afs/stds.h>
-#endif
-#include <ubik.h>
-#include <afs/cellconfig.h>
-#include <afs/auth.h>
-#include <afs/volser.h>
-struct ubik_client * cstruct;
-int flock() {return 0;}
-extern int UV_SetSecurity();],
-             [vsu_ClientInit(1,"","",0,
-                             &cstruct,UV_SetSecurity)],
-             AFS_SIGVEC=no,AFS_SIGVEC=yes)
-             if test $AFS_SIGVEC = "no"; then
-                AC_MSG_RESULT([no])
-             else
-               AC_MSG_RESULT([yes])
-               LDFLAGS="$LDFLAGS -L/usr/ucblib"
-               AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)])
-             fi
-          fi
-          if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
-             AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib"
-          fi
-          if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
-             AFS_BSD_LIB="-lucb"
-          elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then
-             AFS_BSD_LIB="-lBSD"
-          fi
-          if test "X$AFS_BSD_LIB" != "X" ; then
-                AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB"
-                AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB"
-                AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
-                AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
-                AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB"
-          fi
-
-          AC_MSG_CHECKING([if libaudit is needed])
-	  AFS_LIBAUDIT=""
-          LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
-          AC_TRY_LINK([#include <afs/param.h>
-#ifdef HAVE_AFS_STDS_H
-#include <afs/stds.h>
-#endif
-#include <afs/cellconfig.h>
-#include <afs/auth.h>],
-          [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe")
-          if test "X$AFS_AUDIT_LIB" != "X"; then
-          LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET"
-             AC_TRY_LINK([#include <afs/param.h>
-#ifdef HAVE_AFS_STDS_H
-#include <afs/stds.h>
-#endif
-#include <afs/cellconfig.h>
-#include <afs/auth.h>],
-             [afsconf_SuperUser();],AFS_AUDIT_LIB="yes")
-             if test "X$AFS_AUDIT_LIB" = "Xyes"; then
-                 AC_MSG_RESULT([yes])
-	         AFS_LIBAUDIT="-laudit"
-	         AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
-                 AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
-                 AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
-             else
-                 AC_MSG_RESULT([unknown])
-                 AC_MSG_ERROR([Could not use -lauth while testing for -laudit])
-             fi 
-          else
-             AC_MSG_RESULT([no])
-          fi
-
-	  AC_CHECK_FUNCS(VL_ProbeServer)
-          AC_MSG_CHECKING([if new-style afs_ integer types are defined])
-          AC_CACHE_VAL(ac_cv_afs_int32,
-dnl The next few lines contain a quoted argument to egrep
-dnl It is critical that there be no leading or trailing whitespace
-dnl or newlines
-[AC_EGREP_CPP(dnl
-changequote(<<,>>)dnl
-<<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl
-changequote([,]), [#include <afs/param.h>
-#ifdef HAVE_AFS_STDS_H
-#include <afs/stds.h>
-#endif],
-ac_cv_afs_int32=yes, ac_cv_afs_int32=no)])
-          AC_MSG_RESULT($ac_cv_afs_int32)
-          if test $ac_cv_afs_int32 = yes ; then
-            AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names])
-          else
-            AC_DEFINE(afs_int16, int16, [it's a type definition])
-            AC_DEFINE(afs_int32, int32, [it's a type definition])
-            AC_DEFINE(afs_uint16, u_int16, [it's a type definition])
-            AC_DEFINE(afs_uint32, u_int32, [it's a type definition])
-          fi
-
-          CPPFLAGS="${cmu_save_CPPFLAGS}"
-          LDFLAGS="${cmu_save_LDFLAGS}"
-          LIBS="${cmu_save_LIBS}"
-	  AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)])
-          AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)])
-          AC_SUBST(AFS_CLIENT_LIBS_STATIC)
-          AC_SUBST(AFS_KTC_LIBS_STATIC)
-          AC_SUBST(AFS_CLIENT_LIBS)
-          AC_SUBST(AFS_RX_LIBS)
-          AC_SUBST(AFS_KTC_LIBS)
-          AC_SUBST(AFS_INC_FLAGS)
-          AC_SUBST(AFS_LIB_FLAGS)
-	  AC_SUBST(AFS_TOP_DIR)
-	  AC_SUBST(AFS_LIBAUDIT)
-	  AC_SUBST(AFS_LIBDES)
-          AC_SUBST(AFS_LIBDESA)
-       	fi
-	])
-
-AC_DEFUN([CMU_NEEDS_AFS],
-[AC_REQUIRE([CMU_AFS])
-if test "$ac_cv_found_afs" != "yes"; then
-        AC_ERROR([Cannot continue without AFS])
-fi])
diff --git a/cmulocal/agentx.m4 b/cmulocal/agentx.m4
deleted file mode 100644
index 4028faa..0000000
--- a/cmulocal/agentx.m4
+++ /dev/null
@@ -1,46 +0,0 @@
-dnl agentx.m4--detect agentx libraries
-dnl copied from x-unixrc
-dnl Tim Martin
-dnl $Id: agentx.m4,v 1.5 2003/10/08 20:35:24 rjs3 Exp $
-
-AC_DEFUN([CMU_AGENTX], [
-
-	dnl
-	dnl CMU AgentX
-	dnl
-	AC_MSG_CHECKING([for AgentX])
-	AC_ARG_WITH(agentx, [  --with-agentx              CMU AgentX libraries located in (val)], AGENTX_DIR="$withval", AGENTX_DIR=no)
-
-	found_agentx="no"
-
-	if test "${AGENTX_DIR}" != "no" &&
-	   test -f $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a &&
-	   test -f $AGENTX_DIR/include/agentx.h; then
-	     AGENTX_DIR="$AGENTX_DIR"
-	     found_agentx="yes"
-	elif test -d /usr/local &&
-	   test -f /usr/local/lib${ABILIBDIR}/libagentx.a &&
-	   test -f /usr/local/include/agentx.h; then
-	     AGENTX_DIR="/usr/local"
-	     found_agentx="yes"
-
-	elif test -d /usr/ng &&
-	   test -f /usr/ng/lib${ABILIBDIR}/libagentx.a &&
-	   test -f /usr/ng/include/agentx.h; then
-	     AGENTX_DIR="/usr/ng"
-	     found_agentx="yes"
-	fi
-
-	if test "$found_agentx" = "no"; then
-	  AC_MSG_WARN([Could not locate AgentX Libraries! http://www.net.cmu.edu/groups/netdev/agentx/])
-	else
-	  LIB_AGENTX="-L$AGENTX_DIR/lib${ABILIBDIR} -lagentx"
-  	  AC_SUBST(LIB_AGENTX)
-	  AGENTXFLAGS="-I$AGENTX_DIR/include"
-          AC_SUBST(AGENTXFLAGS)   
-	  AC_MSG_RESULT([found $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a])	
-	fi
-
-
-
-])
diff --git a/cmulocal/arx.m4 b/cmulocal/arx.m4
deleted file mode 100644
index 8b87484..0000000
--- a/cmulocal/arx.m4
+++ /dev/null
@@ -1,155 +0,0 @@
-dnl $Id: arx.m4,v 1.6 2005/04/26 19:14:07 shadow Exp $
-
-AC_DEFUN([CMU_ARX_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([#include <arx.h>],
-[arx_context *foo;],
-ac_cv_found_arx_inc=yes,
-ac_cv_found_arx_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_ARX_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for arx headers in $i)
-      CMU_ARX_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, arx)
-      if test "$ac_cv_found_arx_inc" = "yes"; then
-        ac_cv_arx_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-#
-# Test for lib files
-#
-
-AC_DEFUN([CMU_ARX_LIB_WHERE1], [
-AC_REQUIRE([CMU_AFS])
-AC_REQUIRE([CMU_KRB4])
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -larx $AFS_LIB_FLAGS $AFS_CLIENT_LIBS $KRB_LIB_FLAGS $LIB_SOCKET"
-AC_TRY_LINK(,
-[arx_Init();],
-[ac_cv_found_arx_lib=yes],
-ac_cv_found_arx_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_ARX_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for arx libraries in $i)
-      CMU_ARX_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, arx)
-      if test "$ac_cv_found_arx_lib" = "yes" ; then
-        ac_cv_arx_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_USE_ARX], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(arx,
-	[  --with-arx=PREFIX      Compile with arx support],
-	[if test "X$with_arx" = "X"; then
-		with_arx=yes
-	fi])
-AC_ARG_WITH(arx-lib,
-	[  --with-arx-lib=dir     use arx libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-arx-lib])
-	fi])
-AC_ARG_WITH(arx-include,
-	[  --with-arx-include=dir use arx headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-arx-include])
-	fi])
-
-	if test "X$with_arx" != "X"; then
-	  if test "$with_arx" != "yes"; then
-	    ac_cv_arx_where_lib=$with_arx/${CMU_LIB_SUBDIR}
-	    ac_cv_arx_where_inc=$with_arx/include
-	  fi
-	fi
-
-	if test "X$with_arx_lib" != "X"; then
-	  ac_cv_arx_where_lib=$with_arx_lib
-	fi
-	if test "X$ac_cv_arx_where_lib" = "X"; then
-	  CMU_ARX_LIB_WHERE(/usr/athena/${CMU_LIB_SUBDIR} /usr/local/${CMU_LIB_SUBDIR} /usr/${CMU_LIB_SUBDIR})
-	fi
-
-	if test "X$with_arx_include" != "X"; then
-	  ac_cv_arx_where_inc=$with_arx_include
-	fi
-	if test "X$ac_cv_arx_where_inc" = "X"; then
-	  CMU_ARX_INC_WHERE(/usr/athena/include /usr/local/include)
-	fi
-
-	AC_MSG_CHECKING(whether to include arx)
-	if test "X$ac_cv_arx_where_lib" = "X" -o "X$ac_cv_arx_where_inc" = "X"; then
-	  ac_cv_found_arx=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_arx=yes
-	  AC_MSG_RESULT(yes)
-	  ARX_INC_DIR=$ac_cv_arx_where_inc
-	  ARX_LIB_DIR=$ac_cv_arx_where_lib
-	  ARX_INC_FLAGS="-I${ARX_INC_DIR}"
-	  ARX_LIB_FLAGS="-L${ARX_LIB_DIR} -larx"
-	  ARX_LD_FLAGS="-L${ARX_LIB_DIR}"
-          dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
-          dnl Allow makefile substitutions....
-          AC_SUBST(ARX_INC_FLAGS)
-          AC_SUBST(ARX_LIB_FLAGS)
-          AC_SUBST(ARX_LD_FLAGS)
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${ARX_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${ARX_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${ARX_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${ARX_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${ARX_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${ARX_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${ARX_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${ARX_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${ARX_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/ax_path_bdb.m4 b/cmulocal/ax_path_bdb.m4
deleted file mode 100644
index c1d9470..0000000
--- a/cmulocal/ax_path_bdb.m4
+++ /dev/null
@@ -1,566 +0,0 @@
-dnl @synopsis AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-dnl
-dnl This macro finds the latest version of Berkeley DB on the system, 
-dnl and ensures that the header file and library versions match. If
-dnl MINIMUM-VERSION is specified, it will ensure that the library
-dnl found is at least that version.
-dnl 
-dnl It determines the name of the library as well as the path to the 
-dnl header file and library.  It will check both the default environment
-dnl as well as the default Berkeley DB install location.  When found, it
-dnl sets BDB_LIBS, BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary values
-dnl to add to LIBS, CPPFLAGS, and LDFLAGS, as well as setting BDB_VERSION
-dnl to the version found.  HAVE_DB_H is defined also.
-dnl 
-dnl The option --with-bdb-dir=DIR can be used to specify a specific
-dnl Berkeley DB installation to use.
-dnl
-dnl An example of it's use is:
-dnl    AX_PATH_BDB([3],[
-dnl      LIBS="$BDB_LIBS $LIBS"
-dnl      LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
-dnl      CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
-dnl    ])
-dnl which will locate the latest version of Berkeley DB on the system,
-dnl and ensure that it is version 3.0 or higher.
-dnl
-dnl Details: This macro does not use either AC_CHECK_HEADERS or 
-dnl AC_CHECK_LIB because, first, the functions inside the library are
-dnl sometimes renamed to contain a version code that is only available
-dnl from the db.h on the system, and second, because it is common to
-dnl have multiple db.h and libdb files on a system it is important to 
-dnl make sure the ones being used correspond to the same version.
-dnl Additionally, there are many different possible names for libdb
-dnl when installed by an OS distribution, and these need to be checked
-dnl if db.h does not correspond to libdb.
-dnl
-dnl When cross compiling, only header versions are verified since it
-dnl would be difficult to check the library version.  Additionally
-dnl the default Berkeley DB installation locations /usr/local/BerkeleyDB*
-dnl are not searched for higher versions of the library.
-dnl 
-dnl The format for the list of library names to search came from the
-dnl Cyrus IMAP distribution, although they are generated dynamically
-dnl here, and only for the version found in db.h.
-dnl 
-dnl The macro AX_COMPARE_VERSION is required to use this macro, and
-dnl should be available from the Autoconf Macro Archive.
-dnl
-dnl The author would like to acknowledge the generous and valuable feedback 
-dnl from Guido Draheim, without which this macro would be far less robust,
-dnl and have poor and inconsistent cross compilation support.
-dnl
-dnl @version $Id: ax_path_bdb.m4,v 1.1 2005/01/06 20:24:52 shadow Exp $
-dnl @author Tim Toolan <toolan at ele.uri.edu>
-dnl
-
-dnl #########################################################################
-AC_DEFUN([AX_PATH_BDB], [
-  dnl # Used to indicate success or failure of this function.
-  ax_path_bdb_ok=no
-
-  # Add --with-bdb-dir option to configure.
-  AC_ARG_WITH([bdb-dir],
-    [AC_HELP_STRING([--with-bdb-dir=DIR],
-                    [Berkeley DB installation directory])])
-
-  # Check if --with-bdb-dir was specified.
-  if test "x$with_bdb_dir" = "x" ; then 
-    # No option specified, so just search the system.
-    AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [
-      ax_path_bdb_ok=yes
-    ])
-   else
-     # Set --with-bdb-dir option.
-     ax_path_bdb_INC="$with_bdb_dir/include"
-     ax_path_bdb_LIB="$with_bdb_dir/lib"
- 
-     dnl # Save previous environment, and modify with new stuff.
-     ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
- 
-     ax_path_bdb_save_LDFLAGS=$LDFLAGS
-     LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
- 
-     # Check for specific header file db.h
-     AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC])
-     if test -f "$ax_path_bdb_INC/db.h" ; then
-       AC_MSG_RESULT([yes])
-       # Check for library
-       AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [
-         ax_path_bdb_ok=yes
-         BDB_CPPFLAGS="-I$ax_path_bdb_INC"
-         BDB_LDFLAGS="-L$ax_path_bdb_LIB"
-       ])
-     else
-       AC_MSG_RESULT([no])
-       AC_MSG_NOTICE([no usable Berkeley DB not found]) 
-     fi
- 
-     dnl # Restore the environment.
-     CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
-     LDFLAGS="$ax_path_bdb_save_LDFLAGS"
-
-  fi
-
-  dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
-  if test "$ax_path_bdb_ok" = "yes" ; then
-    m4_ifvaln([$2],[$2],[:])dnl
-    m4_ifvaln([$3],[else $3])dnl
-  fi
-
-]) dnl AX_PATH_BDB
-
-dnl #########################################################################
-dnl Check for berkeley DB of at least MINIMUM-VERSION on system.
-dnl 
-dnl The OPTION argument determines how the checks occur, and can be one of:
-dnl
-dnl   HIGHEST -  Check both the environment and the default installation 
-dnl              directories for Berkeley DB and choose the version that
-dnl              is highest. (default)
-dnl   ENVFIRST - Check the environment first, and if no satisfactory 
-dnl              library is found there check the default installation 
-dnl              directories for Berkeley DB which is /usr/local/BerkeleyDB*
-dnl   ENVONLY -  Check the current environment only.
-dnl   
-dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST,
-dnl          AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and
-dnl          AX_COMPARE_VERSION macros.
-dnl
-dnl Result: sets ax_path_bdb_no_options_ok to yes or no
-dnl         sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION
-dnl
-dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [
-  dnl # Used to indicate success or failure of this function.
-  ax_path_bdb_no_options_ok=no
-
-  # Values to add to environment to use Berkeley DB.
-  BDB_VERSION=''
-  BDB_LIBS=''
-  BDB_CPPFLAGS=''
-  BDB_LDFLAGS=''
-
-  # Check cross compilation here.
-  if test "x$cross_compiling" = "xyes" ; then
-    # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
-    # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
-    # and extracts the version number from it.
-    AC_MSG_CHECKING([for db.h])
-
-    AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl
-    HEADER_VERSION=''
-    AC_PREPROC_IFELSE([
-      AC_LANG_SOURCE([[
-#include <db.h>
-AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
-      ]])
-    ],[
-      # Extract version from preprocessor output.
-      HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
-        | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'`
-    ],[])
-
-    if test "x$HEADER_VERSION" = "x" ; then
-      AC_MSG_RESULT([no])
-    else
-      AC_MSG_RESULT([$HEADER_VERSION])
-
-      # Check that version is high enough.
-      AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[
-        # get major and minor version numbers
-        AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl
-        MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'`
-        AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl
-        MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
-
-	dnl # Save LIBS.
-	ax_path_bdb_no_options_save_LIBS="$LIBS"
-
-        # Check that we can link with the library.
-        AC_SEARCH_LIBS([db_version], 
-          [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[
-            # Sucessfully found library.
-            ax_path_bdb_no_options_ok=yes
-            BDB_VERSION=$HEADER_VERSION
-	    
-	    # Extract library from LIBS
-	    ax_path_bdb_no_options_LEN=` \
-              echo "x$ax_path_bdb_no_options_save_LIBS" \
-              | awk '{print(length)}'`
-            BDB_LIBS=`echo "x$LIBS " \
-              | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
-        ],[])
-
-        dnl # Restore LIBS
-	LIBS="$ax_path_bdb_no_options_save_LIBS"
-
-        AS_VAR_POPDEF([MAJ])dnl
-        AS_VAR_POPDEF([MIN])dnl
-      ])
-    fi
-
-    AS_VAR_POPDEF([HEADER_VERSION])dnl
-  else
-    # Not cross compiling.
-    # Check version of Berkeley DB in the current environment.
-    AX_PATH_BDB_ENV_GET_VERSION([
-      AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[
-        # Found acceptable version in current environment.
-        ax_path_bdb_no_options_ok=yes
-        BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
-        BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
-      ])
-    ])
-
-    # Determine if we need to search /usr/local/BerkeleyDB*
-    ax_path_bdb_no_options_DONE=no
-    if test "x$2" = "xENVONLY" ; then
-      ax_path_bdb_no_options_DONE=yes
-    elif test "x$2" = "xENVFIRST" ; then
-      ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
-    fi  
-
-    if test "$ax_path_bdb_no_options_DONE" = "no" ; then
-      # Check for highest in /usr/local/BerkeleyDB*
-      AX_PATH_BDB_PATH_FIND_HIGHEST([
-        if test "$ax_path_bdb_no_options_ok" = "yes" ; then
-        # If we already have an acceptable version use this if higher.
-          AX_COMPARE_VERSION(
-             [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION])
-        else
-          # Since we didn't have an acceptable version check if this one is.
-          AX_COMPARE_VERSION(
-             [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1])
-        fi
-      ])
-
-      dnl # If result from _AX_COMPARE_VERSION is true we want this version.
-      if test "$ax_compare_version" = "true" ; then
-        ax_path_bdb_no_options_ok=yes
-        BDB_LIBS="-ldb"
-        BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
-        BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
-        BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
-      fi
-    fi
-  fi
-
-  dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
-  if test "$ax_path_bdb_no_options_ok" = "yes" ; then
-    AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION]) 
-    AC_DEFINE([HAVE_DB_H],[1],
-              [Define to 1 if you have the <db.h> header file.])
-    m4_ifvaln([$3],[$3])dnl
-  else
-    AC_MSG_NOTICE([no Berkeley DB version $1 or higher found]) 
-    m4_ifvaln([$4],[$4])dnl
-  fi 
-]) dnl AX_PATH_BDB_NO_OPTIONS
-
-dnl #########################################################################
-dnl Check the default installation directory for Berkeley DB which is
-dnl of the form /usr/local/BerkeleyDB* for the highest version.
-dnl
-dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no,
-dnl         sets ax_path_bdb_path_find_highest_VERSION to version,
-dnl         sets ax_path_bdb_path_find_highest_DIR to directory.
-dnl
-dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [
-  dnl # Used to indicate success or failure of this function.
-  ax_path_bdb_path_find_highest_ok=no
-
-  AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl
-  VERSION=''
-
-  ax_path_bdb_path_find_highest_DIR=''
-
-  # find highest verison in default install directory for Berkeley DB 
-  AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl
-  AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl
-
-  for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
-  do
-    AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[
-      AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[
-        ax_path_bdb_path_find_highest_ok=yes
-        ax_path_bdb_path_find_highest_DIR="$CURDIR"
-        VERSION="$CUR_VERSION"
-      ])
-    ])
-  done
-
-  AS_VAR_POPDEF([VERSION])dnl
-  AS_VAR_POPDEF([CUR_VERSION])dnl
-  AS_VAR_POPDEF([CURDIR])dnl
-
-  dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
-  if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
-    m4_ifvaln([$1],[$1],[:])dnl
-    m4_ifvaln([$2],[else $2])dnl
-  fi
-
-]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST
-
-dnl #########################################################################
-dnl Checks for Berkeley DB in specified directory's lib and include 
-dnl subdirectories.  
-dnl
-dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no,
-dnl         sets ax_path_bdb_path_get_version_VERSION to version.
-dnl
-dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [
-  dnl # Used to indicate success or failure of this function.
-  ax_path_bdb_path_get_version_ok=no
-
-  # Indicate status of checking for Berkeley DB header.
-  AC_MSG_CHECKING([in $1/include for db.h])
-  ax_path_bdb_path_get_version_got_header=no
-  test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
-  AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header])
-
-  # Indicate status of checking for Berkeley DB library.
-  AC_MSG_CHECKING([in $1/lib for library -ldb])
-
-  ax_path_bdb_path_get_version_VERSION=''
-
-  if test -d "$1/include" && test -d "$1/lib" &&
-     test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
-    dnl # save and modify environment
-    ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="-I$1/include $CPPFLAGS"
-
-    ax_path_bdb_path_get_version_save_LIBS="$LIBS"
-    LIBS="$LIBS -ldb"
-
-    ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
-    LDFLAGS="-L$1/lib $LDFLAGS"
-
-    # Compile and run a program that compares the version defined in
-    # the header file with a version defined in the library function
-    # db_version.
-    AC_RUN_IFELSE([
-      AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <db.h>
-int main(int argc,char **argv)
-{
-  int major,minor,patch;
-  db_version(&major,&minor,&patch);
-  if (argc > 1)
-    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
-  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
-      DB_VERSION_PATCH == patch)
-    return 0;          
-  else
-    return 1;
-}
-      ]])
-    ],[
-      # Program compiled and ran, so get version by adding argument.
-      ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
-      ax_path_bdb_path_get_version_ok=yes
-    ],[],[])
-
-    dnl # restore environment
-    CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
-    LIBS="$ax_path_bdb_path_get_version_save_LIBS"
-    LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
-  fi
-
-  dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
-  if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
-    AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION])
-    m4_ifvaln([$2],[$2])dnl
-  else
-    AC_MSG_RESULT([no])
-    m4_ifvaln([$3],[$3])dnl
-  fi 
-]) dnl AX_PATH_BDB_PATH_GET_VERSION
-
-#############################################################################
-dnl Checks if version of library and header match specified version.  
-dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro.
-dnl 
-dnl Requires AX_COMPARE_VERSION macro.
-dnl 
-dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no.
-dnl
-dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME])
-AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [
-  dnl # Used to indicate success or failure of this function.
-  ax_path_bdb_env_confirm_lib_ok=no
-
-  dnl # save and modify environment to link with library LIBNAME
-  ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
-  LIBS="$LIBS $2"
-
-  # Compile and run a program that compares the version defined in
-  # the header file with a version defined in the library function
-  # db_version.
-  AC_RUN_IFELSE([
-    AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <db.h>
-int main(int argc,char **argv)
-{
-  int major,minor,patch;
-  db_version(&major,&minor,&patch);
-  if (argc > 1)
-    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
-  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
-      DB_VERSION_PATCH == patch)
-    return 0;          
-  else
-    return 1;
-}
-    ]])
-  ],[
-    # Program compiled and ran, so get version by giving an argument,
-    # which will tell the program to print the output.
-    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
-
-    # If the versions all match up, indicate success.
-    AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[
-      ax_path_bdb_env_confirm_lib_ok=yes
-    ])
-  ],[],[])
-
-  dnl # restore environment
-  LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
-
-]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB
-
-#############################################################################
-dnl Finds the version and library name for Berkeley DB in the
-dnl current environment.  Tries many different names for library.
-dnl
-dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro.
-dnl
-dnl Result: set ax_path_bdb_env_get_version_ok to yes or no,
-dnl         set ax_path_bdb_env_get_version_VERSION to the version found,
-dnl         and ax_path_bdb_env_get_version_LIBNAME to the library name.
-dnl
-dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [
-  dnl # Used to indicate success or failure of this function.
-  ax_path_bdb_env_get_version_ok=no
-
-  ax_path_bdb_env_get_version_VERSION=''
-  ax_path_bdb_env_get_version_LIBS=''
-
-  AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl
-  AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl
-
-  # Indicate status of checking for Berkeley DB library.
-  AC_MSG_CHECKING([for db.h])
-
-  # Compile and run a program that determines the Berkeley DB version
-  # in the header file db.h.
-  HEADER_VERSION=''
-  AC_RUN_IFELSE([
-    AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <db.h>
-int main(int argc,char **argv)
-{
-  if (argc > 1)
-    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
-  return 0;            
-}
-    ]])
-  ],[
-    # Program compiled and ran, so get version by adding an argument.
-    HEADER_VERSION=`./conftest$ac_exeext x`
-    AC_MSG_RESULT([$HEADER_VERSION])
-  ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])])
-
-  # Have header version, so try to find corresponding library.
-  # Looks for library names in the order:
-  #   nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
-  # and stops when it finds the first one that matches the version
-  # of the header file.  
-  if test "x$HEADER_VERSION" != "x" ; then 
-    AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION])
-
-    AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl
-    AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl
-
-    # get major and minor version numbers
-    MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'`
-    MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
-
-    # see if it is already specified in LIBS
-    TEST_LIBNAME=''
-    AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
-      # try format "db"
-      TEST_LIBNAME='-ldb'
-      AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-    fi
-
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
-      # try format "db-X.Y"
-      TEST_LIBNAME="-ldb-${MAJOR}.$MINOR"
-      AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-    fi
-
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
-      # try format "dbX.Y"
-      TEST_LIBNAME="-ldb${MAJOR}.$MINOR"
-      AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-    fi
-
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
-      # try format "dbXY"
-      TEST_LIBNAME="-ldb$MAJOR$MINOR"
-      AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-    fi
-
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
-      # try format "db-X"
-      TEST_LIBNAME="-ldb-$MAJOR"
-      AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-    fi
-
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
-      # try format "dbX"
-      TEST_LIBNAME="-ldb$MAJOR"
-      AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
-    fi
-
-    dnl # Found a valid library.
-    if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
-      if test "x$TEST_LIBNAME" = "x" ; then
-        AC_MSG_RESULT([none required])
-      else
-        AC_MSG_RESULT([$TEST_LIBNAME])
-      fi
-      ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION"
-      ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME"
-      ax_path_bdb_env_get_version_ok=yes
-    else
-      AC_MSG_RESULT([no])
-    fi
-
-    AS_VAR_POPDEF([MAJOR])dnl
-    AS_VAR_POPDEF([MINOR])dnl
-  fi
-
-  AS_VAR_POPDEF([HEADER_VERSION])dnl
-  AS_VAR_POPDEF([TEST_LIBNAME])dnl
-
-  dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
-  if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
-    m4_ifvaln([$1],[$1],[:])dnl
-    m4_ifvaln([$2],[else $2])dnl
-  fi
-
-]) dnl BDB_ENV_GET_VERSION
-
-#############################################################################
-
diff --git a/cmulocal/c-fpic.m4 b/cmulocal/c-fpic.m4
deleted file mode 100644
index b4652fa..0000000
--- a/cmulocal/c-fpic.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-dnl
-dnl $Id: c-fpic.m4,v 1.4 2010/01/06 17:01:27 murch Exp $
-dnl
-
-dnl
-dnl Test for -fPIC
-dnl
-
-AC_DEFUN([CMU_C_FPIC], [
-AC_MSG_CHECKING(if compiler supports -fPIC)
-AC_CACHE_VAL(ac_cv_fpic, [
-save_CFLAGS=$CFLAGS
-CFLAGS="${CFLAGS} -fPIC"
-AC_TRY_COMPILE([
-#include <stdlib.h>
-static void
-foo(void)
-{
-  exit(1);
-}
-],
-[
-],
-ac_cv_fpic=yes,
-ac_cv_fpic=no)
-CFLAGS=$save_CFLAGS
-])
-if test "$ac_cv_fpic" = "yes"; then
-    FPIC_CFLAGS="-fPIC"
-else
-    FPIC_CFLAGS=""
-fi
-AC_MSG_RESULT($ac_cv_fpic)
-])
-
diff --git a/cmulocal/clamav.m4 b/cmulocal/clamav.m4
deleted file mode 100644
index ea798a5..0000000
--- a/cmulocal/clamav.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-dnl
-dnl macros for configure.in to detect clamav library
-dnl $Id: clamav.m4,v 1.2 2005/05/28 02:26:59 shadow Exp $
-dnl
-
-AC_DEFUN([CMU_CLAMAV], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(clamav,[  --with-clamav=PATH	use ClamAV - PATH to clamav-config (yes)],
-	with_clamav=$withval, with_clamav=yes)
-  have_clamav=no
-  if test "$with_clamav" != no; then
-	
-	if test -d $with_clamav; then
-		clamav_path=${with_clamav}:${with_clamav}/bin
-	else
-		clamav_path=/usr/local/bin:/usr/bin:$PATH
-	fi
-	AC_PATH_PROG(CLAMAV_CONFIG,clamav-config,,[$clamav_path])
-
-	if test -x "$CLAMAV_CONFIG"; then
-		LIB_CLAMAV="`$CLAMAV_CONFIG --libs` -lclamav"
-		CFLAGS_CLAMAV=`$CLAMAV_CONFIG --cflags`
-
-		if test -n "$LIB_CLAMAV"; then
-			have_clamav=yes
-			test -n "$CFLAGS_CLAMAV" && CPPFLAGS="$CPPFLAGS $CFLAGS_CLAMAV"
-			AC_DEFINE(HAVE_CLAMAV,[],[Do we have ClamAV?])
-			AC_SUBST(LIB_CLAMAV)
-		fi
-	fi
-   fi
-
-   AC_MSG_CHECKING(ClamAV support)
-   AC_MSG_RESULT($have_clamav)
-])
diff --git a/cmulocal/com_err.m4 b/cmulocal/com_err.m4
deleted file mode 100644
index 6bafedc..0000000
--- a/cmulocal/com_err.m4
+++ /dev/null
@@ -1,28 +0,0 @@
-dnl com_err.m4--com_err detection macro
-dnl Rob Earhart
-dnl $Id: com_err.m4,v 1.6 2003/10/08 20:35:24 rjs3 Exp $
-
-AC_DEFUN([CMU_COMERR], [
-	 cmu_need_compile_et=no
-	 AC_CHECK_PROGS(COMPILE_ET, compile_et, no)
-	 if test "$COMPILE_ET" = no; then
-	    COMPILE_ET="\$(top_builddir)/com_err/compile_et"
-	    cmu_need_to_compile_com_err=yes
-	 fi
-	 AC_CHECK_HEADER(com_err.h,,CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/com_err")
-	 cmu_save_LIBS="$LIBS"
-	 AC_CHECK_LIB(com_err, com_err,
-		      LIB_COMERR="-lcom_err",
-		      LDFLAGS="$LDFLAGS -L`pwd`/com_err"
-			LIB_COMERR="\$(top_builddir)/com_err/libcom_err.la"
-		      cmu_need_to_compile_com_err=yes)
-	 AC_SUBST(LIB_COMERR)
-	 LIBS="$cmu_save_LIBS"
-	 AC_MSG_CHECKING(whether we need to compile com_err)
-	 if test "$cmu_need_to_compile_com_err" = yes; then
-	   AC_MSG_RESULT(yes)
-	   AC_CONFIG_SUBDIRS(com_err)
-	 else
-	   AC_MSG_RESULT(no)
-	 fi
-	 ])
diff --git a/cmulocal/com_err_link.m4 b/cmulocal/com_err_link.m4
deleted file mode 100644
index 5a2f4eb..0000000
--- a/cmulocal/com_err_link.m4
+++ /dev/null
@@ -1,157 +0,0 @@
-dnl damnit, i don't want to figure out if I need to build an integral com_err
-dnl library with the collection, I just want to know where it's installed,
-dnl so don't bitch, Rob...
-dnl Derrick Brashear
-dnl $Id: com_err_link.m4,v 1.9 2006/02/25 18:32:46 cg2v Exp $
-
-
-AC_DEFUN([CMU_COMERR_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([#include <com_err.h>],
-[int foo;],
-ac_cv_found_com_err_inc=yes,
-ac_cv_found_com_err_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_COMERR_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for com_err headers in $i)
-      CMU_COMERR_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, com_err)
-      if test "$ac_cv_found_com_err_inc" = "yes"; then
-        ac_cv_comerr_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-#
-# Test for lib files
-#
-
-AC_DEFUN([CMU_COMERR_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lcom_err"
-AC_TRY_LINK(,
-[com_err();],
-[ac_cv_found_com_err_lib=yes],
-ac_cv_found_com_err_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_COMERR_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for com_err libraries in $i)
-      CMU_COMERR_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, com_err)
-      if test "$ac_cv_found_com_err_lib" = "yes" ; then
-        ac_cv_comerr_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_USE_COMERR], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(comerr,
-	[  --with-comerr=PREFIX      Compile with com_err support],
-	[if test "X$with_comerr" = "X"; then
-		with_comerr=yes
-	fi])
-AC_ARG_WITH(comerr-lib,
-	[  --with-comerr-lib=dir     use com_err libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-comerr-lib])
-	fi])
-AC_ARG_WITH(comerr-include,
-	[  --with-comerr-include=dir use com_err headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-comerr-include])
-	fi])
-
-	if test "X$with_comerr" != "X"; then
-	  if test "$with_comerr" != "yes"; then
-	    ac_cv_comerr_where_lib=$with_comerr/$CMU_LIB_SUBDIR
-	    ac_cv_comerr_where_inc=$with_comerr/include
-	  fi
-	fi
-
-	if test "X$with_comerr_lib" != "X"; then
-	  ac_cv_comerr_where_lib=$with_comerr_lib
-	fi
-	if test "X$ac_cv_comerr_where_lib" = "X"; then
-	  CMU_COMERR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	fi
-
-	if test "X$with_comerr_include" != "X"; then
-	  ac_cv_comerr_where_inc=$with_comerr_include
-	fi
-	if test "X$ac_cv_comerr_where_inc" = "X"; then
-	  CMU_COMERR_INC_WHERE(/usr/athena/include /usr/local/include)
-	fi
-
-	AC_MSG_CHECKING(whether to include com_err)
-	if test "X$ac_cv_comerr_where_lib" = "X" -a "X$ac_cv_comerr_where_inc" = "X"; then
-	  ac_cv_found_com_err=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_com_err=yes
-	  AC_MSG_RESULT(yes)
-	  COMERR_INC_DIR=$ac_cv_comerr_where_inc
-	  COMERR_LIB_DIR=$ac_cv_comerr_where_lib
-	  test "$COMERR_INC_DIR"  && COMERR_INC_FLAGS="-I${COMERR_INC_DIR}"
-	  COMERR_LIB_FLAGS="-lcom_err"
-	  test "$COMERR_LIB_DIR"  && COMERR_LIB_FLAGS="-L${COMERR_LIB_DIR} -lcom_err"
-          dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
-          dnl Allow makefile substitutions....
-          AC_SUBST(COMERR_INC_FLAGS)
-          AC_SUBST(COMERR_LIB_FLAGS)
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${COMERR_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${COMERR_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${COMERR_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${COMERR_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${COMERR_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${COMERR_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${COMERR_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${COMERR_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${COMERR_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/db.m4 b/cmulocal/db.m4
deleted file mode 100644
index ebc1a89..0000000
--- a/cmulocal/db.m4
+++ /dev/null
@@ -1,46 +0,0 @@
-dnl $Id: db.m4,v 1.2 2004/02/14 21:16:18 cg2v Exp $
-dnl
-dnl tests for various db libraries
-dnl
-AC_DEFUN([rk_DB],[berkeley_db=db
-AC_ARG_WITH(berkeley-db,
-[  --without-berkeley-db   if you don't want berkeley db],[
-if test "$withval" = no; then
-	berkeley_db=""
-fi
-])
-if test "$berkeley_db"; then
-  AC_CHECK_HEADERS([				\
-	db.h					\
-	db_185.h				\
-  ])
-fi
-
-AC_FIND_FUNC_NO_LIBS2(dbopen, $berkeley_db, [
-#include <stdio.h>
-#if defined(HAVE_DB_185_H)
-#include <db_185.h>
-#elif defined(HAVE_DB_H)
-#include <db.h>
-#endif
-],[NULL, 0, 0, 0, NULL])
-
-AC_FIND_FUNC_NO_LIBS(dbm_firstkey, $berkeley_db gdbm ndbm)
-AC_FIND_FUNC_NO_LIBS2(db_create, $berkeley_db, [
-#include <stdio.h>
-#if defined(HAVE_DB_H)
-#include <db.h>
-#endif
-],[NULL, NULL, 0])
-
-
-DBLIB="$LIB_dbopen"
-if test "$LIB_dbopen" != "$LIB_db_create"; then
-        DBLIB="$DBLIB $LIB_db_create"
-fi
-if test "$LIB_dbopen" != "$LIB_dbm_firstkey"; then
-	DBLIB="$DBLIB $LIB_dbm_firstkey"
-fi
-AC_SUBST(DBLIB)dnl
-
-])
diff --git a/cmulocal/find-func-no-libs.m4 b/cmulocal/find-func-no-libs.m4
deleted file mode 100644
index 523fda3..0000000
--- a/cmulocal/find-func-no-libs.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl $Id: find-func-no-libs.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
-dnl
-dnl
-dnl Look for function in any of the specified libraries
-dnl
-
-dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
-AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [
-AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
diff --git a/cmulocal/find-func-no-libs2.m4 b/cmulocal/find-func-no-libs2.m4
deleted file mode 100644
index 8202b5d..0000000
--- a/cmulocal/find-func-no-libs2.m4
+++ /dev/null
@@ -1,61 +0,0 @@
-dnl $Id: find-func-no-libs2.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
-dnl
-dnl
-dnl Look for function in any of the specified libraries
-dnl
-
-dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
-AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [
-
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(ac_cv_funclib_$1,
-[
-if eval "test \"\$ac_cv_func_$1\" != yes" ; then
-	ac_save_LIBS="$LIBS"
-	for ac_lib in $2; do
-		if test -n "$ac_lib"; then 
-			ac_lib="-l$ac_lib"
-		else
-			ac_lib=""
-		fi
-		LIBS="$6 $ac_lib $5 $ac_save_LIBS"
-		AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
-	done
-	eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
-	LIBS="$ac_save_LIBS"
-fi
-])
-
-eval "ac_res=\$ac_cv_funclib_$1"
-
-if false; then
-	AC_CHECK_FUNCS($1)
-dnl	AC_CHECK_LIBS($2, foo)
-fi
-# $1
-ac_tr_func=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-ac_tr_lib=HAVE_LIB_`echo $ac_res |sed 's/-l//' | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-eval "LIB_$1=$ac_res"
-
-case "$ac_res" in
-	yes)
-	eval "ac_cv_func_$1=yes"
-	eval "LIB_$1="
-	AC_DEFINE_UNQUOTED($ac_tr_func)
-	AC_MSG_RESULT([yes])
-	;;
-	no)
-	eval "ac_cv_func_$1=no"
-	eval "LIB_$1="
-	AC_MSG_RESULT([no])
-	;;
-	*)
-	eval "ac_cv_func_$1=yes"
-	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
-	AC_DEFINE_UNQUOTED($ac_tr_func)
-	AC_DEFINE_UNQUOTED($ac_tr_lib)
-	AC_MSG_RESULT([yes, in $ac_res])
-	;;
-esac
-AC_SUBST(LIB_$1)
-])
diff --git a/cmulocal/find-func.m4 b/cmulocal/find-func.m4
deleted file mode 100644
index 38d7616..0000000
--- a/cmulocal/find-func.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl $Id: find-func.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
-dnl
-dnl AC_FIND_FUNC(func, libraries, includes, arguments)
-AC_DEFUN([AC_FIND_FUNC], [
-AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
-if test -n "$LIB_$1"; then
-	LIBS="$LIB_$1 $LIBS"
-fi
-])
diff --git a/cmulocal/heimdal.m4 b/cmulocal/heimdal.m4
deleted file mode 100644
index 7286744..0000000
--- a/cmulocal/heimdal.m4
+++ /dev/null
@@ -1,197 +0,0 @@
-dnl kerberos_v5.m4--Kerberos 5 libraries and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: heimdal.m4,v 1.9 2005/04/26 19:14:07 shadow Exp $
-
-AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_keyblock foo;],
-ac_cv_found_libheimdal_inc=yes,
-ac_cv_found_libheimdal_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for heimdal headers in $i)
-      CMU_LIBHEIMDAL_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, krb5)
-      if test "$ac_cv_found_libheimdal_inc" = "yes"; then
-        ac_cv_libheimdal_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-#
-# Test for kerberos lib files
-#
-
-AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE1], [
-AC_REQUIRE([CMU_SOCKETS])
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lkadm5clnt -lkrb5 -lasn1 -lkadm5clnt -lroken $LIB_SOCKET"
-AC_TRY_LINK(,
-[krb5_get_in_tkt();],
-[ac_cv_found_libheimdal_lib=yes],
-ac_cv_found_libheimdal_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for heimdal libraries in $i)
-      CMU_LIBHEIMDAL_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, krb5)
-      if test "$ac_cv_found_libheimdal_lib" = "yes" ; then
-        ac_cv_libheimdal_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBHEIMDAL_LIBDES], [
-  AC_REQUIRE([CMU_LIBSSL])
-  cmu_save_LIBS=$LIBS
-  AC_MSG_CHECKING([if libdes is needed])
-  AC_TRY_LINK([],[des_quad_cksum();],HEIM_DES_LIB="",HEIM_DES_LIB="maybe")
-  if test "X$HEIM_DES_LIB" != "X"; then
-      LIBS="$cmu_save_LIBS -L$1 -ldes"
-      AC_TRY_LINK([], [des_quad_cksum();],HEIM_DES_LIB="yes")
-      if test "X$HEIM_DES_LIB" = "Xyes"; then
-          AC_MSG_RESULT([yes])
-          HEIM_LIBDES="-ldes"
-          HEIM_LIBDESA="$1/libdes.a"
-      else
-          LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
-          AC_TRY_LINK([],
-          [des_quad_cksum();],HEIM_DES_LIB="libcrypto")
-          if test "X$HEIM_DES_LIB" = "Xlibcrypto"; then
-              AC_MSG_RESULT([libcrypto])
-              HEIM_LIBDES="$LIBSSL_LIB_FLAGS"
-              HEIM_LIBDESA="$LIBSSL_LIB_FLAGS"
-          else
-              LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-              AC_TRY_LINK([],
-              [des_quad_cksum();],HEIM_DES_LIB="libcrypto+descompat")
-              if test "X$HEIM_DES_LIB" = "Xlibcrypto+descompat"; then
-                  AC_MSG_RESULT([libcrypto+descompat])
-                  HEIM_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-                  HEIM_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-              else
-                  AC_MSG_RESULT([unknown])
-                  AC_MSG_ERROR([Could not use -ldes])
-              fi 
-          fi 
-      fi 
-  else
-     AC_MSG_RESULT([no])
-  fi
-])
-
-AC_DEFUN([CMU_LIBHEIMDAL], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_USE_COMERR])
-AC_ARG_WITH(LIBHEIMDAL,
-	[  --with-libheimdal=PREFIX      Compile with Heimdal support],
-	[if test "X$with_libheimdal" = "X"; then
-		with_libheimdal=yes
-	fi])
-AC_ARG_WITH(libheimdal-lib,
-	[  --with-libheimdal-lib=dir     use heimdal libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libheimdal-lib])
-	fi])
-AC_ARG_WITH(libheimdal-include,
-	[  --with-libheimdal-include=dir use heimdal headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libheimdal-include])
-	fi])
-
-	if test "X$with_libheimdal" != "X"; then
-	  if test "$with_libheimdal" != "yes" -a "$with_libheimdal" != "no"; then
-	    ac_cv_libheimdal_where_lib=$with_libheimdal/$CMU_LIB_SUBDIR
-	    ac_cv_libheimdal_where_inc=$with_libheimdal/include
-	  fi
-	fi
-
-	if test "$with_libheimdal" != "no"; then
-	  if test "X$with_libheimdal_lib" != "X"; then
-	    ac_cv_libheimdal_where_lib=$with_libheimdal_lib
-	  fi
-	  if test "X$ac_cv_libheimdal_where_lib" = "X"; then
-	    CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	  fi
-
-	  if test "X$with_libheimdal_include" != "X"; then
-	    ac_cv_libheimdal_where_inc=$with_libheimdal_include
-	  fi
-	  if test "X$ac_cv_libheimdal_where_inc" = "X"; then
-	    CMU_LIBHEIMDAL_INC_WHERE(/usr/athena/include /usr/heimdal/include /usr/local/include)
-	  fi
-	fi
-
-	AC_MSG_CHECKING(whether to include heimdal)
-	if test "X$ac_cv_libheimdal_where_lib" = "X" -a "X$ac_cv_libheimdal_where_inc" = "X"; then
-	  ac_cv_found_libheimdal=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_libheimdal=yes
-	  AC_MSG_RESULT(yes)
-	  LIBHEIMDAL_INC_DIR=$ac_cv_libheimdal_where_inc
-	  LIBHEIMDAL_LIB_DIR=$ac_cv_libheimdal_where_lib
-	  CMU_LIBHEIMDAL_LIBDES($LIBHEIMDAL_LIB_DIR)
-	  LIBHEIMDAL_INC_FLAGS="-I${LIBHEIMDAL_INC_DIR}"
-	  LIBHEIMDAL_LIB_FLAGS="-L${LIBHEIMDAL_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET"
-	  AC_SUBST(LIBHEIMDAL_INC_FLAGS)
-	  AC_SUBST(LIBHEIMDAL_LIB_FLAGS)
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${LIBHEIMDAL_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${LIBHEIMDAL_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${LIBHEIMDAL_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/init_automake.m4 b/cmulocal/init_automake.m4
deleted file mode 100644
index e643d70..0000000
--- a/cmulocal/init_automake.m4
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl init_automake.m4--cmulocal automake setup macro
-dnl Rob Earhart
-dnl $Id: init_automake.m4,v 1.4 2003/10/08 20:35:24 rjs3 Exp $
-
-AC_DEFUN([CMU_INIT_AUTOMAKE], [
-	AC_REQUIRE([AM_INIT_AUTOMAKE])
-	ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
-	])
diff --git a/cmulocal/kafs.m4 b/cmulocal/kafs.m4
deleted file mode 100644
index 8b89cfd..0000000
--- a/cmulocal/kafs.m4
+++ /dev/null
@@ -1,167 +0,0 @@
-dnl kerberos_v4.m4--Kafs libraries and includes
-dnl Derrick Brashear
-dnl from KTH kafs and Arla
-dnl $Id: kafs.m4,v 1.7 2005/04/26 19:14:07 shadow Exp $
-
-AC_DEFUN([CMU_KAFS_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([
-#include <krb.h>
-#include <sys/ioctl.h>
-#include <kafs.h>
-],
-[struct ClearToken foo;],
-ac_cv_found_kafs_inc=yes,
-ac_cv_found_kafs_inc=no)
-if test "$ac_cv_found_kafs_inc" = "no"; then
-  CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
-  AC_TRY_COMPILE([
-#include <krb.h>
-#include <sys/ioctl.h>
-#include <kafs.h>
-],
-  [struct ClearToken foo;],
-  [ac_cv_found_kafs_inc=yes],
-  ac_cv_found_kafs_inc=no)
-fi
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_KAFS_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for kafs headers in $i)
-      CMU_KAFS_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, kafs)
-      if test "$ac_cv_found_kafs_inc" = "yes"; then
-        ac_cv_kafs_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_KAFS_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lkafs $KRB_LIB_FLAGS $KRB5_LIB_FLAGS"
-AC_TRY_LINK(,
-[krb_afslog();],
-[ac_cv_found_kafs_lib=yes],
-ac_cv_found_kafs_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_KAFS_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for kafs libraries in $i)
-      CMU_KAFS_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, kafs)
-      if test "$ac_cv_found_kafs_lib" = "yes" ; then
-        ac_cv_kafs_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_KAFS], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_KRB4])
-AC_REQUIRE([CMU_KRB5])
-AC_ARG_WITH(kafs,
-	[  --with-kafs=PREFIX      Compile with Kafs support],
-	[if test "X$with_kafs" = "X"; then
-		with_kafs=yes
-	fi])
-AC_ARG_WITH(kafs-lib,
-	[  --with-kafs-lib=dir     use kafs libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-kafs-lib])
-	fi])
-AC_ARG_WITH(kafs-include,
-	[  --with-kafs-include=dir use kafs headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-kafs-include])
-	fi])
-
-	if test "X$with_kafs" != "X"; then
-	  if test "$with_kafs" != "yes" -a "$with_kafs" != no; then
-	    ac_cv_kafs_where_lib=$with_kafs/$CMU_LIB_SUBDIR
-	    ac_cv_kafs_where_inc=$with_kafs/include
-	  fi
-	fi
-
-	if test "$with_kafs" != "no"; then 
-	  if test "X$with_kafs_lib" != "X"; then
-	    ac_cv_kafs_where_lib=$with_kafs_lib
-	  fi
-	  if test "X$ac_cv_kafs_where_lib" = "X"; then
-	    CMU_KAFS_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
-	  fi
-
-	  if test "X$with_kafs_include" != "X"; then
-	    ac_cv_kafs_where_inc=$with_kafs_include
-	  fi
-	  if test "X$ac_cv_kafs_where_inc" = "X"; then
-	    CMU_KAFS_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
-	  fi
-	fi
-
-	AC_MSG_CHECKING(whether to include kafs)
-	if test "X$ac_cv_kafs_where_lib" = "X" -a "X$ac_cv_kafs_where_inc" = "X"; then
-	  ac_cv_found_kafs=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_kafs=yes
-	  AC_MSG_RESULT(yes)
-	  KAFS_INC_DIR=$ac_cv_kafs_where_inc
-	  KAFS_LIB_DIR=$ac_cv_kafs_where_lib
-	  KAFS_INC_FLAGS="-I${KAFS_INC_DIR}"
-	  KAFS_LIB_FLAGS="-L${KAFS_LIB_DIR} -lkafs"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${KAFS_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KAFS_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${KAFS_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KAFS_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${KAFS_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KAFS_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${KAFS_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${KAFS_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${KAFS_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/kerberos_v4.m4 b/cmulocal/kerberos_v4.m4
deleted file mode 100644
index 8c3be39..0000000
--- a/cmulocal/kerberos_v4.m4
+++ /dev/null
@@ -1,285 +0,0 @@
-dnl kerberos_v4.m4--Kerberos 4 libraries and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: kerberos_v4.m4,v 1.28 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_KRB_SENDAUTH_PROTO], [
-AC_MSG_CHECKING(for krb_sendauth prototype)
-AC_TRY_COMPILE(
-[#include <krb.h>
-int krb_sendauth (long options, int fd, KTEXT ktext, char *service,
-                  char *inst, char *realm, u_long checksum,
-                  MSG_DAT *msg_data, CREDENTIALS *cred,
-                  Key_schedule schedule, struct sockaddr_in *laddr,
-                  struct sockaddr_in *faddr, char *version);],
-[int foo = krb_sendauth(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ],
-ac_cv_krb_sendauth_proto=no,
-ac_cv_krb_sendauth_proto=yes)
-AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
-if test "$ac_cv_krb_sendauth_proto" = yes; then
-        AC_DEFINE(HAVE_KRB_SENDAUTH_PROTO)dnl
-fi
-AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
-])
-
-AC_DEFUN([CMU_KRB_SET_KEY_PROTO], [
-AC_MSG_CHECKING(for krb_set_key prototype)
-AC_CACHE_VAL(ac_cv_krb_set_key_proto, [
-cmu_save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
-AC_TRY_COMPILE(
-[#include <krb.h>
-int krb_set_key(char *key, int cvt);],
-[int foo = krb_set_key(0, 0);],
-ac_cv_krb_set_key_proto=no,
-ac_cv_krb_set_key_proto=yes)
-])
-CPPFLAGS="${cmu_save_CPPFLAGS}"
-if test "$ac_cv_krb_set_key_proto" = yes; then
-	AC_DEFINE(HAVE_KRB_SET_KEY_PROTO)dnl
-fi
-AC_MSG_RESULT($ac_cv_krb_set_key_proto)
-])
-
-AC_DEFUN([CMU_KRB4_32_DEFN], [
-AC_MSG_CHECKING(for KRB4_32 definition)
-AC_CACHE_VAL(ac_cv_krb4_32_defn, [
-cmu_save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
-AC_TRY_COMPILE(
-[#include <krb.h>
-],
-[KRB4_32 foo = 1;],
-ac_cv_krb4_32_defn=yes,
-ac_cv_krb4_32_defn=no)
-])
-CPPFLAGS="${cmu_save_CPPFLAGS}"
-if test "$ac_cv_krb4_32_defn" = yes; then
-	AC_DEFINE(HAVE_KRB4_32_DEFINE)dnl
-fi
-AC_MSG_RESULT($ac_cv_krb4_32_defn)
-])
-
-AC_DEFUN([CMU_KRB_RD_REQ_PROTO], [
-AC_MSG_CHECKING(for krb_rd_req prototype)
-AC_CACHE_VAL(ac_cv_krb_rd_req_proto, [
-cmu_save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
-AC_TRY_COMPILE(
-[#include <krb.h>
-int krb_rd_req(KTEXT authent, char *service, char *instance,
-unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn);],
-[int foo = krb_rd_req(0,0,0,0,0,0);],
-ac_cv_krb_rd_req_proto=no,
-ac_cv_krb_rd_req_proto=yes)
-])
-CPPFLAGS="${cmu_save_CPPFLAGS}"
-if test "$ac_cv_krb_rd_req_proto" = yes; then
-	AC_DEFINE(HAVE_KRB_RD_REQ_PROTO)dnl
-fi
-AC_MSG_RESULT($ac_cv_krb_rd_req_proto)
-])
-
-AC_DEFUN([CMU_KRB_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([#include <krb.h>],
-[struct ktext foo;],
-ac_cv_found_krb_inc=yes,
-ac_cv_found_krb_inc=no)
-if test "$ac_cv_found_krb_inc" = "no"; then
-  CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
-  AC_TRY_COMPILE([#include <krb.h>],
-  [struct ktext foo;],
-  [ac_cv_found_krb_inc=yes],
-  ac_cv_found_krb_inc=no)
-fi
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_KRB_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for kerberos headers in $i)
-      CMU_KRB_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, krb)
-      if test "$ac_cv_found_krb_inc" = "yes"; then
-        ac_cv_krb_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-#
-# Test for kerberos lib files
-#
-
-AC_DEFUN([CMU_KRB_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lkrb ${KRB_LIBDES}"
-AC_TRY_LINK(,
-[dest_tkt();],
-[ac_cv_found_krb_lib=yes],
-ac_cv_found_krb_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_KRB_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for kerberos libraries in $i)
-      CMU_KRB_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, krb)
-      if test "$ac_cv_found_krb_lib" = "yes" ; then
-        ac_cv_krb_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_KRB4], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_LIBSSL])
-AC_ARG_WITH(krb4,
-	[  --with-krb4=PREFIX      Compile with Kerberos 4 support],
-	[if test "X$with_krb4" = "X"; then
-		with_krb4=yes
-	fi])
-AC_ARG_WITH(krb4-lib,
-	[  --with-krb4-lib=dir     use kerberos 4 libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-krb4-lib])
-	fi])
-AC_ARG_WITH(krb4-include,
-	[  --with-krb4-include=dir use kerberos 4 headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-krb4-include])
-	fi])
-
-	if test "X$with_krb4" != "X"; then
-	  if test "$with_krb4" != "yes" -a "$with_krb4" != "no"; then
-	    ac_cv_krb_where_lib=$with_krb4/$CMU_LIB_SUBDIR
-	    ac_cv_krb_where_inc=$with_krb4/include
-	  fi
-	fi
-       
-	if test "$with_krb4" != "no"; then
-	  if test "X$with_krb4_lib" != "X"; then
-	    ac_cv_krb_where_lib=$with_krb4_lib
-	  fi
-	  if test "X$with_krb4_include" != "X"; then
-	    ac_cv_krb_where_inc=$with_krb4_include
-	  fi
-	  if test "X$ac_cv_krb_where_inc" = "X"; then
-	    CMU_KRB_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
-	  fi
-
-          AC_MSG_CHECKING([if libdes is needed])
-          AC_TRY_LINK([],[des_quad_cksum();],KRB_DES_LIB="",KRB_DES_LIB="maybe")
-          if test "X$KRB_DES_LIB" != "X"; then
-              LIBS="$cmu_save_LIBS -ldes"
-              AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="yes")
-              if test "X$KRB_DES_LIB" = "Xyes"; then
-                  AC_MSG_RESULT([yes])
-                  KRB_LIBDES="-ldes"
-                  KRB_LIBDESA='$(KRB_LIB_DIR)/libdes.a'
-              else
-                  LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
-                  AC_TRY_LINK([],
-                  [des_quad_cksum();],KRB_DES_LIB="libcrypto")
-                  if test "X$KRB_DES_LIB" = "Xlibcrypto"; then
-                      AC_MSG_RESULT([libcrypto])
-                      KRB_LIBDES="$LIBSSL_LIB_FLAGS"
-                      KRB_LIBDESA="$LIBSSL_LIB_FLAGS"
-                  else
-                      LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-                      AC_TRY_LINK([],
-                      [des_quad_cksum();],KRB_DES_LIB="libcrypto+descompat")
-                      if test "X$KRB_DES_LIB" = "Xlibcrypto+descompat"; then
-                          AC_MSG_RESULT([libcrypto+descompat])
-                          KRB_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-                          KRB_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
-                      else
-                          AC_MSG_RESULT([unknown])
-                          AC_MSG_ERROR([Could not use -ldes])
-                      fi 
-                  fi 
-              fi 
-          else
-             AC_MSG_RESULT([no])
-          fi
-          if test "X$ac_cv_krb_where_lib" = "X"; then
-            CMU_KRB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
-          fi
-	fi
-	  LIBS="${cmu_save_LIBS}"
-
-
-	AC_MSG_CHECKING([whether to include kerberos 4])
-	if test "X$ac_cv_krb_where_lib" = "X" -o "X$ac_cv_krb_where_inc" = "X"; then
-	  ac_cv_found_krb=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_krb=yes
-	  AC_MSG_RESULT(yes)
-	  KRB_INC_DIR=$ac_cv_krb_where_inc
-	  KRB_LIB_DIR=$ac_cv_krb_where_lib
-	  KRB_INC_FLAGS="-I${KRB_INC_DIR}"
-	  KRB_LIB_FLAGS="-L${KRB_LIB_DIR} -lkrb ${KRB_LIBDES}"
-	  LIBS="${cmu_save_LIBS} ${KRB_LIB_FLAGS}"
-	  AC_CHECK_LIB(resolv, dns_lookup, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lresolv",,"${KRB_LIB_FLAGS}")
-	  AC_CHECK_LIB(crypt, crypt, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lcrypt",,"${KRB_LIB_FLAGS}")
-	  LIBS="${LIBS} ${KRB_LIB_FLAGS}"
-	  AC_CHECK_FUNCS(krb_get_int krb_life_to_time)
-          AC_SUBST(KRB_INC_FLAGS)
-          AC_SUBST(KRB_LIB_FLAGS)
-	  LIBS="${cmu_save_LIBS}"
-	  AC_DEFINE(HAVE_KRB4,,[Kerberos V4 is present])dnl zephyr uses this
-	  AC_DEFINE(KERBEROS,,[Use kerberos 4. find out what needs this symbol])
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KRB_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${KRB_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KRB_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KRB_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${KRB_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${KRB_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${KRB_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/kerberos_v5.m4 b/cmulocal/kerberos_v5.m4
deleted file mode 100644
index a523af0..0000000
--- a/cmulocal/kerberos_v5.m4
+++ /dev/null
@@ -1,185 +0,0 @@
-dnl kerberos_v5.m4--Kerberos 5 libraries and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: kerberos_v5.m4,v 1.9 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_KRB5_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_keyblock foo;],
-ac_cv_found_krb5_inc=yes,
-ac_cv_found_krb5_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_KRB5_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for krb5 headers in $i)
-      CMU_KRB5_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, krb5)
-      if test "$ac_cv_found_krb5_inc" = "yes"; then
-        ac_cv_krb5_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-#
-# Test for kerberos lib files
-#
-
-AC_DEFUN([CMU_KRB5_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lkrb5 -lk5crypto"
-AC_TRY_LINK(,
-[krb5_get_in_tkt();],
-[ac_cv_found_krb5_lib=yes],
-ac_cv_found_krb5_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_KRB5_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for krb5 libraries in $i)
-      CMU_KRB5_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, krb5)
-      if test "$ac_cv_found_krb5_lib" = "yes" ; then
-        ac_cv_krb5_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_KRB5], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_USE_COMERR])
-AC_ARG_WITH(krb5,
-	[  --with-krb5=PREFIX      Compile with Kerberos 5 support],
-	[if test "X$with_krb5" = "X"; then
-		with_krb5=yes
-	fi])
-AC_ARG_WITH(krb5-lib,
-	[  --with-krb5-lib=dir     use kerberos 5 libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-krb5-lib])
-	fi])
-AC_ARG_WITH(krb5-include,
-	[  --with-krb5-include=dir use kerberos 5 headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-krb5-include])
-	fi])
-AC_ARG_WITH(krb5-impl,
-	[  --with-krb5-impl=heimdal use heimdal kerberos 5 libraries
-  --with-krb5-impl=mit     use MIT kerberos 5 libraries],
-	[if test "$withval" != "heimdal" -a "$withval" != "mit"; then
-		AC_MSG_ERROR([Invalid argument for --with-krb5-impl])
-	fi])
-
-	if test "X$with_krb5" != "X"; then
-	  if test "$with_krb5" != "yes" -a "$with_krb5" != "no"; then
-	    ac_cv_krb5_where_lib=$with_krb5/$CMU_LIB_SUBDIR
-	    ac_cv_krb5_where_inc=$with_krb5/include
-	    ac_cv_krb5_impl=mit
-	  fi
-	fi
-
-	if test "$with_krb5" != "no"; then
-	  if test "X$with_krb5_lib" != "X"; then
-	    ac_cv_krb5_where_lib=$with_krb5_lib
-	    ac_cv_krb5_impl=mit
-	  fi
-	  if test "X$with_krb5_impl" != "X"; then
-	    ac_cv_krb5_impl=$with_krb5_impl
-	  fi
-	  if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xheimdal"; then
-	    CMU_KRB5_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	    if test "X$ac_cv_krb5_where_lib" != "X"; then
-              ac_cv_krb5_impl=mit
-	    fi
-	  fi
-	  if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xmit"; then
-	    CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	    if test "X$ac_cv_libheimdal_where_lib" != "X"; then
-	      ac_cv_krb5_where_lib=$ac_cv_libheimdal_where_lib
-	      ac_cv_krb5_impl=heimdal
-	    fi
-	  fi
-
-	  if test "X$with_krb5_include" != "X"; then
-	    ac_cv_krb5_where_inc=$with_krb5_include
-	  fi
-	  if test "X$ac_cv_krb5_where_inc" = "X"; then
-	    CMU_KRB5_INC_WHERE(/usr/athena/include /usr/include/kerberos /usr/local/include /usr/include)
-	  fi
-	fi
-
-	AC_MSG_CHECKING(whether to include kerberos 5)
-	if test "X$ac_cv_krb5_where_lib" = "X" -o "X$ac_cv_krb5_where_inc" = "X"; then
-	  ac_cv_found_krb5=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_krb5=yes
-	  AC_MSG_RESULT(yes)
-	  KRB5_INC_DIR=$ac_cv_krb5_where_inc
-	  KRB5_LIB_DIR=$ac_cv_krb5_where_lib
-	  if test "X$ac_cv_krb5_impl" != "Xheimdal"; then
-	    KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkrb5 -lk5crypto"
-	  else
-	    CMU_LIBHEIMDAL_LIBDES($KRB5_LIB_DIR)
-	    KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET"
-	    AC_DEFINE(HEIMDAL,,[we found heimdal krb5 and not MIT krb5])
-	  fi
-	  KRB5_INC_FLAGS="-I${KRB5_INC_DIR}"
-	  AC_SUBST(KRB5_INC_FLAGS)
-	  AC_SUBST(KRB5_LIB_FLAGS)
-	  AC_DEFINE(HAVE_KRB5,,[Kerberos V5 is present])dnl zephyr uses this
-	  AC_DEFINE(KRB5,,[Use Kerberos 5. (maybe find what needs this and nuke it)])
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KRB5_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${KRB5_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KRB5_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${KRB5_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${KRB5_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${KRB5_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${KRB5_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/libXau.m4 b/cmulocal/libXau.m4
deleted file mode 100644
index 1000811..0000000
--- a/cmulocal/libXau.m4
+++ /dev/null
@@ -1,147 +0,0 @@
-dnl $Id: libXau.m4,v 1.5 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_XAU_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE([
-#include <X11/Xauth.h>
-],
-[Xauth foo;],
-ac_cv_found_Xau_inc=yes,
-ac_cv_found_Xau_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_XAU_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for Xau headers in $i)
-      CMU_XAU_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, X11/Xauth)
-      if test "$ac_cv_found_Xau_inc" = "yes"; then
-        ac_cv_Xau_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_XAU_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lXau $LIB_SOCKET"
-AC_TRY_LINK(,
-[XauDisposeAuth();],
-[ac_cv_found_Xau_lib=yes],
-ac_cv_found_Xau_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_XAU_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for Xau libraries in $i)
-      CMU_XAU_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, Xau)
-      if test "$ac_cv_found_Xau_lib" = "yes" ; then
-        ac_cv_Xau_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_XAU], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_ARG_WITH(Xau,
-	[  --with-Xau=PREFIX      Compile with Xau support],
-	[if test "X$with_Xau" = "X"; then
-		with_Xau=yes
-	fi])
-AC_ARG_WITH(Xau-lib,
-	[  --with-Xau-lib=dir     use Xau libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-Xau-lib])
-	fi])
-AC_ARG_WITH(Xau-include,
-	[  --with-Xau-include=dir use Xau headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-Xau-include])
-	fi])
-
-	if test "X$with_Xau" != "X"; then
-	  if test "$with_Xau" != "yes"; then
-	    ac_cv_Xau_where_lib=$with_Xau/$CMU_LIB_SUBDIR
-	    ac_cv_Xau_where_inc=$with_Xau/include
-	  fi
-	fi
-
-	if test "X$with_Xau_lib" != "X"; then
-	  ac_cv_Xau_where_lib=$with_Xau_lib
-	fi
-	if test "X$ac_cv_Xau_where_lib" = "X"; then
-	  CMU_XAU_LIB_WHERE(/usr/X11R6/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/openwin/$CMU_LIB_SUBDIR)
-	fi
-
-	if test "X$with_Xau_include" != "X"; then
-	  ac_cv_Xau_where_inc=$with_Xau_include
-	fi
-	if test "X$ac_cv_Xau_where_inc" = "X"; then
-	  CMU_XAU_INC_WHERE(/usr/X11R6/include /usr/local/include /usr/openwin/include)
-	fi
-
-	AC_MSG_CHECKING(whether to include Xau)
-	if test "X$ac_cv_Xau_where_lib" = "X" -a "X$ac_cv_Xau_where_inc" = "X"; then
-	  ac_cv_found_Xau=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_Xau=yes
-	  AC_MSG_RESULT(yes)
-	  XAU_INC_DIR=$ac_cv_Xau_where_inc
-	  XAU_LIB_DIR=$ac_cv_Xau_where_lib
-	  XAU_INC_FLAGS="-I${XAU_INC_DIR}"
-	  XAU_LIB_FLAGS="-L${XAU_LIB_DIR} -lXau"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${XAU_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${XAU_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${XAU_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${XAU_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${XAU_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${XAU_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${XAU_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${XAU_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${XAU_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/libcyrus.m4 b/cmulocal/libcyrus.m4
deleted file mode 100644
index 1b142dc..0000000
--- a/cmulocal/libcyrus.m4
+++ /dev/null
@@ -1,155 +0,0 @@
-dnl libcyrus.m4--Cyrus libraries and includes
-dnl Derrick Brashear
-dnl from KTH kafs and Arla
-dnl $Id: libcyrus.m4,v 1.20 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_LIBCYRUS_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1 $SASLFLAGS"
-CMU_CHECK_HEADER_NOCACHE(cyrus/imclient.h,
-ac_cv_found_cyrus_inc=yes,
-ac_cv_found_cyrus_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_LIBCYRUS_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libcyrus headers in $i)
-      CMU_LIBCYRUS_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, imclient)
-      if test "$ac_cv_found_cyrus_inc" = "yes"; then
-        ac_cv_cyrus_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lcyrus ${LIB_SASL} ${LIBSSL_LIB_FLAGS} ${LIB_SOCKET}"
-AC_TRY_LINK([void fatal(){}],
-[imclient_authenticate();],
-[ac_cv_found_cyrus_lib=yes],
-ac_cv_found_cyrus_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libcyrus libraries in $i)
-      CMU_LIBCYRUS_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, cyrus)
-      if test "$ac_cv_found_cyrus_lib" = "yes" ; then
-        ac_cv_cyrus_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBCYRUS], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_SASL2])
-AC_REQUIRE([CMU_LIBSSL])
-AC_ARG_WITH(libcyrus,
-	[  --with-libcyrus=PREFIX      Compile with Libcyrus support],
-	[if test "X$with_libcyrus" = "X"; then
-		with_libcyrus=yes
-	fi])
-AC_ARG_WITH(libcyrus-lib,
-	[  --with-libcyrus-lib=dir     use libcyrus libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libcyrus-lib])
-	fi])
-AC_ARG_WITH(libcyrus-include,
-	[  --with-libcyrus-include=dir use libcyrus headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libcyrus-include])
-	fi])
-
-	if test "X$with_libcyrus" != "X"; then
-	  if test "$with_libcyrus" != "yes" -a "$with_libcyrus" != no; then
-	    ac_cv_cyrus_where_lib=$with_libcyrus/$CMU_LIB_SUBDIR
-	    ac_cv_cyrus_where_inc=$with_libcyrus/include
-	  fi
-	fi
-
-	if test "$with_libcyrus" != "no"; then 
-	  if test "X$with_libcyrus_lib" != "X"; then
-	    ac_cv_cyrus_where_lib=$with_libcyrus_lib
-	  fi
-	  if test "X$ac_cv_cyrus_where_lib" = "X"; then
-	    CMU_LIBCYRUS_LIB_WHERE(/usr/cyrus/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
-	  fi
-
-	  if test "X$with_libcyrus_include" != "X"; then
-	    ac_cv_cyrus_where_inc=$with_libcyrus_include
-	  fi
-	  if test "X$ac_cv_cyrus_where_inc" = "X"; then
-	    CMU_LIBCYRUS_INC_WHERE(/usr/cyrus/include /usr/local/include /usr/local/include/cyrus /usr/include/cyrus)
-	  fi
-	fi
-
-	AC_MSG_CHECKING(whether to include libcyrus)
-	if test "X$ac_cv_cyrus_where_lib" = "X" -o "X$ac_cv_cyrus_where_inc" = "X"; then
-	  ac_cv_found_cyrus=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_cyrus=yes
-	  AC_MSG_RESULT(yes)
-	  LIBCYRUS_INC_DIR=$ac_cv_cyrus_where_inc
-	  LIBCYRUS_LIB_DIR=$ac_cv_cyrus_where_lib
-	  LIBCYRUS_INC_FLAGS="-I${LIBCYRUS_INC_DIR}"
-	  LIBCYRUS_LIB_FLAGS="-L${LIBCYRUS_LIB_DIR} -lcyrus"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${LIBCYRUS_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${LIBCYRUS_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${LIBCYRUS_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	AC_SUBST(LIBCYRUS_INC_DIR)
-	AC_SUBST(LIBCYRUS_LIB_DIR)
-	AC_SUBST(LIBCYRUS_INC_FLAGS)
-	AC_SUBST(LIBCYRUS_LIB_FLAGS)
-	])
-
diff --git a/cmulocal/libloguse.m4 b/cmulocal/libloguse.m4
deleted file mode 100644
index ca3e901..0000000
--- a/cmulocal/libloguse.m4
+++ /dev/null
@@ -1,103 +0,0 @@
-dnl libloguse.m4--LOGUSE libraries and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: libloguse.m4,v 1.7 2006/02/25 18:26:22 cg2v Exp $
-
-AC_DEFUN([CMU_LOGUSE_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lloguse"
-AC_TRY_LINK(,
-[loguse("","","");],
-[ac_cv_found_loguse_lib=yes],
-ac_cv_found_loguse_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_LOGUSE_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for loguse library in $i)
-      CMU_LOGUSE_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, loguse)
-      if test "$ac_cv_found_loguse_lib" = "yes" ; then
-        ac_cv_loguse_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(no found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LOGUSE], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_ARG_WITH(loguse,
-	[  --with-loguse=PREFIX      Compile with LOGUSE support],
-	[if test "X$with_loguse" = "X"; then
-		with_loguse=yes
-	fi])
-
-	if test "X$with_loguse" != "X"; then
-	  if test "$with_loguse" != "yes"; then
-	    ac_cv_loguse_where_lib=$with_loguse/$CMU_LIB_SUBDIR
-	  fi
-	fi
-
-	if test "X$with_loguse_lib" != "X"; then
-	  ac_cv_loguse_where_lib=$with_loguse_lib
-	fi
-	if test "X$ac_cv_loguse_where_lib" = "X"; then
-	  CMU_LOGUSE_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	fi
-
-	AC_MSG_CHECKING(whether to include loguse)
-	if test "X$ac_cv_loguse_where_lib" = "X"; then
-	  ac_cv_found_loguse=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_loguse=yes
-	  AC_DEFINE(HAVE_LOGUSE,, [Use libloguse])
-	  AC_MSG_RESULT(yes)
-	  LOGUSE_LIB_DIR=$ac_cv_loguse_where_lib
-	  LOGUSE_LIB_FLAGS="-L${LOGUSE_LIB_DIR} -lloguse"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${LOGUSE_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${LOGUSE_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${LOGUSE_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/libnet.m4 b/cmulocal/libnet.m4
deleted file mode 100644
index 670564b..0000000
--- a/cmulocal/libnet.m4
+++ /dev/null
@@ -1,192 +0,0 @@
-dnl libnet.m4--libnet and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: libnet.m4,v 1.8 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_LIBNET_CFG_WHERE1], [
-ac_cv_found_libnet_bin=no
-if test -f "$1/libnet-config" ; then
-  ac_cv_found_libnet_cfg=yes
-fi
-])
-
-AC_DEFUN([CMU_LIBNET_CFG_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libnet config in $i)
-      CMU_LIBNET_CFG_WHERE1($i)
-      if test "$ac_cv_found_libnet_cfg" = "yes"; then
-        ac_cv_libnet_where_cfg=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBNET_INC_WHERE1], [
-ac_cv_found_libnet_inc=no
-if test -f "$1/libnet.h" ; then
-  ac_cv_found_libnet_inc=yes
-fi
-])
-
-AC_DEFUN([CMU_LIBNET_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libnet header in $i)
-      CMU_LIBNET_INC_WHERE1($i)
-      if test "$ac_cv_found_libnet_inc" = "yes"; then
-        ac_cv_libnet_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBNET_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lnet"
-AC_TRY_LINK(,
-[open_link_interface("","");],
-[ac_cv_found_libnet_lib=yes],
-AC_TRY_LINK(,
-[libnet_open_link_interface("","");],
-[
-CMU_LIBNET_CFLAGS_ADD="-DNEW_LIBNET_INTERFACE"
-ac_cv_found_libnet_lib=yes
-],
-ac_cv_found_libnet_lib=no)
-)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_LIBNET_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libnet library in $i)
-      CMU_LIBNET_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, net)
-      if test "$ac_cv_found_libnet_lib" = "yes" ; then
-        ac_cv_libnet_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBNET], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(libnet,
-	[  --with-libnet=PREFIX      Compile with LIBNET support],
-	[if test "X$with_libnet" = "X"; then
-		with_libnet=yes
-	fi])
-AC_ARG_WITH(libnet-config,
-	[  --with-libnet-config=dir  use libnet config program in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libnet-config])
-	fi])
-AC_ARG_WITH(libnet-lib,
-	[  --with-libnet-lib=dir     use libnet libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libnet-lib])
-	fi])
-AC_ARG_WITH(libnet-include,
-	[  --with-libnet-include=dir use libnet headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libnet-include])
-	fi])
-
-	if test "X$with_libnet" != "X"; then
-	  if test "$with_libnet" != "yes"; then
-            if test -f "$with_libnet/libnet-config"; then
-	      ac_cv_libnet_where_cfg=$with_libnet
-            else
-	      ac_cv_libnet_where_cfg=$with_libnet/bin
-            fi
-	    ac_cv_libnet_where_lib=$with_libnet/$CMU_LIB_SUBDIR
-	    ac_cv_libnet_where_inc=$with_libnet/include
-	  fi
-	fi
-
-	if test "X$with_libnet_cfg" != "X"; then
-	  ac_cv_libnet_where_cfg=$with_libnet_cfg
-	fi
-	if test "X$ac_cv_libnet_where_cfg" = "X"; then
-	  CMU_LIBNET_CFG_WHERE(/usr/ng/bin /usr/bin /usr/local/bin)
-	fi
-
-	if test "X$with_libnet_lib" != "X"; then
-	  ac_cv_libnet_where_lib=$with_libnet_lib
-	fi
-	if test "X$ac_cv_libnet_where_lib" = "X"; then
-	  CMU_LIBNET_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	fi
-
-	if test "X$with_libnet_include" != "X"; then
-	  ac_cv_libnet_where_inc=$with_libnet_include
-	fi
-	if test "X$ac_cv_libnet_where_inc" = "X"; then
-	  CMU_LIBNET_INC_WHERE(/usr/ng/include /usr/include /usr/local/include)
-	fi
-
-	AC_MSG_CHECKING(whether to include libnet)
-	if test "X$ac_cv_libnet_where_lib" = "X" -o "X$ac_cv_libnet_where_inc" = "X" -o "X$ac_cv_libnet_where_cfg" = "X"; then
-	  ac_cv_found_libnet=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_libnet=yes
-	  AC_MSG_RESULT(yes)
-	  LIBNET_CONFIG=$ac_cv_libnet_where_cfg/libnet-config
-	  LIBNET_INC_DIR=$ac_cv_libnet_where_inc
-	  LIBNET_LIB_DIR=$ac_cv_libnet_where_lib
-
-	  LIBNET_CFLAGS="`$LIBNET_CONFIG --cflags` ${CMU_LIBNET_CFLAGS_ADD}"
-	  LIBNET_DEF_FLAGS="`$LIBNET_CONFIG --defines`"
-	  LIBNET_INC_FLAGS="-I${LIBNET_INC_DIR}"
-	  LIBNET_LIB_FLAGS="-L${LIBNET_LIB_DIR} `${LIBNET_CONFIG} --libs`"
-
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBNET_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${LIBNET_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBNET_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBNET_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${LIBNET_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${LIBNET_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${LIBNET_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/libpcap.m4 b/cmulocal/libpcap.m4
deleted file mode 100644
index 4796ab9..0000000
--- a/cmulocal/libpcap.m4
+++ /dev/null
@@ -1,142 +0,0 @@
-dnl libpcap.m4--PCAP libraries and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: libpcap.m4,v 1.9 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_PCAP_INC_WHERE1], [
-ac_cv_found_pcap_inc=no
-if test -f "$1/pcap.h" ; then
-  ac_cv_found_pcap_inc=yes
-fi
-])
-
-AC_DEFUN([CMU_PCAP_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for pcap header in $i)
-      CMU_PCAP_INC_WHERE1($i)
-      if test "$ac_cv_found_pcap_inc" = "yes"; then
-        ac_cv_pcap_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(no found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_PCAP_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lpcap"
-AC_TRY_LINK(,
-[pcap_lookupdev("");],
-[ac_cv_found_pcap_lib=yes],
-ac_cv_found_pcap_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_PCAP_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for pcap library in $i)
-      CMU_PCAP_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, pcap)
-      if test "$ac_cv_found_pcap_lib" = "yes" ; then
-        ac_cv_pcap_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(no found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_PCAP], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(pcap,
-	[  --with-pcap=PREFIX      Compile with PCAP support],
-	[if test "X$with_pcap" = "X"; then
-		with_pcap=yes
-	fi])
-AC_ARG_WITH(pcap-lib,
-	[  --with-pcap-lib=dir     use pcap libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-pcap-lib])
-	fi])
-AC_ARG_WITH(pcap-include,
-	[  --with-pcap-include=dir use pcap headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-pcap-include])
-	fi])
-
-	if test "X$with_pcap" != "X"; then
-	  if test "$with_pcap" != "yes"; then
-	    ac_cv_pcap_where_lib=$with_pcap/$CMU_LIB_SUBDIR
-	    ac_cv_pcap_where_inc=$with_pcap/include
-	  fi
-	fi
-
-	if test "X$with_pcap_lib" != "X"; then
-	  ac_cv_pcap_where_lib=$with_pcap_lib
-	fi
-	if test "X$ac_cv_pcap_where_lib" = "X"; then
-	  CMU_PCAP_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	fi
-
-	if test "X$with_pcap_include" != "X"; then
-	  ac_cv_pcap_where_inc=$with_pcap_include
-	fi
-	if test "X$ac_cv_pcap_where_inc" = "X"; then
-	  CMU_PCAP_INC_WHERE(/usr/ng/include /usr/include /usr/local/include)
-	fi
-
-	AC_MSG_CHECKING(whether to include pcap)
-	if test "X$ac_cv_pcap_where_lib" = "X" -a "X$ac_cv_pcap_where_inc" = "X"; then
-	  ac_cv_found_pcap=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_pcap=yes
-	  AC_MSG_RESULT(yes)
-	  PCAP_INC_DIR=$ac_cv_pcap_where_inc
-	  PCAP_LIB_DIR=$ac_cv_pcap_where_lib
-	  PCAP_INC_FLAGS="-I${PCAP_INC_DIR}"
-	  PCAP_LIB_FLAGS="-L${PCAP_LIB_DIR} -lpcap"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${PCAP_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${PCAP_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${PCAP_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${PCAP_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${PCAP_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${PCAP_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${PCAP_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${PCAP_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${PCAP_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/librestrict.m4 b/cmulocal/librestrict.m4
deleted file mode 100644
index ec80b93..0000000
--- a/cmulocal/librestrict.m4
+++ /dev/null
@@ -1,102 +0,0 @@
-dnl librestrict.m4--restrict libraries and includes
-dnl Derrick Brashear
-dnl from KTH krb and Arla
-dnl $Id: librestrict.m4,v 1.6 2006/02/25 18:26:22 cg2v Exp $
-
-AC_DEFUN([CMU_RESTRICT_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lrestrict"
-AC_TRY_LINK(,
-[ConsoleInUse();],
-[ac_cv_found_restrict_lib=yes],
-ac_cv_found_restrict_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_RESTRICT_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for restrict library in $i)
-      CMU_RESTRICT_LIB_WHERE1($i)
-      CMU_TEST_LIBPATH($i, restrict)
-      if test "$ac_cv_found_restrict_lib" = "yes" ; then
-        ac_cv_restrict_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(no found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_RESTRICT], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(restrict,
-	[  --with-restrict=PREFIX      Compile with RESTRICT support],
-	[if test "X$with_restrict" = "X"; then
-		with_restrict=yes
-	fi])
-
-	if test "X$with_restrict" != "X"; then
-	  if test "$with_restrict" != "yes"; then
-	    ac_cv_restrict_where_lib=$with_restrict/$CMU_LIB_SUBDIR
-	  fi
-	fi
-
-	if test "X$with_restrict_lib" != "X"; then
-	  ac_cv_restrict_where_lib=$with_restrict_lib
-	fi
-	if test "X$ac_cv_restrict_where_lib" = "X"; then
-	  CMU_RESTRICT_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
-	fi
-
-	AC_MSG_CHECKING(whether to include restrict)
-	if test "X$ac_cv_restrict_where_lib" = "X"; then
-	  ac_cv_found_restrict=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_restrict=yes
-	  AC_DEFINE(HAVE_RESTRICT,, [Use librestrict])
-	  AC_MSG_RESULT(yes)
-	  RESTRICT_LIB_DIR=$ac_cv_restrict_where_lib
-	  RESTRICT_LIB_FLAGS="-L${RESTRICT_LIB_DIR} -lrestrict"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${RESTRICT_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${RESTRICT_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${RESTRICT_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	])
-
diff --git a/cmulocal/libssl.m4 b/cmulocal/libssl.m4
deleted file mode 100644
index 4d1b2a1..0000000
--- a/cmulocal/libssl.m4
+++ /dev/null
@@ -1,153 +0,0 @@
-dnl libssl.m4--Ssl libraries and includes
-dnl Derrick Brashear
-dnl from KTH kafs and Arla
-dnl $Id: libssl.m4,v 1.10 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h,
-ac_cv_found_libssl_inc=yes,
-ac_cv_found_libssl_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_LIBSSL_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libssl headers in $i)
-      CMU_LIBSSL_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, ssl)
-      if test "$ac_cv_found_libssl_inc" = "yes"; then
-        ac_cv_libssl_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET"
-AC_TRY_LINK(,
-[SSL_write();],
-[ac_cv_found_ssl_lib=yes],
-ac_cv_found_ssl_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for libssl libraries in $i)
-      CMU_LIBSSL_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, ssl)
-      if test "$ac_cv_found_ssl_lib" = "yes" ; then
-        ac_cv_libssl_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_LIBSSL], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_ARG_WITH(libssl,
-	[  --with-libssl=PREFIX      Compile with Libssl support],
-	[if test "X$with_libssl" = "X"; then
-		with_libssl=yes
-	fi])
-AC_ARG_WITH(libssl-lib,
-	[  --with-libssl-lib=dir     use libssl libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libssl-lib])
-	fi])
-AC_ARG_WITH(libssl-include,
-	[  --with-libssl-include=dir use libssl headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-libssl-include])
-	fi])
-
-	if test "X$with_libssl" != "X"; then
-	  if test "$with_libssl" != "yes" -a "$with_libssl" != no; then
-	    ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR
-	    ac_cv_libssl_where_inc=$with_libssl/include
-	  fi
-	fi
-
-	if test "$with_libssl" != "no"; then 
-	  if test "X$with_libssl_lib" != "X"; then
-	    ac_cv_libssl_where_lib=$with_libssl_lib
-	  fi
-	  if test "X$ac_cv_libssl_where_lib" = "X"; then
-	    CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
-	  fi
-
-	  if test "X$with_libssl_include" != "X"; then
-	    ac_cv_libssl_where_inc=$with_libssl_include
-	  fi
-	  if test "X$ac_cv_libssl_where_inc" = "X"; then
-	    CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include)
-	  fi
-	fi
-
-	AC_MSG_CHECKING(whether to include libssl)
-	if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then
-	  ac_cv_found_libssl=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_libssl=yes
-	  AC_MSG_RESULT(yes)
-	  LIBSSL_INC_DIR=$ac_cv_libssl_where_inc
-	  LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib
-	  LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}"
-	  LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
-	      else 
- 		RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${LIBSSL_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${LIBSSL_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${LIBSSL_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	AC_SUBST(LIBSSL_INC_DIR)
-	AC_SUBST(LIBSSL_LIB_DIR)
-	AC_SUBST(LIBSSL_INC_FLAGS)
-	AC_SUBST(LIBSSL_LIB_FLAGS)
-	])
-
diff --git a/cmulocal/libtoolhack.m4 b/cmulocal/libtoolhack.m4
deleted file mode 100644
index be1dc2c..0000000
--- a/cmulocal/libtoolhack.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl libtoolhack.m4--hack to make libtool behave better
-dnl Rob Earhart
-dnl $Id: libtoolhack.m4,v 1.4 2003/10/08 20:35:25 rjs3 Exp $
-
-dnl Libtool tries to compile an empty file to see whether it can build
-dnl shared libraries, and treats *any* warning as a problem.
-dnl Solaris's and HP's cc complains about the empty file.  So we hack
-dnl the CFLAGS to make cc not complain.
-
-AC_DEFUN([CMU_PROG_LIBTOOL], [
-AC_REQUIRE([AC_PROG_CC])
-if test "$ac_cv_prog_gcc" = no; then
-  case "$host_os" in
-    solaris2*)
-      save_cflags="${CFLAGS}"
-      CFLAGS="-erroff=E_EMPTY_TRANSLATION_UNIT ${CFLAGS}"
-      ;;
-    hpux*)
-      save_cflags="${CFLAGS}"
-      CFLAGS="-w"
-      ;;
-  esac
-fi
-
-AC_PROG_LIBTOOL
-
-if test "$ac_cv_prog_gcc" = no; then
-  case "$host_os" in
-    solaris2*|hpux*)
-      CFLAGS="${save_cflags}"
-  esac
-fi
-])
diff --git a/cmulocal/libwrap.m4 b/cmulocal/libwrap.m4
deleted file mode 100644
index 876a49c..0000000
--- a/cmulocal/libwrap.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl libwrap.m4 --- do we have libwrap, the access control library?
-dnl $Id: libwrap.m4,v 1.10 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_LIBWRAP], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-  AC_REQUIRE([CMU_SOCKETS])
-  AC_ARG_WITH(libwrap, 
-              [  --with-libwrap=DIR      use libwrap (rooted in DIR) [yes] ],
-              with_libwrap=$withval, with_libwrap=yes)
-  if test "$with_libwrap" != no; then
-    if test -d "$with_libwrap"; then
-      CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
-      LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
-    fi
-    cmu_save_LIBS="$LIBS"
-    AC_CHECK_LIB(wrap, request_init, [
-		 AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)],
-		 with_libwrap=no, ${LIB_SOCKET})
-    LIBS="$cmu_save_LIBS"
-  fi
-  AC_MSG_CHECKING(libwrap support)
-  AC_MSG_RESULT($with_libwrap)
-  LIB_WRAP=""
-  if test "$with_libwrap" != no; then
-    AC_DEFINE(HAVE_LIBWRAP,[],[Do we have TCP wrappers?])
-    LIB_WRAP="-lwrap"
-    AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl")
-  fi
-  AC_SUBST(LIB_WRAP)
-])
diff --git a/cmulocal/mips-abi.m4 b/cmulocal/mips-abi.m4
deleted file mode 100644
index a58a126..0000000
--- a/cmulocal/mips-abi.m4
+++ /dev/null
@@ -1,93 +0,0 @@
-dnl mips-abi.m4--Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext
-dnl to some value
-dnl Derrick Brashear
-dnl from KTH krb (from CMU)
-dnl $Id: mips-abi.m4,v 1.5 2003/10/08 20:35:25 rjs3 Exp $
-
-AC_DEFUN([AC_MIPS_ABI], [
-AC_ARG_WITH(mips_abi,
-[  --with-mips-abi=abi     ABI to use for IRIX (32, n32, or 64)])
-
-case "$host_os" in
-irix*)
-with_mips_abi="${with_mips_abi:-yes}"
-if test -n "$GCC"; then
-
-# GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
-# which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
-#
-# Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
-# GCC and revert back to O32. The same goes if O32 is asked for - old
-# GCCs doesn't like the -mabi option, and new GCCs can't output O32.
-#
-# Don't you just love *all* the different SGI ABIs?
-
-case "${with_mips_abi}" in 
-        32|o32) abi='-mabi=32';  abilibdirext=''     ;;
-       n32|yes) abi='-mabi=n32'; abilibdirext='32'  ;;
-        64) abi='-mabi=64';  abilibdirext='64'   ;;
-	no) abi=''; abilibdirext='';;
-         *) AC_ERROR("Invalid ABI specified") ;;
-esac
-if test -n "$abi" ; then
-ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
-dnl
-dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
-dnl AC_MSG_RESULT
-dnl
-AC_MSG_CHECKING([if $CC supports the $abi option])
-AC_CACHE_VAL($ac_foo, [
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $abi"
-AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
-CFLAGS="$save_CFLAGS"
-])
-ac_res=`eval echo \\\$$ac_foo`
-AC_MSG_RESULT($ac_res)
-if test $ac_res = no; then
-# Try to figure out why that failed...
-case $abi in
-	-mabi=32) 
-	save_CFLAGS="$CFLAGS"
-	CFLAGS="$CFLAGS -mabi=n32"
-	AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
-	CLAGS="$save_CFLAGS"
-	if test $ac_res = yes; then
-		# New GCC
-		AC_ERROR([$CC does not support the $with_mips_abi ABI])
-	fi
-	# Old GCC
-	abi=''
-	abilibdirext=''
-	;;
-	-mabi=n32|-mabi=64)
-		if test $with_mips_abi = yes; then
-			# Old GCC, default to O32
-			abi=''
-			abilibdirext=''
-		else
-			# Some broken GCC
-			AC_ERROR([$CC does not support the $with_mips_abi ABI])
-		fi
-	;;
-esac
-fi #if test $ac_res = no; then
-fi #if test -n "$abi" ; then
-else
-case "${with_mips_abi}" in
-        32|o32) abi='-32'; abilibdirext=''     ;;
-       n32|yes) abi='-n32'; abilibdirext='32'  ;;
-        64) abi='-64'; abilibdirext='64'   ;;
-	no) abi=''; abilibdirext='';;
-         *) AC_ERROR("Invalid ABI specified") ;;
-esac
-fi #if test -n "$GCC"; then
-;;
-esac
-
-dnl And then we munge variables to make things work
-CFLAGS="${CFLAGS} $abi"
-libdir=`echo $libdir | sed 's,/*$,$abilibdirext,'`
-LDFLAGS=`echo $LDFLAGS | sed -e "s,/lib$,/lib$abilibdirext," -e "s,\\\(/lib[^a-zA-Z]\\\),\\\1$abilibdirext,g"`
-
-])
diff --git a/cmulocal/nadine.m4 b/cmulocal/nadine.m4
deleted file mode 100644
index 59cc787..0000000
--- a/cmulocal/nadine.m4
+++ /dev/null
@@ -1,164 +0,0 @@
-dnl nadine.m4--The nadine event library
-dnl Derrick Brashear
-dnl from KTH kafs and Arla
-dnl $Id: nadine.m4,v 1.6 2003/10/08 20:35:25 rjs3 Exp $
-
-AC_DEFUN([CMU_NADINE_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-CMU_CHECK_HEADER_NOCACHE(libevent/libevent.h,
-ac_cv_found_event_inc=yes,
-ac_cv_found_event_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_NADINE_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for nadine headers in $i)
-      CMU_NADINE_INC_WHERE1($i)
-dnl      CMU_TEST_INCPATH($i, ssl)
-dnl   CMU_TEST_INCPATH isn't very versatile
-      if test "$ac_cv_found_event_inc" = "yes"; then
-        if test \! -f $i/libevent/libevent.h ; then
-          ac_cv_found_event_inc=no
-        fi
-      fi
-      if test "$ac_cv_found_event_inc" = "yes"; then
-        ac_cv_event_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_NADINE_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -levent"
-AC_TRY_LINK(,
-[libevent_Initialize();],
-[ac_cv_found_event_lib=yes],
-ac_cv_found_event_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_NADINE_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for event libraries in $i)
-      CMU_NADINE_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, event)
-      if test "$ac_cv_found_event_lib" = "yes" ; then
-        ac_cv_event_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_NADINE], [
-AC_REQUIRE([CMU_SOCKETS])
-AC_ARG_WITH(nadine,
-	[  --with-nadine=PREFIX      Compile with nadine libevent support],
-	[if test "X$with_nadine" = "X"; then
-		with_nadine=yes
-	fi])
-AC_ARG_WITH(nadine-lib,
-	[  --with-nadine-lib=dir     use nadine libraries in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-nadine-lib])
-	fi])
-AC_ARG_WITH(nadine-include,
-	[  --with-nadine-include=dir use nadine headers in dir],
-	[if test "$withval" = "yes" -o "$withval" = "no"; then
-		AC_MSG_ERROR([No argument for --with-nadine-include])
-	fi])
-
-        if test "$with_ucdsnmp" = "no" ; then
-             AC_MSG_WARN([Nadine requires UCD SNMP. Disabling Nadine support])
-             with_nadine=no
-             with_nadine_lib=no
-             with_nadine_include=no
-        fi
-	if test "X$with_nadine" != "X"; then
-	  if test "$with_nadine" != "yes" -a "$with_nadine" != no; then
-	    ac_cv_event_where_lib=$with_nadine/lib
-	    ac_cv_event_where_inc=$with_nadine/include
-	  fi
-	fi
-
-	if test "$with_nadine" != "no"; then 
-	  if test "X$with_nadine_lib" != "X"; then
-	    ac_cv_event_where_lib=$with_nadine_lib
-	  fi
-	  if test "X$ac_cv_event_where_lib" = "X"; then
-	    CMU_NADINE_LIB_WHERE(/usr/local/lib /usr/ng/lib /usr/lib)
-	  fi
-
-	  if test "X$with_nadine_include" != "X"; then
-	    ac_cv_event_where_inc=$with_nadine_include
-	  fi
-	  if test "X$ac_cv_event_where_inc" = "X"; then
-	    CMU_NADINE_INC_WHERE(/usr/local/include /usr/ng/include /usr/include)
-	  fi
-	fi
-
-	AC_MSG_CHECKING(whether to include nadine)
-	if test "X$ac_cv_event_where_lib" = "X" -a "X$ac_cv_event_where_inc" = "X"; then
-	  ac_cv_found_event=no
-	  AC_MSG_RESULT(no)
-	else
-	  ac_cv_found_event=yes
-	  AC_MSG_RESULT(yes)
-	  NADINE_INC_DIR=$ac_cv_event_where_inc
-	  NADINE_LIB_DIR=$ac_cv_event_where_lib
-	  NADINE_INC_FLAGS="-I${NADINE_INC_DIR}"
-	  NADINE_LIB_FLAGS="-L${NADINE_LIB_DIR} -levent"
-	  if test "X$RPATH" = "X"; then
-		RPATH=""
-	  fi
-	  case "${host}" in
-	    *-*-linux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${NADINE_LIB_DIR}"
-	      else 
- 		RPATH="${RPATH}:${NADINE_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-hpux*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,+b${NADINE_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${NADINE_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-irix*)
-	      if test "X$RPATH" = "X"; then
-	        RPATH="-Wl,-rpath,${NADINE_LIB_DIR}"
-	      else 
-		RPATH="${RPATH}:${NADINE_LIB_DIR}"
-	      fi
-	      ;;
-	    *-*-solaris2*)
-	      if test "$ac_cv_prog_gcc" = yes; then
-		if test "X$RPATH" = "X"; then
-		  RPATH="-Wl,-R${NADINE_LIB_DIR}"
-		else 
-		  RPATH="${RPATH}:${NADINE_LIB_DIR}"
-		fi
-	      else
-	        RPATH="${RPATH} -R${NADINE_LIB_DIR}"
-	      fi
-	      ;;
-	  esac
-	  AC_SUBST(RPATH)
-	fi
-	AC_SUBST(NADINE_INC_DIR)
-	AC_SUBST(NADINE_LIB_DIR)
-	AC_SUBST(NADINE_INC_FLAGS)
-	AC_SUBST(NADINE_LIB_FLAGS)
-	])
-
diff --git a/cmulocal/nana.m4 b/cmulocal/nana.m4
deleted file mode 100644
index 4c280e0..0000000
--- a/cmulocal/nana.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-dnl nana.m4--nana macro
-dnl Rob Earhart
-dnl $Id: nana.m4,v 1.5 2003/10/08 20:35:25 rjs3 Exp $
-
-AC_DEFUN([CMU_NANA], [
-  AC_REQUIRE([AC_PROG_CC])
-  AC_ARG_WITH(nana, [[  --with-nana             use NANA [yes] ]],,with_nana=yes)
-  if test "$GCC" != yes; then
-    with_nana=no
-  elif test "$with_nana" = yes; then
-    AC_CHECK_PROGS(NANA, nana, :)
-    if test "$NANA" = ":"; then
-      with_nana=no
-    else
-      AC_CHECK_HEADER(nana.h,
-		      AC_CHECK_LIB(nana, nana_error,,with_nana=no),
-		      with_nana=no)
-    fi
-  else
-    with_nana=no
-  fi
-  AC_MSG_CHECKING([whether to use NANA])
-  AC_MSG_RESULT($with_nana)
-  if test "$with_nana" != yes; then
-    AC_DEFINE(WITHOUT_NANA)
-  fi
-])
diff --git a/cmulocal/opendkim.m4 b/cmulocal/opendkim.m4
deleted file mode 100644
index 98fd0d3..0000000
--- a/cmulocal/opendkim.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-dnl These are the Cyrus OpenDKIM macros.
-
-dnl They are here so that they can be shared between Cyrus IMAPd
-dnl and Cyrus SASL with relative ease.
-
-dnl When we're done, there will be a DKIM_CFLAGS and a DKIM_LIBS which
-dnl should be used when necessary. 
-dnl We should probably be smarter about our RPATH dnl handling.
-
-dnl Call these with CYRUS_SQLITE_CHK.
-
-dnl We will also set $opendkimlib to "yes" if we are successful, "no" otherwise.
-
-AC_DEFUN([CYRUS_OPENDKIM_CHK_LIB],
-[
-	OPENDKIM_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_opendkim_lib; then
-	    CMU_ADD_LIBPATH_TO($with_opendkim_lib, LDFLAGS)
-	    CMU_ADD_LIBPATH_TO($with_opendkim_lib, OPENDKIM_LIBADD)
-	else
-	    DKIM_LIBS=""
-	fi
-
-	saved_LIBS=$LIBS
-        for libname in ${with_opendkim} opendkim
-          do
-	    LIBS="$saved_LIBS -l$libname"
-	    AC_TRY_LINK([#include <stdio.h>
-#include <dkim.h>],
-	    [dkim_init(NULL, NULL);],
-	    DKIM_LIBS="$DKIM_LIBS -l$libname"; opendkimlib="yes",
-            opendkimlib="no")
-	    if test "$opendkimlib" = "yes"; then break; fi
-          done
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$OPENDKIM_SAVE_LDFLAGS
-])
-
-AC_DEFUN([CYRUS_OPENDKIM_OPTS],
-[
-AC_ARG_WITH(opendkim-libdir,
-	[  --with-opendkim-libdir=DIR   Opendkim lib files are in DIR],
-	with_opendkim_lib=$withval,
-	[ test "${with_opendkim_lib+set}" = set || with_opendkim_lib=none])
-AC_ARG_WITH(opendkim-incdir,
-	[  --with-opendkim-incdir=DIR   Opendkim include files are in DIR],
-	with_opendkim_inc=$withval,
-	[ test "${with_opendkim_inc+set}" = set || with_opendkim_inc=none ])
-])
-
-AC_DEFUN([CYRUS_OPENDKIM_CHK],
-[
-	AC_REQUIRE([CYRUS_OPENDKIM_OPTS])
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_opendkim_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_opendkim_inc"
-	    DKIM_CFLAGS="-I$with_opendkim_inc"
-	else
-	    DKIM_CFLAGS=""
-	fi
-
-        AC_CHECK_HEADER(dkim.h,
-                        [CYRUS_OPENDKIM_CHK_LIB()],
-                        opendkimlib="no")
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-])
diff --git a/cmulocal/pthreads.m4 b/cmulocal/pthreads.m4
deleted file mode 100644
index b457623..0000000
--- a/cmulocal/pthreads.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-dnl pthreads.m4--pthreads setup macro
-dnl Rob Earhart
-dnl $Id: pthreads.m4,v 1.11 2003/10/08 20:35:25 rjs3 Exp $
-
-AC_DEFUN([CMU_PTHREADS], [
-   AC_REQUIRE([AC_CANONICAL_HOST])
-   cmu_save_LIBS="$LIBS"
-   AC_CHECK_LIB(pthread, pthread_create,LIB_PTHREAD="-lpthread",
-     AC_CHECK_LIB(c_r, pthread_create,LIB_PTHREAD="-lc_r",
-       AC_ERROR([Can't compile without pthreads])))
-  LIBS="$cmu_save_LIBS"
-   AC_SUBST(LIB_PTHREAD)
-   AC_DEFINE(_REENTRANT)
-   case "$host_os" in
-   solaris2*)
- 	AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
- 	AC_DEFINE(__EXTENSIONS__)
- 	;;
-   irix6*)
- 	AC_DEFINE(_SGI_REENTRANT_FUNCTIONS)
- 	;;
-   esac
-])
diff --git a/cmulocal/sasl.m4 b/cmulocal/sasl.m4
deleted file mode 100644
index aed58d9..0000000
--- a/cmulocal/sasl.m4
+++ /dev/null
@@ -1,94 +0,0 @@
-dnl sasl.m4--sasl libraries and includes
-dnl Derrick Brashear
-dnl from KTH sasl and Arla
-dnl $Id: sasl.m4,v 1.23 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_SASL_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-CMU_CHECK_HEADER_NOCACHE(sasl.h,
-ac_cv_found_sasl_inc=yes,
-ac_cv_found_sasl_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_SASL_INC_WHERE], [
-   for i in $1; do
-      CMU_SASL_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, sasl)
-      if test "$ac_cv_found_sasl_inc" = "yes"; then
-        ac_cv_sasl_where_inc=$i
-        break
-      fi
-    done
-])
-
-AC_DEFUN([CMU_SASL_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lsasl"
-AC_TRY_LINK(,
-[sasl_getprop();],
-[ac_cv_found_sasl_lib=yes],
-ac_cv_found_sasl_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_SASL_LIB_WHERE], [
-   for i in $1; do
-      CMU_SASL_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, sasl)
-      if test "$ac_cv_found_sasl_lib" = "yes" ; then
-        ac_cv_sasl_where_lib=$i
-        break
-      fi
-    done
-])
-
-AC_DEFUN([CMU_SASL], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(sasl,
-            [  --with-sasl=DIR        Compile with libsasl in <DIR>],
-	    with_sasl="$withval",
-            with_sasl="yes")
-
-	SASLFLAGS=""
-	LIB_SASL=""
-
-	cmu_saved_CPPFLAGS=$CPPFLAGS
-	cmu_saved_LDFLAGS=$LDFLAGS
-	cmu_saved_LIBS=$LIBS
-	if test -d ${with_sasl}; then
-          ac_cv_sasl_where_lib=${with_sasl}/$CMU_LIB_SUBDIR
-          ac_cv_sasl_where_inc=${with_sasl}/include
-
-	  SASLFLAGS="-I$ac_cv_sasl_where_inc"
-	  LIB_SASL="-L$ac_cv_sasl_where_lib"
-	  CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
-	  LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
-	fi
-
-	AC_CHECK_HEADER(sasl.h,
-	  AC_CHECK_LIB(sasl, sasl_getprop, 
-                       ac_cv_found_sasl=yes,
-		       ac_cv_found_sasl=no), ac_cv_found_sasl=no)
-
-	LIBS="$cmu_saved_LIBS"
-	LDFLAGS="$cmu_saved_LDFLAGS"
-	CPPFLAGS="$cmu_saved_CPPFLAGS"
-	if test "$ac_cv_found_sasl" = yes; then
-	  LIB_SASL="$LIB_SASL -lsasl"
-	else
-	  LIB_SASL=""
-	  SASLFLAGS=""
-	fi
-	AC_SUBST(LIB_SASL)
-	AC_SUBST(SASLFLAGS)
-	])
-
-AC_DEFUN([CMU_SASL_REQUIRED],
-[AC_REQUIRE([CMU_SASL])
-if test "$ac_cv_found_sasl" != "yes"; then
-        AC_ERROR([Cannot continue without libsasl.
-Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
-fi])
diff --git a/cmulocal/sql.m4 b/cmulocal/sql.m4
deleted file mode 100644
index a214f39..0000000
--- a/cmulocal/sql.m4
+++ /dev/null
@@ -1,221 +0,0 @@
-dnl $Id: sql.m4,v 1.2 2010/01/06 17:01:28 murch Exp $
-
-dnl These are the Cyrus MySQL macros.
-
-dnl They are here so that they can be shared between Cyrus IMAPd
-dnl and Cyrus SASL with relative ease.
-
-dnl When we're done, there will be a MYSQL_LIBADD and a MYSQL_INCADD which
-dnl should dnl be used when necessary. 
-dnl We should probably be smarter about our RPATH dnl handling.
-
-dnl Call these with CYRUS_MYSQL_CHK.
-
-dnl We will also set $mysqllib to "yes" if we are successful, "no" otherwise.
-
-AC_DEFUN([CYRUS_MYSQL_CHK_LIB],
-[
-	MYSQL_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_mysql_lib; then
-	    CMU_ADD_LIBPATH_TO($with_mysql_lib, LDFLAGS)
-	    CMU_ADD_LIBPATH_TO($with_mysql_lib, MYSQL_LIBADD)
-	else
-	    MYSQL_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-        for libname in ${with_mysql} mysqlclient
-          do
-	    LIBS="$saved_LIBS -l$libname"
-	    AC_TRY_LINK([#include <stdio.h>
-#include <mysql.h>],
-	    [mysql_select_db(NULL, NULL);],
-	    MYSQL_LIBADD="$MYSQL_LIBADD -l$libname"; mysqllib="yes",
-            mysqllib="no")
-	    if test "$mysqllib" = "yes"; then break; fi
-          done
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$MYSQL_SAVE_LDFLAGS
-])
-
-AC_DEFUN([CYRUS_MYSQL_OPTS],
-[
-AC_ARG_WITH(mysql-libdir,
-	[  --with-mysql-libdir=DIR   MySQL lib files are in DIR],
-	with_mysql_lib=$withval,
-	[ test "${with_mysql_lib+set}" = set || with_mysql_lib=none])
-AC_ARG_WITH(mysql-incdir,
-	[  --with-mysql-incdir=DIR   MySQL include files are in DIR],
-	with_mysql_inc=$withval,
-	[ test "${with_mysql_inc+set}" = set || with_mysql_inc=none ])
-])
-
-AC_DEFUN([CYRUS_MYSQL_CHK],
-[
-	AC_REQUIRE([CYRUS_MYSQL_OPTS])
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_mysql_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_mysql_inc"
-	    MYSQL_INCADD="-I$with_mysql_inc"
-	else
-	    MYSQL_INCADD=""
-	fi
-
-        AC_CHECK_HEADER(mysql.h,
-                        [CYRUS_MYSQL_CHK_LIB()],
-                        mysqllib="no")
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-])
-
-
-
-dnl These are the Cyrus PgSQL macros.
-
-dnl They are here so that they can be shared between Cyrus IMAPd
-dnl and Cyrus SASL with relative ease.
-
-dnl When we're done, there will be a PGSQL_LIBADD and a PGSQL_INCADD which
-dnl should dnl be used when necessary. 
-dnl We should probably be smarter about our RPATH dnl handling.
-
-dnl Call these with CYRUS_PGSQL_CHK.
-
-dnl We will also set $pgsqllib to "yes" if we are successful, "no" otherwise.
-
-AC_DEFUN([CYRUS_PGSQL_CHK_LIB],
-[
-	PGSQL_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_pgsql_lib; then
-	    CMU_ADD_LIBPATH_TO($with_pgsql_lib, LDFLAGS)
-	    CMU_ADD_LIBPATH_TO($with_pgsql_lib, PGSQL_LIBADD)
-	else
-	    PGSQL_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-        for libname in ${with_pgsql} pq
-          do
-	    LIBS="$saved_LIBS -l$libname"
-	    AC_TRY_LINK([#include <stdio.h>
-#include <libpq-fe.h>],
-	    [PQconnectdb(NULL);],
-	    PGSQL_LIBADD="$PGSQL_LIBADD -l$libname"; pgsqllib="yes",
-            pgsqllib="no")
-	    if test "$pgsqllib" = "yes"; then break; fi
-          done
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$PGSQL_SAVE_LDFLAGS
-])
-
-AC_DEFUN([CYRUS_PGSQL_OPTS],
-[
-AC_ARG_WITH(pgsql-libdir,
-	[  --with-pgsql-libdir=DIR   Pgsql lib files are in DIR],
-	with_pgsql_lib=$withval,
-	[ test "${with_pgsql_lib+set}" = set || with_pgsql_lib=none])
-AC_ARG_WITH(pgsql-incdir,
-	[  --with-pgsql-incdir=DIR   Pgsql include files are in DIR],
-	with_pgsql_inc=$withval,
-	[ test "${with_pgsql_inc+set}" = set || with_pgsql_inc=none ])
-])
-
-AC_DEFUN([CYRUS_PGSQL_CHK],
-[
-	AC_REQUIRE([CYRUS_PGSQL_OPTS])
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_pgsql_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_pgsql_inc"
-	    PGSQL_INCADD="-I$with_pgsql_inc"
-	else
-	    PGSQL_INCADD=""
-	fi
-
-        AC_CHECK_HEADER(libpq-fe.h,
-                        [CYRUS_PGSQL_CHK_LIB()],
-                        pgsqllib="no")
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-])
-
-
-
-dnl These are the Cyrus SQLite macros.
-
-dnl They are here so that they can be shared between Cyrus IMAPd
-dnl and Cyrus SASL with relative ease.
-
-dnl When we're done, there will be a SQLITE_LIBADD and a SQLITE_INCADD which
-dnl should dnl be used when necessary. 
-dnl We should probably be smarter about our RPATH dnl handling.
-
-dnl Call these with CYRUS_SQLITE_CHK.
-
-dnl We will also set $sqlitelib to "yes" if we are successful, "no" otherwise.
-
-AC_DEFUN([CYRUS_SQLITE_CHK_LIB],
-[
-	SQLITE_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_sqlite_lib; then
-	    CMU_ADD_LIBPATH_TO($with_sqlite_lib, LDFLAGS)
-	    CMU_ADD_LIBPATH_TO($with_sqlite_lib, SQLITE_LIBADD)
-	else
-	    SQLITE_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-        for libname in ${with_sqlite} sqlite3
-          do
-	    LIBS="$saved_LIBS -l$libname"
-	    AC_TRY_LINK([#include <stdio.h>
-#include <sqlite3.h>],
-	    [sqlite3_open(NULL, NULL);],
-	    SQLITE_LIBADD="$SQLITE_LIBADD -l$libname"; sqlitelib="yes",
-            sqlitelib="no")
-	    if test "$sqlitelib" = "yes"; then break; fi
-          done
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$SQLITE_SAVE_LDFLAGS
-])
-
-AC_DEFUN([CYRUS_SQLITE_OPTS],
-[
-AC_ARG_WITH(sqlite-libdir,
-	[  --with-sqlite-libdir=DIR   SQLite lib files are in DIR],
-	with_sqlite_lib=$withval,
-	[ test "${with_sqlite_lib+set}" = set || with_sqlite_lib=none])
-AC_ARG_WITH(sqlite-incdir,
-	[  --with-sqlite-incdir=DIR   SQLite include files are in DIR],
-	with_sqlite_inc=$withval,
-	[ test "${with_sqlite_inc+set}" = set || with_sqlite_inc=none ])
-])
-
-AC_DEFUN([CYRUS_SQLITE_CHK],
-[
-	AC_REQUIRE([CYRUS_SQLITE_OPTS])
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_sqlite_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_sqlite_inc"
-	    SQLITE_INCADD="-I$with_sqlite_inc"
-	else
-	    SQLITE_INCADD=""
-	fi
-
-        AC_CHECK_HEADER(sqlite3.h,
-                        [CYRUS_SQLITE_CHK_LIB()],
-                        sqlitelib="no")
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-])
diff --git a/cmulocal/tcl.m4 b/cmulocal/tcl.m4
deleted file mode 100644
index e99f847..0000000
--- a/cmulocal/tcl.m4
+++ /dev/null
@@ -1,160 +0,0 @@
-dnl FIRST PASS AFTER STEALING THIS FROM CYRUS!
-dnl USE AT YOUR OWN PERIL!
-dnl I MEAN IT!
-dnl
-dnl tcl.m4: an autoconf Tcl locator
-dnl $Id: tcl.m4,v 1.4 2003/10/08 20:35:25 rjs3 Exp $
-dnl
-dnl This is rob's Tcl macro, fixed by tjs.  It may need occasional tweaking,
-dnl but until the next impediment to compilation, it's fill-in-the-blank,
-dnl and it should be able to do reasonable things with user input.
-dnl
-dnl This will probably just work on Andrew systems, but given the variety
-dnl and apparent creativity of people who compile Tcl elsewhere, I don't know
-dnl what it will do.  I have yet to see an autoconf Tcl test that users were
-dnl happy with.
-dnl
-dnl BUGS
-dnl   The command-line arguments are overcomplicated.
-dnl   There are doubtlessly others...
-
-dnl To use this macro, just do CMU_TCL.  It outputs
-dnl TCL_LIBS, TCL_CPPFLAGS, and TCL_DEFS and SUBSTs them.  
-dnl If successful, these have stuff in them.  If not, they're empty.
-dnl If not successful, with_tcl has the value "no".
-
-AC_DEFUN([CMU_TCL], [
-# --- BEGIN CMU_TCL ---
-dnl To link against Tcl, configure does several things to make my life
-dnl "easier".
-dnl
-dnl * maybe ask the user where they think Tcl lives, and try to find it
-dnl * maybe ask the user what "tclsh" is called this week (i.e., "tclsh8.0")
-dnl * run tclsh, ask it for a path, then run that path through sed
-dnl * sanity check its result (many installs are a little broken)
-dnl * try to figure out where Tcl is based on this result
-dnl * try to guess where the Tcl include files are
-dnl
-dnl Notes from previous incarnations:
-dnl > XXX MUST CHECK FOR TCL BEFORE KERBEROS V4 XXX
-dnl > This is because some genius at MIT named one of the Kerberos v4
-dnl > library functions log().  This of course conflicts with the
-dnl > logarithm function in the standard math library, used by Tcl.
-dnl
-dnl > Checking for Tcl first puts -lm before -lkrb on the library list.
-dnl
-
-dnl Check for some information from the user on what the world looks like
-AC_ARG_WITH(tclconfig,[  --with-tclconfig=PATH   use tclConfig.sh from PATH
-                          (configure gets Tcl configuration from here)],
-        dnl trim tclConfig.sh off the end so we can add it back on later.
-	TclLibBase=`echo ${withval} | sed s/tclConfig.sh\$//`)
-AC_ARG_WITH(tcl,      [  --with-tcl=PATH         use Tcl from PATH],
-	TclLibBase="${withval}/lib")
-AC_ARG_WITH(tclsh,    [  --with-tclsh=TCLSH      use TCLSH as the tclsh program
-                          (let configure find Tcl using this program)],
-	TCLSH="${withval}")
-
-if test "$TCLSH" = "no" -o "$with_tclconfig" = "no" ; then
-  AC_MSG_WARN([Tcl disabled because tclsh or tclconfig specified as "no"])
-  with_tcl=no
-fi
-
-if test "$with_tcl" != "no"; then
-  if test \! -z "$with_tclconfig" -a \! -d "$with_tclconfig" ; then
-    AC_MSG_ERROR([--with-tclconfig requires a directory argument.])
-  fi
-
-  if test \! -z "$TCLSH" -a \! -x "$TCLSH" ; then
-    AC_MSG_ERROR([--with-tclsh must specify an executable file.])
-  fi
-
-  if test -z "$TclLibBase"; then # do we already know?
-    # No? Run tclsh and ask it where it lives.
-
-    # Do we know where a tclsh lives?
-    if test -z "$TCLSH"; then
-      # Try and find tclsh.  Any tclsh.
-      # If a new version of tcl comes out and unfortunately adds another
-      # filename, it should be safe to add it (to the front of the line --
-      # somef vendors have older, badly installed tclshs that we want to avoid
-      # if we can)
-      AC_PATH_PROGS(TCLSH, [tclsh8.1 tclsh8.0 tclsh], "unknown")
-    fi
-
-    # Do we know where to get a tclsh?
-    if test "${TCLSH}" != "unknown"; then
-      AC_MSG_CHECKING([where Tcl says it lives])
-      TclLibBase=`echo puts \\\$tcl_library | ${TCLSH} | sed -e 's,[^/]*$,,'`
-      AC_MSG_RESULT($TclLibBase)
-    fi
-  fi
-
-  if test -z "$TclLibBase" ; then
-    AC_MSG_RESULT([can't find tclsh])
-    AC_MSG_WARN([can't find Tcl installtion; use of Tcl disabled.])
-    with_tcl=no
-  else
-    AC_MSG_CHECKING([for tclConfig.sh])
-    # Check a list of places where the tclConfig.sh file might be.
-    for tcldir in "${TclLibBase}" \
-                  "${TclLibBase}/.." \
-		  "${TclLibBase}"`echo ${TCLSH} | sed s/sh//` ; do
-      if test -f "${tcldir}/tclConfig.sh"; then
-        TclLibBase="${tcldir}"
-        break
-      fi
-    done
-
-    if test -z "${TclLibBase}" ; then
-      AC_MSG_RESULT("unknown")
-      AC_MSG_WARN([can't find Tcl configuration; use of Tcl disabled.])
-      with_tcl=no
-    else
-      AC_MSG_RESULT(${TclLibBase}/)
-    fi
-
-    if test "${with_tcl}" != no ; then
-      AC_MSG_CHECKING([Tcl configuration on what Tcl needs to compile])
-      . ${TclLibBase}/tclConfig.sh
-      AC_MSG_RESULT(ok)
-      dnl no TK stuff for us.
-      dnl . ${TclLibBase}/tkConfig.sh
-    fi
-
-    if test "${with_tcl}" != no ; then
-      dnl Now, hunt for the Tcl include files, since we don't strictly
-      dnl know where they are; some folks put them (properly) in the 
-      dnl default include path, or maybe in /usr/local; the *BSD folks
-      dnl put them in other places.
-      AC_MSG_CHECKING([where Tcl includes are])
-      for tclinclude in "${TCL_PREFIX}/include/tcl${TCL_VERSION}" \
-                        "${TCL_PREFIX}/include/tcl" \
-                        "${TCL_PREFIX}/include" ; do
-        if test -r "${tclinclude}/tcl.h" ; then
-          TCL_CPPFLAGS="-I${tclinclude}"
-          break
-        fi
-      done
-      if test -z "${TCL_CPPFLAGS}" ; then
-        AC_MSG_WARN(can't find Tcl includes; use of Tcl disabled.)
-        with_tcl=no
-      fi
-      AC_MSG_RESULT(${TCL_CPPFLAGS})
-    fi
-    
-    # Finally, pick up the Tcl configuration if we haven't found an
-    # excuse not to.
-    if test "${with_tcl}" != no; then
-      dnl TCL_LIBS="${TK_LIB_SPEC} ${TK_XLIBSW} ${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC}"
-      TCL_LIBS="${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC} ${TCL_LIBS}"
-    fi
-  fi
-fi
-
-AC_SUBST(TCL_DEFS)
-AC_SUBST(TCL_LIBS)
-AC_SUBST(TCL_CPPFLAGS)
-
-# --- END CMU_TCL ---
-]) dnl CMU_TCL
diff --git a/cmulocal/telnet.m4 b/cmulocal/telnet.m4
deleted file mode 100644
index 9575fe9..0000000
--- a/cmulocal/telnet.m4
+++ /dev/null
@@ -1,180 +0,0 @@
-dnl telnet.m4--telnet special macros
-dnl Derrick Brashear
-dnl $Id: telnet.m4,v 1.13 2006/02/25 18:36:36 cg2v Exp $
-
-AC_DEFUN([CMU_TELNET_WHICH_TERM], [
-AC_CHECK_LIB(termlib, setupterm, [
-AC_DEFINE(HAVE_SETUPTERM,, [Define to 1 if you have the `setupterm' function.]) 
-AC_CHECK_LIB(c, setupterm, TCLIB="/usr/ccs/lib/libtermlib.a",TCLIB="-ltermlib","/usr/ccs/lib/libtermlib.a")
-],  TCLIB="-ltermcap")
-])
-
-AC_DEFUN([CMU_TELNET_CC_T], 
-[
-AC_MSG_CHECKING(for cc_t definition)
-AC_CACHE_VAL(cmu_cv_cc_t_definition, [
-AC_TRY_COMPILE(
-[
-#ifdef HAVE_SYS_TERMIOS_H
-#include <sys/termios.h>
-#else
-#ifdef HAVE_SYS_TERMIO_H
-#include <sys/termio.h>
-#endif
-#endif
-],
-[cc_t ffoo;],
-cmu_cv_cc_t_definition=yes,
-cmu_cv_cc_t_definition=no)
-])
-if test "$cmu_cv_cc_t_definition" = "no"; then
-        AC_DEFINE(NO_CC_T,, [The type `cc_t' is not available])
-fi
-AC_MSG_RESULT($cmu_cv_cc_t_definition)
-])
-
-AC_DEFUN([CMU_STREAMS], [
-if test "$ac_cv_header_sys_stropts_h" = "yes" -o "$ac_cv_header_stropts_h" = "yes"; then 
-	AC_DEFINE(HAVE_STREAMS,, [STREAMS are available])dnl
-fi
-])
-
-AC_DEFUN([CMU_TERMIO_MODEL], [
-if test "$ac_cv_header_sys_termio_h" = "yes" -o "$ac_cv_header_sys_termios_h" = "yes"; then 
-	AC_DEFINE(USE_TERMIO,, [Use termios for tty configuration])dnl
-	if test "$ac_cv_header_sys_termios_h" = "no"; then
-		AC_DEFINE(SYSV_TERMIO,, [Use SysV termios])dnl
-	fi
-fi
-])
-
-AC_DEFUN([CMU_TELNET_DES_STRING_TO_KEY_PROTO], [
-AC_MSG_CHECKING(for des_string_to_key prototype)
-AC_CACHE_VAL(cmu_cv_des_string_to_key_proto, [
-AC_TRY_COMPILE(
-[#include <des.h>
-typedef unsigned char Block[8];
-int  des_string_to_key(char *, Block);],
-[int foo = des_string_to_key(NULL, NULL);],
-cmu_cv_des_string_to_key_proto=no,
-cmu_cv_des_string_to_key_proto=yes)
-])
-if test "$cmu_cv_des_string_to_key_proto" = yes; then
-        AC_DEFINE(HAVE_DES_STRING_TO_KEY_PROTO,, [define to 1 if `des_string_to_key' has a prototype])dnl
-fi
-AC_MSG_RESULT($cmu_cv_des_string_to_key_proto)
-])
-
-AC_DEFUN([CMU_TELNET_DES_KEY_SCHED_PROTO], [
-AC_MSG_CHECKING(for des_key_sched prototype)
-AC_CACHE_VAL(cmu_cv_des_key_sched_proto, [
-AC_TRY_COMPILE(
-[
-#include <des.h>
-char des_key_sched(int foo, int bar);
-],
-[des_key_sched(NULL, NULL);],
-cmu_cv_des_key_sched_proto=no,
-cmu_cv_des_key_sched_proto=yes)
-])
-if test "$cmu_cv_des_key_sched_proto" = yes; then
-        AC_DEFINE(HAVE_DES_KEY_SCHED_PROTO,, [define to 1 if `des_key_sched' has a prototype])dnl
-fi
-AC_MSG_RESULT($cmu_cv_des_key_sched_proto)
-])
-
-AC_DEFUN([CMU_TELNET_DES_SET_RANDOM_GENERATOR_SEED_PROTO], [
-AC_MSG_CHECKING(for des_set_random_generator_seed prototype)
-AC_CACHE_VAL(cmu_cv_des_set_random_generator_seed_proto, [
-AC_TRY_COMPILE(
-[
-#include <des.h>
-char des_set_random_generator_seed(int foo, int bar);
-],
-[des_set_random_generator_seed(NULL, NULL);],
-cmu_cv_des_set_random_generator_seed_proto=no,
-cmu_cv_des_set_random_generator_seed_proto=yes)
-])
-if test "$cmu_cv_des_set_random_generator_seed_proto" = yes; then
-        AC_DEFINE(HAVE_DES_SET_RANDOM_GENERATOR_SEED_PROTO,, [define to 1 if `des_set_random_generator_seed' has a prototype])dnl
-fi
-AC_MSG_RESULT($cmu_cv_des_set_random_generator_seed_proto)
-])
-
-AC_DEFUN([CMU_TELNET_DES_NEW_RANDOM_KEY_PROTO], [
-AC_MSG_CHECKING(for des_new_random_key prototype)
-AC_CACHE_VAL(cmu_cv_des_new_random_key_proto, [
-AC_TRY_COMPILE(
-[
-#include <des.h>
-char des_new_random_key(int foo, int bar);
-],
-[des_new_random_key(NULL, NULL);],
-cmu_cv_des_new_random_key_proto=no,
-cmu_cv_des_new_random_key_proto=yes)
-])
-if test "$cmu_cv_des_new_random_key_proto" = yes; then
-        AC_DEFINE(HAVE_DES_NEW_RANDOM_KEY_PROTO,, [define to 1 if `des_new_random_key' has a prototype])dnl
-fi
-AC_MSG_RESULT($cmu_cv_des_new_random_key_proto)
-])
-
-AC_DEFUN([CMU_TELNET_DES_ECB_ENCRYPT_PROTO], [
-AC_MSG_CHECKING(for des_ecb_encrypt prototype)
-AC_CACHE_VAL(cmu_cv_des_ecb_encrypt_proto, [
-AC_TRY_COMPILE(
-[#include <des.h>
-typedef unsigned char Block[8];
-typedef struct { Block _; } Schedule[16];
-void des_ecb_encrypt(Block, Block, Schedule, int);],
-[int foo = des_ecb_encrypt(NULL, NULL, NULL, 0);],
-cmu_cv_des_ecb_encrypt_proto=no,
-cmu_cv_des_ecb_encrypt_proto=yes)
-])
-if test "$cmu_cv_des_ecb_encrypt_proto" = yes; then
-        AC_DEFINE(HAVE_DES_ECB_ENCRYPT_PROTO,, [define to 1 if `des_ecb_encrypt' has a prototype])dnl
-fi
-AC_MSG_RESULT($cmu_cv_des_ecb_encrypt_proto)
-])
-
-AC_DEFUN([CMU_TELNET_GETTYTAB], [
-	 if test -f "/etc/gettytab"; then
-		AC_CHECK_FUNCS(getent getstr)
-	        if test "X$ac_cv_func_getent" != "Xyes"; then
-			AC_DEFINE(HAVE_GETTYTAB,, [gettytab support is present])
-			if test "X$ac_cv_func_getstr" = "Xyes"; then
-				CFLAGS="$CFLAGS -Dgetstr=ggetstr"
-			fi
-		fi
-	 else
-		AC_CHECK_FUNCS(cgetent)
-	 fi
-	 ])
-
-AC_DEFUN([CMU_TELNET_ISSUE], [
-	 if test -f "/etc/issue.net"; then
-		AC_DEFINE(ISSUE_FILE, "/etc/issue.net", [path of issue file to use])
-	 else
-		if test -f "/etc/issue"; then
-			AC_DEFINE(ISSUE_FILE, "/etc/issue", [path of issue file to use])
-		fi
-	 fi
-	 ])
-
-AC_DEFUN([CMU_TELNET_PTYDIR], [
-
-	 if test -d /dev/pts -o -d /dev/pty; then
-	  	case "${host}" in
-		  *-*-irix*)
-		    ;;
-		  *-*-linux*)
-		    AC_DEFINE(PTYDIR,, [Has /dev/ptX and pty allocation funcs])
-		    ;;
-		  *)
-		    AC_DEFINE(PTYDIR,, [Has /dev/ptX and pty allocation funcs])
-		    AC_DEFINE(STREAMSPTY,, [ptys are streams devices])
-		    ;;
-		esac
-	 fi
-	 ])
-
diff --git a/cmulocal/ucdsnmp.m4 b/cmulocal/ucdsnmp.m4
deleted file mode 100644
index 0e34788..0000000
--- a/cmulocal/ucdsnmp.m4
+++ /dev/null
@@ -1,72 +0,0 @@
-dnl look for the (ucd|net)snmp libraries
-dnl $Id: ucdsnmp.m4,v 1.13 2010/01/06 17:01:28 murch Exp $
-
-AC_DEFUN([CMU_UCDSNMP], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-  AC_REQUIRE([CMU_SOCKETS])
-  AC_ARG_WITH(snmp, 
-              [  --with-snmp=DIR         use ucd|net snmp (rooted in DIR) [yes] ],
-              with_snmp=$withval, with_snmp=yes)
-
-  dnl
-  dnl Maintain backwards compatibility with old --with-ucdsnmp option
-  dnl
-  AC_ARG_WITH(ucdsnmp,, with_snmp=$withval,)
-
-if test "$with_snmp" != "no"; then
-
-  dnl
-  dnl Try net-snmp first
-  dnl
-  if test "$with_snmp" = "yes"; then
-    AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH])
-  else
-    SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
-  fi
-
-  if test -x "$SNMP_CONFIG"; then
-    AC_MSG_CHECKING(NET SNMP libraries)
-
-    SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
-    SNMP_PREFIX=`$SNMP_CONFIG --prefix`
-
-    if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
-      CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
-      LIB_UCDSNMP=$SNMP_LIBS
-      AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
-      AC_SUBST(LIB_UCDSNMP)
-      AC_MSG_RESULT(yes)
-      AC_CHECK_HEADERS(net-snmp/agent/agent_module_config.h,,)
-    else
-      AC_MSG_RESULT(no)
-      AC_MSG_WARN([Could not find the required paths. Please check your net-snmp installation.])
-    fi
-  else
-    dnl
-    dnl Try ucd-snmp if net-snmp test failed
-    dnl
-    if test "$with_snmp" != no; then
-      if test -d "$with_snmp"; then
-        CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
-        LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
-      fi
-      cmu_save_LIBS="$LIBS"
-      AC_CHECK_LIB(snmp, sprint_objid, [
-  		 AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)],
-  		 with_snmp=no, ${LIB_SOCKET})
-      LIBS="$cmu_save_LIBS"
-    fi
-    AC_MSG_CHECKING(UCD SNMP libraries)
-    AC_MSG_RESULT($with_snmp)
-    LIB_UCDSNMP=""
-    if test "$with_snmp" != no; then
-      AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
-      LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
-      AC_CHECK_LIB(rpm, rpmdbOpen,
-		 LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
-    fi
-    AC_SUBST(LIB_UCDSNMP)
-  fi
-fi
-
-])
diff --git a/cmulocal/util.m4 b/cmulocal/util.m4
deleted file mode 100644
index c3b0f80..0000000
--- a/cmulocal/util.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-dnl util.m4--robutil macro
-dnl Rob Earhart
-dnl $Id: util.m4,v 1.10 2003/10/08 20:35:26 rjs3 Exp $
-
-dnl robutil is a collection of stuff I (Rob Earhart) have found useful
-dnl to have around when writing code; it's the stuff I wind up rewriting
-dnl every time I start a project.  This does the autoconf setup
-dnl necessary for it.
-
-dnl This is a helper macro, here because there're times when I
-dnl want to know if a type exists or not, but don't want to define
-dnl it to something else (the way AC_CHECK_TYPE does).
-
-AC_DEFUN([CMU_CHECK_TYPE_EXISTS], [
-changequote(<<, >>)
-define(<<CMU_TYPE_NAME>>, translit(CMU_HAVE_$1, [a-z *], [A-Z_P]))
-define(<<CMU_CV_NAME>>, translit(cmu_cv_type_$1, [ *], [_p]))
-changequote([, ])
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_MSG_CHECKING(for $1)
-  AC_CACHE_VAL(CMU_CV_NAME, [
-    AC_EGREP_CPP([$1[[^a-zA-Z_0-9]]], [
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-], CMU_CV_NAME=yes, CMU_CV_NAME=no)])
-  AC_MSG_RESULT($CMU_CV_NAME)
-  if test $CMU_CV_NAME = yes; then
-    AC_DEFINE(CMU_TYPE_NAME)
-  fi
-])
-
-AC_DEFUN([CMU_UTIL], [
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AM_PROG_CC_STDC])
-  AC_REQUIRE([AC_PROG_RANLIB])
-  AC_REQUIRE([CMU_NANA])
-  AC_REQUIRE([CMU_COMERR])
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_REQUIRE([AC_TYPE_MODE_T])
-  AC_REQUIRE([AC_C_CONST])
-  AC_CHECK_HEADERS(sys/sysmacros.h)
-  AC_CHECK_HEADER(inttypes.h, AC_DEFINE(HAVE_INTTYPES_H),
-		  CMU_CHECK_TYPE_EXISTS(int8_t)
-		  CMU_CHECK_TYPE_EXISTS(uint8_t)
-		  CMU_CHECK_TYPE_EXISTS(u_int8_t)
-		  CMU_CHECK_TYPE_EXISTS(int16_t)
-		  CMU_CHECK_TYPE_EXISTS(uint16_t)
-		  CMU_CHECK_TYPE_EXISTS(u_int16_t)
-		  CMU_CHECK_TYPE_EXISTS(int32_t)
-		  CMU_CHECK_TYPE_EXISTS(uint32_t)
-		  CMU_CHECK_TYPE_EXISTS(u_int32_t)
-  )
-  dnl I'm not sure why autoconf gets so annoyed when these
-  dnl are embedded as part of the inttypes check, but, whatever,
-  dnl this works.
-  if test "$ac_cv_header_inttypes_h" = no; then
-    AC_CHECK_SIZEOF(short)
-    AC_CHECK_SIZEOF(int)
-    AC_CHECK_SIZEOF(long)
-  fi
-
-  AC_CHECK_TYPE(ssize_t, signed)
-  THREADED_UTIL_OBJECTS=""
-  AC_SUBST(THREADED_UTIL_OBJECTS)
-])
-
-AC_DEFUN([CMU_THREAD_UTIL], [
-  AC_REQUIRE([CMU_UTIL])
-  THREADED_UTIL_OBJECTS="refcache.o rselock.o"
-])
diff --git a/cmulocal/zephyr.m4 b/cmulocal/zephyr.m4
deleted file mode 100644
index c4dfd12..0000000
--- a/cmulocal/zephyr.m4
+++ /dev/null
@@ -1,155 +0,0 @@
-dnl zephyr.m4--Zephyr libraries and includes
-dnl based on kafs.m4, by
-dnl Derrick Brashear
-dnl from KTH kafs and Arla
-dnl $Id: zephyr.m4,v 1.2 2005/04/26 19:14:08 shadow Exp $
-
-AC_DEFUN([CMU_ZEPHYR_INC_WHERE1], [
-saved_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$saved_CPPFLAGS -I$1"
-AC_TRY_COMPILE(
-[#include <zephyr/zephyr.h>],
-[ZNotice_t foo;],
-ac_cv_found_zephyr_inc=yes,
-ac_cv_found_zephyr_inc=no)
-CPPFLAGS=$saved_CPPFLAGS
-])
-
-AC_DEFUN([CMU_ZEPHYR_INC_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for zephyr headers in $i)
-      CMU_ZEPHYR_INC_WHERE1($i)
-      CMU_TEST_INCPATH($i, zephyr/zephyr)
-      if test "$ac_cv_found_zephyr_inc" = "yes"; then
-        ac_cv_zephyr_where_inc=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_ZEPHYR_LIB_WHERE1], [
-saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lzephyr $KRB_LIB_FLAGS"
-AC_TRY_LINK(,
-[ZInitialize();],
-[ac_cv_found_zephyr_lib=yes],
-ac_cv_found_zephyr_lib=no)
-LIBS=$saved_LIBS
-])
-
-AC_DEFUN([CMU_ZEPHYR_LIB_WHERE], [
-   for i in $1; do
-      AC_MSG_CHECKING(for zephyr libraries in $i)
-      CMU_ZEPHYR_LIB_WHERE1($i)
-      dnl deal with false positives from implicit link paths
-      CMU_TEST_LIBPATH($i, zephyr)
-      if test "$ac_cv_found_zephyr_lib" = "yes" ; then
-        ac_cv_zephyr_where_lib=$i
-        AC_MSG_RESULT(found)
-        break
-      else
-        AC_MSG_RESULT(not found)
-      fi
-    done
-])
-
-AC_DEFUN([CMU_ZEPHYR], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_REQUIRE([CMU_SOCKETS])
-AC_REQUIRE([CMU_KRB4])
-AC_ARG_WITH(zephyr,
-        [  --with-zephyr=PREFIX      Compile with Zephyr support],
-        [if test "X$with_zephyr" = "X"; then
-                with_zephyr=yes
-        fi])
-AC_ARG_WITH(zephyr-lib,
-        [  --with-zephyr-lib=dir     use zephyr libraries in dir],
-        [if test "$withval" = "yes" -o "$withval" = "no"; then
-                AC_MSG_ERROR([No argument for --with-zephyr-lib])
-        fi])
-AC_ARG_WITH(zephyr-include,
-        [  --with-zephyr-include=dir use zephyr headers in dir],
-        [if test "$withval" = "yes" -o "$withval" = "no"; then
-                AC_MSG_ERROR([No argument for --with-zephyr-include])
-        fi])
-
-        if test "X$with_zephyr" != "X"; then
-          if test "$with_zephyr" != "yes" -a "$with_zephyr" != no; then
-            ac_cv_zephyr_where_lib=$with_zephyr/$CMU_LIB_SUBDIR
-            ac_cv_zephyr_where_inc=$with_zephyr/include
-          fi
-        fi
-
-        if test "$with_zephyr" != "no"; then 
-          if test "X$with_zephyr_lib" != "X"; then
-            ac_cv_zephyr_where_lib=$with_zephyr_lib
-          fi
-          if test "X$ac_cv_zephyr_where_lib" = "X"; then
-            CMU_ZEPHYR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
-          fi
-
-          if test "X$with_zephyr_include" != "X"; then
-            ac_cv_zephyr_where_inc=$with_zephyr_include
-          fi
-          if test "X$ac_cv_zephyr_where_inc" = "X"; then
-            CMU_ZEPHYR_INC_WHERE(/usr/athena/include /usr/local/include /usr/include)
-          fi
-        fi
-
-        AC_MSG_CHECKING(whether to include zephyr)
-        if test "X$ac_cv_zephyr_where_lib" = "X" -a "X$ac_cv_zephyr_where_inc" = "X"; then
-          ac_cv_found_zephyr=no
-          AC_MSG_RESULT(no)
-        else
-          ac_cv_found_zephyr=yes
-          AC_MSG_RESULT(yes)
-          ZEPHYR_INC_DIR=$ac_cv_zephyr_where_inc
-          ZEPHYR_LIB_DIR=$ac_cv_zephyr_where_lib
-          ZEPHYR_INC_FLAGS="-I${ZEPHYR_INC_DIR}"
-          ZEPHYR_LIB_FLAGS="-L${ZEPHYR_LIB_DIR} -lzephyr"
-	  AC_SUBST(ZEPHYT_INC_FLAGS)
-	  AC_SUBST(ZEPHYR_LIB_FLAGS)
-          if test "X$RPATH" = "X"; then
-                RPATH=""
-          fi
-          case "${host}" in
-            *-*-linux*)
-              if test "X$RPATH" = "X"; then
-                RPATH="-Wl,-rpath,${ZEPHYR_LIB_DIR}"
-              else 
-                RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
-              fi
-              ;;
-            *-*-hpux*)
-              if test "X$RPATH" = "X"; then
-                RPATH="-Wl,+b${ZEPHYR_LIB_DIR}"
-              else 
-                RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
-              fi
-              ;;
-            *-*-irix*)
-              if test "X$RPATH" = "X"; then
-                RPATH="-Wl,-rpath,${ZEPHYR_LIB_DIR}"
-              else 
-                RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
-              fi
-              ;;
-            *-*-solaris2*)
-              if test "$ac_cv_prog_gcc" = yes; then
-                if test "X$RPATH" = "X"; then
-                  RPATH="-Wl,-R${ZEPHYR_LIB_DIR}"
-                else 
-                  RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
-                fi
-              else
-                RPATH="${RPATH} -R${ZEPHYR_LIB_DIR}"
-              fi
-              ;;
-          esac
-          AC_SUBST(RPATH)
-        fi
-        ])
-
diff --git a/cmulocal/zlib.m4 b/cmulocal/zlib.m4
deleted file mode 100644
index c6dac22..0000000
--- a/cmulocal/zlib.m4
+++ /dev/null
@@ -1,39 +0,0 @@
-dnl
-dnl macros for configure.in to detect zlib
-dnl $Id: zlib.m4,v 1.4 2010/01/06 17:01:28 murch Exp $
-dnl
-
-AC_DEFUN([CMU_HAVE_ZLIB], [
-AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(zlib,[  --with-zlib=PATH        use zlib from PATH],
-	with_zlib=$withval, with_zlib="yes")
-
-	save_CPPFLAGS=$CPPFLAGS
-	save_LDFLAGS=$LDFLAGS
-
-	if test -d $with_zlib; then
-	  CPPFLAGS="${CPPFLAGS} -I${with_lib}/include"
-	  CMU_ADD_LIBPATH(${with_zlib}/$CMU_LIB_SUBDIR)
-	fi
-
-ZLIB=""
-case "$with_zlib" in
-	no)
-	  with_zlib="no";;
-	*) 
-	AC_CHECK_HEADER(zlib.h, [
-		AC_CHECK_LIB(z, deflate,
-				LIBS="${LIBS} -lz"; with_zlib="yes",
-				with_zlib="no",)],
-		with_zlib=no)
-	;;
-esac
-
-	if test "$with_zlib" != "no"; then
-		AC_DEFINE(HAVE_ZLIB,[],[Do we have zlib?])
-		ZLIB="-lz"
-	else
-		CPPFLAGS=$save_CPPFLAGS
-		LDFLAGS=$save_LDFLAGS
-	fi
-])
diff --git a/config.h.in b/config.h.in
deleted file mode 100644
index 6794af9..0000000
--- a/config.h.in
+++ /dev/null
@@ -1,622 +0,0 @@
-/* config.h.in.  Generated from configure.in by autoheader.  */
-
-
-/* acconfig.h - autoheader configuration input */
-/* 
- * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The name "Carnegie Mellon University" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For permission or any other legal
- *    details, please contact  
- *      Office of Technology Transfer
- *      Carnegie Mellon University
- *      5000 Forbes Avenue
- *      Pittsburgh, PA  15213-3890
- *      (412) 268-4387, fax: (412) 268-7395
- *      tech-transfer at andrew.cmu.edu
- *
- * 4. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by Computing Services
- *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
- *
- * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
- * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-
-/* Runtime config file location */
-#undef CONFIGDIR
-
-/* Do we need a leading _ for dlsym? */
-#undef DLSYM_NEEDS_UNDERSCORE
-
-/* Should we build a shared plugin (via dlopen) library? */
-#undef DO_DLOPEN
-
-/* should we support sasl_checkapop? */
-#undef DO_SASL_CHECKAPOP
-
-/* should we support setpass() for SRP? */
-#undef DO_SRP_SETPASS
-
-/* should we mutex-wrap calls into the GSS library? */
-#undef GSS_USE_MUTEXES
-
-/* Enable 'alwaystrue' password verifier? */
-#undef HAVE_ALWAYSTRUE
-
-/* Include support for Courier's authdaemond? */
-#undef HAVE_AUTHDAEMON
-
-/* Define to 1 if you have the <des.h> header file. */
-#undef HAVE_DES_H
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `dns_lookup' function. */
-#undef HAVE_DNS_LOOKUP
-
-/* Define to 1 if you have the `dn_expand' function. */
-#undef HAVE_DN_EXPAND
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Do we have a getaddrinfo? */
-#undef HAVE_GETADDRINFO
-
-/* Define to 1 if you have the `getdomainname' function. */
-#undef HAVE_GETDOMAINNAME
-
-/* Define to 1 if you have the `gethostname' function. */
-#undef HAVE_GETHOSTNAME
-
-/* Do we have a getnameinfo() function? */
-#undef HAVE_GETNAMEINFO
-
-/* Define to 1 if you have the `getpassphrase' function. */
-#undef HAVE_GETPASSPHRASE
-
-/* Define to 1 if you have the `getpwnam' function. */
-#undef HAVE_GETPWNAM
-
-/* Define to 1 if you have the `getspnam' function. */
-#undef HAVE_GETSPNAM
-
-/* do we have getsubopt()? */
-#undef HAVE_GETSUBOPT
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_EXT_H
-
-/* Define if you have the gssapi.h header file */
-#undef HAVE_GSSAPI_H
-
-/* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function.
-   */
-#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
-
-/* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
-#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-
-/* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
-#undef HAVE_GSS_C_NT_USER_NAME
-
-/* Define to 1 if you have the `gss_decapsulate_token' function. */
-#undef HAVE_GSS_DECAPSULATE_TOKEN
-
-/* Define to 1 if you have the `gss_encapsulate_token' function. */
-#undef HAVE_GSS_ENCAPSULATE_TOKEN
-
-/* Define to 1 if you have the `gss_get_name_attribute' function. */
-#undef HAVE_GSS_GET_NAME_ATTRIBUTE
-
-/* Define to 1 if you have the `gss_oid_equal' function. */
-#undef HAVE_GSS_OID_EQUAL
-
-/* Define if your GSSAPI implementation supports SPNEGO */
-#undef HAVE_GSS_SPNEGO
-
-/* Define to 1 if you have the `inet_aton' function. */
-#undef HAVE_INET_ATON
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `jrand48' function. */
-#undef HAVE_JRAND48
-
-/* Do we have Kerberos 4 Support? */
-#undef HAVE_KRB
-
-/* Define to 1 if you have the `krb_get_err_text' function. */
-#undef HAVE_KRB_GET_ERR_TEXT
-
-/* Define to 1 if you have the <lber.h> header file. */
-#undef HAVE_LBER_H
-
-/* Define to 1 if you have the <ldap.h> header file. */
-#undef HAVE_LDAP_H
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the `memcpy' function. */
-#undef HAVE_MEMCPY
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `mkdir' function. */
-#undef HAVE_MKDIR
-
-/* Do we have mysql support? */
-#undef HAVE_MYSQL
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
-/* Do we have OpenSSL? */
-#undef HAVE_OPENSSL
-
-/* Use OPIE for server-side OTP? */
-#undef HAVE_OPIE
-
-/* Define to 1 if you have the <pam/pam_appl.h> header file. */
-#undef HAVE_PAM_PAM_APPL_H
-
-/* Define to 1 if you have the <paths.h> header file. */
-#undef HAVE_PATHS_H
-
-/* Do we have Postgres support? */
-#undef HAVE_PGSQL
-
-/* Include Support for pwcheck daemon? */
-#undef HAVE_PWCHECK
-
-/* Include support for saslauthd? */
-#undef HAVE_SASLAUTHD
-
-/* Define to 1 if you have the <security/pam_appl.h> header file. */
-#undef HAVE_SECURITY_PAM_APPL_H
-
-/* Define to 1 if you have the `select' function. */
-#undef HAVE_SELECT
-
-/* Does the system have snprintf()? */
-#undef HAVE_SNPRINTF
-
-/* Does sockaddr have an sa_len? */
-#undef HAVE_SOCKADDR_SA_LEN
-
-/* Define to 1 if you have the `socket' function. */
-#undef HAVE_SOCKET
-
-/* Do we have a socklen_t? */
-#undef HAVE_SOCKLEN_T
-
-/* Do we have SQLite support? */
-#undef HAVE_SQLITE
-
-/* Do we have SQLite3 support? */
-#undef HAVE_SQLITE3
-
-/* Is there an ss_family in sockaddr_storage? */
-#undef HAVE_SS_FAMILY
-
-/* Define to 1 if you have the <stdarg.h> header file. */
-#undef HAVE_STDARG_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strspn' function. */
-#undef HAVE_STRSPN
-
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
-
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
-
-/* Do we have struct sockaddr_stroage? */
-#undef HAVE_STRUCT_SOCKADDR_STORAGE
-
-/* Define to 1 if you have the <sysexits.h> header file. */
-#undef HAVE_SYSEXITS_H
-
-/* Define to 1 if you have the `syslog' function. */
-#undef HAVE_SYSLOG
-
-/* Define to 1 if you have the <syslog.h> header file. */
-#undef HAVE_SYSLOG_H
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_DIR_H
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_NDIR_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <varargs.h> header file. */
-#undef HAVE_VARARGS_H
-
-/* Does the system have vsnprintf()? */
-#undef HAVE_VSNPRINTF
-
-/* define if your compiler has __attribute__ */
-#undef HAVE___ATTRIBUTE__
-
-/* Should we keep handle to Berkeley DB open in SASLDB plugin? */
-#undef KEEP_DB_OPEN
-
-/* Ignore IP Address in Kerberos 4 tickets? */
-#undef KRB4_IGNORE_IP_ADDRESS
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Where do we look for Courier authdaemond's socket? */
-#undef PATH_AUTHDAEMON_SOCKET
-
-/* Where do we look for saslauthd's socket? */
-#undef PATH_SASLAUTHD_RUNDIR
-
-/* Runtime plugin location */
-#undef PLUGINDIR
-
-/* Force a preferred mechanism */
-#undef PREFER_MECH
-
-/* Location of pwcheck socket */
-#undef PWCHECKDIR
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Use BerkeleyDB for SASLdb */
-#undef SASL_BERKELEYDB
-
-/* Path to default SASLdb database */
-#undef SASL_DB_PATH
-
-/* File to use for source of randomness */
-#undef SASL_DEV_RANDOM
-
-/* Use GDBM for SASLdb */
-#undef SASL_GDBM
-
-/* Use NDBM for SASLdb */
-#undef SASL_NDBM
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* Link ANONYMOUS Statically */
-#undef STATIC_ANONYMOUS
-
-/* Link CRAM-MD5 Statically */
-#undef STATIC_CRAMMD5
-
-/* Link DIGEST-MD5 Statically */
-#undef STATIC_DIGESTMD5
-
-/* Link GSSAPI Statically */
-#undef STATIC_GSSAPIV2
-
-/* User KERBEROS_V4 Staticly */
-#undef STATIC_KERBEROS4
-
-/* Link ldapdb plugin Statically */
-#undef STATIC_LDAPDB
-
-/* Link LOGIN Statically */
-#undef STATIC_LOGIN
-
-/* Link NTLM Statically */
-#undef STATIC_NTLM
-
-/* Link OTP Statically */
-#undef STATIC_OTP
-
-/* Link PASSDSS Statically */
-#undef STATIC_PASSDSS
-
-/* Link PLAIN Staticly */
-#undef STATIC_PLAIN
-
-/* Link SASLdb Staticly */
-#undef STATIC_SASLDB
-
-/* Link SCRAM Statically */
-#undef STATIC_SCRAM
-
-/* Link SQL plugin statically */
-#undef STATIC_SQL
-
-/* Link SRP Statically */
-#undef STATIC_SRP
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Should we try to dlopen() plugins while statically compiled? */
-#undef TRY_DLOPEN_WHEN_STATIC
-
-/* use the doors IPC API for saslauthd? */
-#undef USE_DOORS
-
-/* Version number of package */
-#undef VERSION
-
-/* Use DES */
-#undef WITH_DES
-
-/* Linking against dmalloc? */
-#undef WITH_DMALLOC
-
-/* Use internal RC4 implementation? */
-#undef WITH_RC4
-
-/* Use OpenSSL DES Implementation */
-#undef WITH_SSL_DES
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef mode_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-
-
-
-/* Create a struct iovec if we need one */
-#if !defined(_WIN32)
-#if !defined(HAVE_SYS_UIO_H)
-/* (win32 is handled in sasl.h) */
-struct iovec {
-    char *iov_base;
-    long iov_len;
-};
-#else
-#include <sys/types.h>
-#include <sys/uio.h>
-#endif
-#endif
-
-/* location of the random number generator */
-#ifdef DEV_RANDOM
-#undef DEV_RANDOM
-#endif
-#define DEV_RANDOM SASL_DEV_RANDOM
-
-/* if we've got krb_get_err_txt, we might as well use it;
-   especially since krb_err_txt isn't in some newer distributions
-   (MIT Kerb for Mac 4 being a notable example). If we don't have
-   it, we fall back to the krb_err_txt array */
-#ifdef HAVE_KRB_GET_ERR_TEXT
-#define get_krb_err_txt krb_get_err_text
-#else
-#define get_krb_err_txt(X) (krb_err_txt[(X)])
-#endif
-
-/* Make Solaris happy... */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__
-#endif
-
-/* Make Linux happy... */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef HAVE___ATTRIBUTE__
-/* Can't use attributes... */
-#define __attribute__(foo)
-#endif
-
-#define SASL_PATH_ENV_VAR "SASL_PATH"
-#define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
-
-#include <stdlib.h>
-#include <sys/types.h>
-#ifndef WIN32
-# include <sys/socket.h>
-# include <netdb.h>
-# include <netinet/in.h>
-# ifdef HAVE_SYS_PARAM_H
-#  include <sys/param.h>
-# endif
-#else /* WIN32 */
-# include <winsock2.h>
-#endif /* WIN32 */
-#include <string.h>
-
-#ifndef HAVE_SOCKLEN_T
-typedef unsigned int socklen_t;
-#endif /* HAVE_SOCKLEN_T */
-
-#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(WIN32)
-#define	_SS_MAXSIZE	128	/* Implementation specific max size */
-#define	_SS_PADSIZE	(_SS_MAXSIZE - sizeof (struct sockaddr))
-
-struct sockaddr_storage {
-	struct	sockaddr ss_sa;
-	char		__ss_pad2[_SS_PADSIZE];
-};
-# define ss_family ss_sa.sa_family
-#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
-
-#ifndef AF_INET6
-/* Define it to something that should never appear */
-#define	AF_INET6	AF_MAX
-#endif
-
-#ifndef HAVE_GETADDRINFO
-#define	getaddrinfo	sasl_getaddrinfo
-#define	freeaddrinfo	sasl_freeaddrinfo
-#define	gai_strerror	sasl_gai_strerror
-#endif
-
-#ifndef HAVE_GETNAMEINFO
-#define	getnameinfo	sasl_getnameinfo
-#endif
-
-#if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
-#include "gai.h"
-#endif
-
-#ifndef AI_NUMERICHOST   /* support glibc 2.0.x */
-#define AI_NUMERICHOST  4
-#define NI_NUMERICHOST  2
-#define NI_NAMEREQD     4
-#define NI_NUMERICSERV  8
-#endif
-
-/* Defined in RFC 1035. max strlen is only 253 due to length bytes. */
-#ifndef MAXHOSTNAMELEN
-#define        MAXHOSTNAMELEN  255
-#endif
-
-#ifndef HAVE_SYSEXITS_H
-#include "exits.h"
-#else
-#include "sysexits.h"
-#endif
-
-/* Get the correct time.h */
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#ifndef HIER_DELIMITER
-#define HIER_DELIMITER '/'
-#endif
-
-#ifdef WIN32
-#define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
-#define SASL_PLUGIN_PATH_ATTR "SearchPath"
-#define SASL_CONF_PATH_ATTR "ConfFile"
-
-#include <windows.h>
-inline static unsigned int sleep(unsigned int seconds) {
-       Sleep(seconds * 1000);
-       return 0;
-}
-#endif
-
-#endif /* CONFIG_H */
-
diff --git a/config/.gitignore b/config/.gitignore
new file mode 100644
index 0000000..5e7d273
--- /dev/null
+++ b/config/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
diff --git a/config/config.guess b/config/config.guess
deleted file mode 100755
index f7dd69e..0000000
--- a/config/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
-
-timestamp='2011-08-20'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches at gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep -q __ELF__
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-		os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	exitcode=$?
-	trap '' 0
-	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-	echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
-	SUN_ARCH="i386"
-	# If there is a compiler, see if it is configured for 64-bit objects.
-	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		grep IS_64BIT_ARCH >/dev/null
-	    then
-		SUN_ARCH="x86_64"
-	    fi
-	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
-	exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
-	exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
-	exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-	# DG/UX returns AViiON for all architectures
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
-	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[4567])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-			esac ;;
-		    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
-
-		#define _HPUX_SOURCE
-		#include <stdlib.h>
-		#include <unistd.h>
-
-		int main ()
-		{
-		#if defined(_SC_KERNEL_BITS)
-		    long bits = sysconf(_SC_KERNEL_BITS);
-		#endif
-		    long cpu  = sysconf (_SC_CPU_VERSION);
-
-		    switch (cpu)
-			{
-			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-			case CPU_PA_RISC2_0:
-		#if defined(_SC_KERNEL_BITS)
-			    switch (bits)
-				{
-				case 64: puts ("hppa2.0w"); break;
-				case 32: puts ("hppa2.0n"); break;
-				default: puts ("hppa2.0"); break;
-				} break;
-		#else  /* !defined(_SC_KERNEL_BITS) */
-			    puts ("hppa2.0"); break;
-		#endif
-			default: puts ("hppa1.0"); break;
-			}
-		    exit (0);
-		}
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep -q __LP64__
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-	exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-	exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-	exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-	exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case ${UNAME_PROCESSOR} in
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-	# uname -m includes "-pc" on this system.
-	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:*)
-	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    8664:Windows_NT:*)
-	echo x86_64-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-	esac
-	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    arm*:Linux:*:*)
-	eval $set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
-	else
-	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-		| grep -q __ARM_PCS_VFP
-	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
-	    fi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-	echo frv-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	LIBC=gnu
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:* | mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef ${UNAME_MACHINE}
-	#undef ${UNAME_MACHINE}el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=${UNAME_MACHINE}el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=${UNAME_MACHINE}
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-	# Unixware is an offshoot of SVR4, but it has its own version
-	# number series starting with 2...
-	# I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-	# Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-	# uname -m prints for DJGPP always 'pc', but it prints nothing about
-	# the processor, so we play safe by assuming i586.
-	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configury will decide that
-	# this is a cross-build.
-	echo i586-pc-msdosdjgpp
-	exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-	OS_REL='.3'
-	test -r /etc/.relid \
-	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-			# says <Richard.M.Bartel at ccMail.Census.GOV>
-	echo i586-unisys-sysv4
-	exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv${UNAME_RELEASE}
-	else
-		echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-	exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-    i*86:AROS:*:*)
-	echo ${UNAME_MACHINE}-pc-aros
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-	"4"
-#else
-	""
-#endif
-	); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config/config.sub b/config/config.sub
deleted file mode 100755
index da19a88..0000000
--- a/config/config.sub
+++ /dev/null
@@ -1,1764 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
-
-timestamp='2011-08-23'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray | -microblaze)
-		os=
-		basic_machine=$1
-		;;
-	-bluegene*)
-		os=-cnk
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
-	-chorusrdb)
-		os=-chorusrdb
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-        | be32 | be64 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| le32 | le64 \
-	| lm32 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64octeon | mips64octeonel \
-	| mips64orion | mips64orionel \
-	| mips64r5900 | mips64r5900el \
-	| mips64vr | mips64vrel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| moxie \
-	| mt \
-	| msp430 \
-	| nds32 | nds32le | nds32be \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| open8 \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle \
-	| pyramid \
-	| rx \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu \
-	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-	| ubicom32 \
-	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| we32k \
-	| x86 | xc16x | xstormy16 | xtensa \
-	| z8k | z80)
-		basic_machine=$basic_machine-unknown
-		;;
-	c54x)
-		basic_machine=tic54x-unknown
-		;;
-	c55x)
-		basic_machine=tic55x-unknown
-		;;
-	c6x)
-		basic_machine=tic6x-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	strongarm | thumb | xscale)
-		basic_machine=arm-unknown
-		;;
-
-	xscaleeb)
-		basic_machine=armeb-unknown
-		;;
-
-	xscaleel)
-		basic_machine=armel-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| be32-* | be64-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| le32-* | le64-* \
-	| lm32-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64octeon-* | mips64octeonel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64r5900-* | mips64r5900el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nds32-* | nds32le-* | nds32be-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| open8-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
-	| tahoe-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile*-* \
-	| tron-* \
-	| ubicom32-* \
-	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-	| vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* \
-	| xstormy16-* | xtensa*-* \
-	| ymp-* \
-	| z8k-* | z80-*)
-		;;
-	# Recognize the basic CPU types without company name, with glob match.
-	xtensa*)
-		basic_machine=$basic_machine-unknown
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aros)
-		basic_machine=i386-pc
-		os=-aros
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	blackfin)
-		basic_machine=bfin-unknown
-		os=-linux
-		;;
-	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	bluegene*)
-		basic_machine=powerpc-ibm
-		os=-cnk
-		;;
-	c54x-*)
-		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c55x-*)
-		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c6x-*)
-		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	cegcc)
-		basic_machine=arm-unknown
-		os=-cegcc
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16 | cr16-*)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dicos)
-		basic_machine=i686-pc
-		os=-dicos
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m68knommu)
-		basic_machine=m68k-unknown
-		os=-linux
-		;;
-	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	microblaze)
-		basic_machine=microblaze-xilinx
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	nacl)
-		basic_machine=le32-unknown
-		os=-nacl
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	neo-tandem)
-		basic_machine=neo-tandem
-		;;
-	nse-tandem)
-		basic_machine=nse-tandem
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	parisc)
-		basic_machine=hppa-unknown
-		os=-linux
-		;;
-	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc | ppcbe)	basic_machine=powerpc-unknown
-		;;
-	ppc-* | ppcbe-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	strongarm-* | thumb-*)
-		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tile*)
-		basic_machine=$basic_machine-unknown
-		os=-linux-gnu
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	xscale-* | xscalee[bl]-*)
-		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	z80-*-coff)
-		basic_machine=z80-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-	# First match some system type aliases
-	# that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-auroraux)
-		os=-auroraux
-		;;
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-	      | -sym* | -kopensolaris* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-	-os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-dicos*)
-		os=-dicos
-		;;
-	-nacl*)
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	score-*)
-		os=-elf
-		;;
-	spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-	c4x-* | tic4x-*)
-		os=-coff
-		;;
-	tic54x-*)
-		os=-coff
-		;;
-	tic55x-*)
-		os=-coff
-		;;
-	tic6x-*)
-		os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-cnk*|-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config/depcomp b/config/depcomp
deleted file mode 100755
index 807b991..0000000
--- a/config/depcomp
+++ /dev/null
@@ -1,423 +0,0 @@
-#! /bin/sh
-
-# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
-
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  outname="$stripped.o"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      tmpdepfile1="$dir.libs/$base.lo.d"
-      tmpdepfile2="$dir.libs/$base.d"
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1="$dir$base.o.d"
-      tmpdepfile2="$dir$base.d"
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
-      exit $stat
-   fi
-
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.  We will use -o /dev/null later,
-  # however we can't do the remplacement now because
-  # `-o $object' might simply not be used
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    -*)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
-    *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
diff --git a/config/install-sh b/config/install-sh
deleted file mode 100755
index 36f96f3..0000000
--- a/config/install-sh
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd=$cpprog
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd=$stripprog
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "$0: no input file specified" >&2
-	exit 1
-else
-	:
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-
-	if [ -d "$dst" ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
-	else
-		echo "$0: $src does not exist" >&2
-		exit 1
-	fi
-
-	if [ x"$dst" = x ]
-	then
-		echo "$0: no destination specified" >&2
-		exit 1
-	else
-		:
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d "$dst" ]
-	then
-		dst=$dst/`basename "$src"`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp=$pathcomp$1
-	shift
-
-	if [ ! -d "$pathcomp" ] ;
-        then
-		$mkdirprog "$pathcomp"
-	else
-		:
-	fi
-
-	pathcomp=$pathcomp/
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd "$dst" &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		dstfile=`basename "$dst" $transformbasename |
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		:
-	fi
-
-# Make a couple of temp file names in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-	rmtmp=$dstdir/#rm.$$#
-
-# Trap to clean up temp files at exit.
-
-	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
-	trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# Now remove or move aside any old file at destination location.  We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons.  In this case, the final cleanup
-# might fail but the new file should still install successfully.
-
-{
-	if [ -f "$dstdir/$dstfile" ]
-	then
-		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
-		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
-		{
-		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		  (exit 1); exit
-		}
-	else
-		:
-	fi
-} &&
-
-# Now rename the file to the real destination.
-
-	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-
-fi &&
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-
-{
-	(exit 0); exit
-}
diff --git a/config/kerberos_v4.m4 b/config/kerberos_v4.m4
deleted file mode 100644
index 7884743..0000000
--- a/config/kerberos_v4.m4
+++ /dev/null
@@ -1,153 +0,0 @@
-dnl checking for kerberos 4 libraries (and DES)
-
-AC_DEFUN([SASL_DES_CHK], [
-AC_ARG_WITH(des, [  --with-des=DIR          with DES (look in DIR) [yes] ],
-	with_des=$withval,
-	with_des=yes)
-
-LIB_DES=""
-if test "$with_des" != no; then
-  if test -d $with_des; then
-    CPPFLAGS="$CPPFLAGS -I${with_des}/include"
-    LDFLAGS="$LDFLAGS -L${with_des}/lib"
-  fi
-
-  if test "$with_openssl" != no; then
-    dnl check for openssl installing -lcrypto, then make vanilla check
-    AC_CHECK_LIB(crypto, des_cbc_encrypt, [
-        AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
-                                       LIB_DES="-lcrypto";
-                                       with_des=yes],
-                       with_des=no)],
-        with_des=no, $LIB_RSAREF)
-
-    dnl same test again, different symbol name
-    if test "$with_des" = no; then
-      AC_CHECK_LIB(crypto, DES_cbc_encrypt, [
-        AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
-                                       LIB_DES="-lcrypto";
-                                       with_des=yes],
-                       with_des=no)],
-        with_des=no, $LIB_RSAREF)
-    fi
-  fi
-
-  if test "$with_des" = no; then
-    AC_CHECK_LIB(des, des_cbc_encrypt, [LIB_DES="-ldes";
-                                        with_des=yes], with_des=no)
-  fi
-
-  if test "$with_des" = no; then
-     AC_CHECK_LIB(des425, des_cbc_encrypt, [LIB_DES="-ldes425";
-                                       with_des=yes], with_des=no)
-  fi
-
-  if test "$with_des" = no; then
-     AC_CHECK_LIB(des524, des_cbc_encrypt, [LIB_DES="-ldes524";
-                                       with_des=yes], with_des=no)
-  fi
-
-  if test "$with_des" = no; then
-    dnl if openssl is around, we might be able to use that for des
-
-    dnl if openssl has been compiled with the rsaref2 libraries,
-    dnl we need to include the rsaref libraries in the crypto check
-    LIB_RSAREF=""
-    AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
-                 LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes,
-                 cmu_have_rsaref=no)
-
-    AC_CHECK_LIB(crypto, des_cbc_encrypt, [
-	AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
-					LIB_DES="-lcrypto";
-					with_des=yes],
-			with_des=no)], 
-        with_des=no, $LIB_RSAREF)
-  fi
-fi
-
-if test "$with_des" != no; then
-  AC_DEFINE(WITH_DES,[],[Use DES])
-fi
-
-AC_SUBST(LIB_DES)
-])
-
-AC_DEFUN([SASL_KERBEROS_V4_CHK], [
-  AC_REQUIRE([SASL_DES_CHK])
-
-  AC_ARG_ENABLE(krb4, [  --enable-krb4           enable KERBEROS_V4 authentication [[no]] ],
-    krb4=$enableval,
-    krb4=no)
-
-  if test "$krb4" != no; then
-    dnl In order to compile kerberos4, we need libkrb and libdes.
-    dnl (We've already gotten libdes from SASL_DES_CHK)
-    dnl we might need -lresolv for kerberos
-    AC_CHECK_LIB(resolv,res_search)
-
-    dnl if we were ambitious, we would look more aggressively for the
-    dnl krb4 install
-    if test -d ${krb4}; then
-       AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
-         for krbhloc in include/kerberosIV include/kerberos include
-         do
-           if test -f ${krb4}/${krbhloc}/krb.h ; then
-             cyrus_krbinclude=${krb4}/${krbhloc}
-             break
-           fi
-         done
-         ])
-
-       if test -n "${cyrus_krbinclude}"; then
-         CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
-       fi
-       LDFLAGS="$LDFLAGS -L$krb4/lib"
-    fi
-
-    if test "$with_des" != no; then
-      AC_CHECK_HEADER(krb.h, [
-        AC_CHECK_LIB(com_err, com_err, [
-	  AC_CHECK_LIB(krb, krb_mk_priv,
-                     [COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
-                     krb4lib=no, $LIB_DES -lcom_err)], [
-    	  AC_CHECK_LIB(krb, krb_mk_priv,
-                     [COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
-                     krb4lib=no, $LIB_DES)])], krb4="no")
-
-      if test "$krb4" != "no" -a "$krb4lib" = "no"; then
-	AC_CHECK_LIB(krb4, krb_mk_priv,
-                     [COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes],
-                     krb4=no, $LIB_DES)
-      fi
-      if test "$krb4" = no; then
-          AC_WARN(No Kerberos V4 found)
-      fi
-    else
-      AC_WARN(No DES library found for Kerberos V4 support)
-      krb4=no
-    fi
-  fi
-
-  if test "$krb4" != no; then
-    cmu_save_LIBS="$LIBS"
-    LIBS="$LIBS $SASL_KRB_LIB"
-    AC_CHECK_FUNCS(krb_get_err_text)
-    LIBS="$cmu_save_LIBS"
-  fi
-
-  AC_MSG_CHECKING(KERBEROS_V4)
-  if test "$krb4" != no; then
-    AC_MSG_RESULT(enabled)
-    SASL_MECHS="$SASL_MECHS libkerberos4.la"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
-    AC_DEFINE(STATIC_KERBEROS4,[],[User KERBEROS_V4 Staticly])
-    AC_DEFINE(HAVE_KRB,[],[Do we have Kerberos 4 Support?])
-    SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
-  else
-    AC_MSG_RESULT(disabled)
-  fi
-  AC_SUBST(SASL_KRB_LIB)
-])
-
diff --git a/config/libtool.m4 b/config/libtool.m4
deleted file mode 100644
index f134d1d..0000000
--- a/config/libtool.m4
+++ /dev/null
@@ -1,430 +0,0 @@
-## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
-## Copyright (C) 1996-1999 Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# 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 \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# 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'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-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"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
-  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
-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 __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); 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"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
-  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
-  ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_SHARED], [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[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],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_STATIC], [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[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],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL], [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[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],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  ac_prog=`($CC -print-prog-name=ld) 2>&5`
-  case "$ac_prog" in
-    # Accept absolute paths.
-changequote(,)dnl
-    [\\/]* | [A-Za-z]:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
-      # 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
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[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])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# 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])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[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])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
-  # These system don't have libm
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, main, LIBM="-lm")
-  ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case "$enable_ltdl_convenience" in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
-  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, main,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
-    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    INCLTDL=
-  fi
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN([AM_ENABLE_SHARED], [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN([AM_ENABLE_STATIC], [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN([AM_DISABLE_SHARED], [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN([AM_DISABLE_STATIC], [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN([AM_PROG_LD], [indir([AC_PROG_LD])])dnl
-AC_DEFUN([AM_PROG_NM], [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
diff --git a/config/ltconfig b/config/ltconfig
deleted file mode 100755
index e9ca47c..0000000
--- a/config/ltconfig
+++ /dev/null
@@ -1,3150 +0,0 @@
-#! /bin/sh
-
-# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A lot of this script is taken from autoconf-2.10.
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-echo=echo
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec "$SHELL" "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# Find the correct PATH separator.  Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
-  UNAME=${UNAME-`uname 2>/dev/null`}
-  case X$UNAME in
-    *-DOS) PATH_SEPARATOR=';' ;;
-    *)     PATH_SEPARATOR=':' ;;
-  esac
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test "X${echo_test_string+set}" != Xset; then
-  # find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
-   test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-  for dir in $PATH /usr/ucb; do
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running ltconfig again with it.
-      ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
-    else
-      # Try using printf.
-      echo='printf "%s\n"'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
-	   test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-	CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL $0 --fallback-echo"
-      elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
-	   test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-	echo="$CONFIG_SHELL $0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
-
-	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
-	    break
-	  fi
-	  prev="$cmd"
-	done
-
-	if test "$prev" != 'sed 50q "$0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# The name of this program.
-progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
-
-# Constants:
-PROGRAM=ltconfig
-PACKAGE=libtool
-VERSION=1.3.5
-TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-rm="rm -f"
-
-help="Try \`$progname --help' for more information."
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-enable_shared=yes
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-enable_static=yes
-enable_fast_install=yes
-enable_dlopen=unknown
-enable_win32_dll=no
-ltmain=
-silent=
-srcdir=
-ac_config_guess=
-ac_config_sub=
-host=
-nonopt=
-ofile="$default_ofile"
-verify_host=yes
-with_gcc=no
-with_gnu_ld=no
-need_locks=yes
-ac_ext=c
-objext=o
-libext=a
-exeext=
-cache_file=
-
-old_AR="$AR"
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-old_CPPFLAGS="$CPPFLAGS"
-old_LDFLAGS="$LDFLAGS"
-old_LD="$LD"
-old_LN_S="$LN_S"
-old_LIBS="$LIBS"
-old_NM="$NM"
-old_RANLIB="$RANLIB"
-old_DLLTOOL="$DLLTOOL"
-old_OBJDUMP="$OBJDUMP"
-old_AS="$AS"
-
-# Parse the command line options.
-args=
-prev=
-for option
-do
-  case "$option" in
-  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    eval "$prev=\$option"
-    prev=
-    continue
-  fi
-
-  case "$option" in
-  --help) cat <<EOM
-Usage: $progname [OPTION]... [HOST [LTMAIN]]
-
-Generate a system-specific libtool script.
-
-    --debug                enable verbose shell tracing
-    --disable-shared       do not build shared libraries
-    --disable-static       do not build static libraries
-    --disable-fast-install do not optimize for fast installation
-    --enable-dlopen        enable dlopen support
-    --enable-win32-dll     enable building dlls on win32 hosts
-    --help                 display this help and exit
-    --no-verify            do not verify that HOST is a valid host type
--o, --output=FILE          specify the output file [default=$default_ofile]
-    --quiet                same as \`--silent'
-    --silent               do not print informational messages
-    --srcdir=DIR           find \`config.guess' in DIR
-    --version              output version information and exit
-    --with-gcc             assume that the GNU C compiler will be used
-    --with-gnu-ld          assume that the C compiler uses the GNU linker
-    --disable-lock         disable file locking
-    --cache-file=FILE      configure cache file
-
-LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
-that provides basic libtool functionality.
-
-HOST is the canonical host system name [default=guessed].
-EOM
-  exit 0
-  ;;
-
-  --debug)
-    echo "$progname: enabling shell trace mode"
-    set -x
-    ;;
-
-  --disable-shared) enable_shared=no ;;
-
-  --disable-static) enable_static=no ;;
-
-  --disable-fast-install) enable_fast_install=no ;;
-
-  --enable-dlopen) enable_dlopen=yes ;;
-
-  --enable-win32-dll) enable_win32_dll=yes ;;
-
-  --quiet | --silent) silent=yes ;;
-
-  --srcdir) prev=srcdir ;;
-  --srcdir=*) srcdir="$optarg" ;;
-
-  --no-verify) verify_host=no ;;
-
-  --output | -o) prev=ofile ;;
-  --output=*) ofile="$optarg" ;;
-
-  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
-
-  --with-gcc) with_gcc=yes ;;
-  --with-gnu-ld) with_gnu_ld=yes ;;
-
-  --disable-lock) need_locks=no ;;
-
-  --cache-file=*) cache_file="$optarg" ;;
-
-  -*)
-    echo "$progname: unrecognized option \`$option'" 1>&2
-    echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    if test -z "$ltmain"; then
-      ltmain="$option"
-    elif test -z "$host"; then
-# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
-#      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
-#        echo "$progname: warning \`$option' is not a valid host type" 1>&2
-#      fi
-      host="$option"
-    else
-      echo "$progname: too many arguments" 1>&2
-      echo "$help" 1>&2
-      exit 1
-    fi ;;
-  esac
-done
-
-if test -z "$ltmain"; then
-  echo "$progname: you must specify a LTMAIN file" 1>&2
-  echo "$help" 1>&2
-  exit 1
-fi
-
-if test ! -f "$ltmain"; then
-  echo "$progname: \`$ltmain' does not exist" 1>&2
-  echo "$help" 1>&2
-  exit 1
-fi
-
-# Quote any args containing shell metacharacters.
-ltconfig_args=
-for arg
-do
-  case "$arg" in
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ltconfig_args="$ltconfig_args '$arg'" ;;
-  *) ltconfig_args="$ltconfig_args $arg" ;;
-  esac
-done
-
-# A relevant subset of AC_INIT.
-
-# 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
-# 5 compiler messages saved in config.log
-# 6 checking for... messages and results
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>>./config.log
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
-if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
-
-if test -n "$cache_file" && test -r "$cache_file"; then
-  echo "loading cache $cache_file within ltconfig"
-  . $cache_file
-fi
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  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
-
-if test -z "$srcdir"; then
-  # Assume the source directory is the same one as the path to LTMAIN.
-  srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
-  test "$srcdir" = "$ltmain" && srcdir=.
-fi
-
-trap "$rm conftest*; exit 1" 1 2 15
-if test "$verify_host" = yes; then
-  # Check for config.guess and config.sub.
-  ac_aux_dir=
-  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-    if test -f $ac_dir/config.guess; then
-      ac_aux_dir=$ac_dir
-      break
-    fi
-  done
-  if test -z "$ac_aux_dir"; then
-    echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
-    echo "$help" 1>&2
-    exit 1
-  fi
-  ac_config_guess=$ac_aux_dir/config.guess
-  ac_config_sub=$ac_aux_dir/config.sub
-
-  # Make sure we can run config.sub.
-  if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
-  else
-    echo "$progname: cannot run $ac_config_sub" 1>&2
-    echo "$help" 1>&2
-    exit 1
-  fi
-
-  echo $ac_n "checking host system type""... $ac_c" 1>&6
-
-  host_alias=$host
-  case "$host_alias" in
-  "")
-    if host_alias=`$SHELL $ac_config_guess`; then :
-    else
-      echo "$progname: cannot guess host type; you must specify one" 1>&2
-      echo "$help" 1>&2
-      exit 1
-    fi ;;
-  esac
-  host=`$SHELL $ac_config_sub $host_alias`
-  echo "$ac_t$host" 1>&6
-
-  # Make sure the host verified.
-  test -z "$host" && exit 1
-
-elif test -z "$host"; then
-  echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
-  echo "$help" 1>&2
-  exit 1
-else
-  host_alias=$host
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case "$host_os" in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-case "$host_os" in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR cru $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-# Set a sane default for `AR'.
-test -z "$AR" && AR=ar
-
-# Set a sane default for `OBJDUMP'.
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-# If RANLIB is not set, then run the test.
-if test "${RANLIB+set}" != "set"; then
-  result=no
-
-  echo $ac_n "checking for ranlib... $ac_c" 1>&6
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
-      RANLIB="ranlib"
-      result="ranlib"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  echo "$ac_t$result" 1>&6
-fi
-
-if test -n "$RANLIB"; then
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-fi
-
-# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$AS" && AS=as
-
-# Check to see if we are using GCC.
-if test "$with_gcc" != yes || test -z "$CC"; then
-  # If CC is not set, then try to find GCC or a usable CC.
-  if test -z "$CC"; then
-    echo $ac_n "checking for gcc... $ac_c" 1>&6
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
-	CC="gcc"
-	break
-      fi
-    done
-    IFS="$save_ifs"
-
-    if test -n "$CC"; then
-      echo "$ac_t$CC" 1>&6
-    else
-      echo "$ac_t"no 1>&6
-    fi
-  fi
-
-  # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
-  if test -z "$CC"; then
-    echo $ac_n "checking for cc... $ac_c" 1>&6
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-    cc_rejected=no
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
-	if test "$dir/cc" = "/usr/ucb/cc"; then
-	  cc_rejected=yes
-	  continue
-	fi
-	CC="cc"
-	break
-      fi
-    done
-    IFS="$save_ifs"
-    if test $cc_rejected = yes; then
-      # We found a bogon in the path, so make sure we never use it.
-      set dummy $CC
-      shift
-      if test $# -gt 0; then
-	# We chose a different compiler from the bogus one.
-	# However, it has the same name, so the bogon will be chosen
-	# first if we set CC to just the name; use the full file name.
-	shift
-	set dummy "$dir/cc" "$@"
-	shift
-	CC="$@"
-      fi
-    fi
-
-    if test -n "$CC"; then
-      echo "$ac_t$CC" 1>&6
-    else
-      echo "$ac_t"no 1>&6
-    fi
-
-    if test -z "$CC"; then
-      echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
-      exit 1
-    fi
-  fi
-
-  # Now see if the compiler is really GCC.
-  with_gcc=no
-  echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
-  echo "$progname:581: checking whether we are using GNU C" >&5
-
-  $rm conftest.c
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-    with_gcc=yes
-  fi
-  $rm conftest.c
-  echo "$ac_t$with_gcc" 1>&6
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
-
-echo $ac_n "checking for object suffix... $ac_c" 1>&6
-$rm conftest*
-echo 'int i = 1;' > conftest.c
-echo "$progname:603: checking for object suffix" >& 5
-if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
-  # Append any warnings to the config.log.
-  cat conftest.err 1>&5
-
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  cat conftest.err 1>&5
-  echo "$progname: failed program was:" >&5
-  cat conftest.c >&5
-fi
-$rm conftest*
-echo "$ac_t$objext" 1>&6
-
-echo $ac_n "checking for executable suffix... $ac_c" 1>&6
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_exeext="no"
-  $rm conftest*
-  echo 'main () { return 0; }' > conftest.c
-  echo "$progname:629: checking for executable suffix" >& 5
-  if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
-    # Append any warnings to the config.log.
-    cat conftest.err 1>&5
-
-    for ac_file in conftest.*; do
-      case $ac_file in
-      *.c | *.err | *.$objext ) ;;
-      *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
-      esac
-    done
-  else
-    cat conftest.err 1>&5
-    echo "$progname: failed program was:" >&5
-    cat conftest.c >&5
-  fi
-  $rm conftest*
-fi
-if test "X$ac_cv_exeext" = Xno; then
-  exeext=""
-else
-  exeext="$ac_cv_exeext"
-fi
-echo "$ac_t$ac_cv_exeext" 1>&6
-
-echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
-pic_flag=
-special_shlib_compile_flags=
-wl=
-link_static_flag=
-no_builtin_flag=
-
-if test "$with_gcc" = yes; then
-  wl='-Wl,'
-  link_static_flag='-static'
-
-  case "$host_os" in
-  beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
-    # PIC is the default for these OSes.
-    ;;
-  aix*)
-    # Below there is a dirty hack to force normal static linking with -ldl
-    # The problem is because libdl dynamically linked with both libc and
-    # libC (AIX C++ library), which obviously doesn't included in libraries
-    # list by gcc. This cause undefined symbols with -static flags.
-    # This hack allows C programs to be linked with "-static -ldl", but
-    # we not sure about C++ programs.
-    link_static_flag="$link_static_flag ${wl}-lC"
-    ;;
-  cygwin* | mingw* | os2*)
-    # We can build DLLs from non-PIC.
-    ;;
-  darwin* | rhapsody*)
-    # PIC is the default on this platform
-    # Common symbols not allowed in MH_DYLIB files
-    pic_flag='-fno-common'
-    ;;
-  amigaos*)
-    # FIXME: we need at least 68020 code to build shared libraries, but
-    # adding the `-m68020' flag to GCC prevents building anything better,
-    # like `-m68040'.
-    pic_flag='-m68020 -resident32 -malways-restore-a4'
-    ;;
-  sysv4*MP*)
-    if test -d /usr/nec; then
-       pic_flag=-Kconform_pic
-    fi
-    ;;
-  *)
-    pic_flag='-fPIC'
-    ;;
-  esac
-else
-  # PORTME Check for PIC flags for the system compiler.
-  case "$host_os" in
-  aix3* | aix4*)
-    # All AIX code is PIC.
-    link_static_flag='-bnso -bI:/lib/syscalls.exp'
-    ;;
-
-  hpux9* | hpux10* | hpux11*)
-    # Is there a better link_static_flag that works with the bundled CC?
-    wl='-Wl,'
-    link_static_flag="${wl}-a ${wl}archive"
-    pic_flag='+Z'
-    ;;
-
-  irix5* | irix6*)
-    wl='-Wl,'
-    link_static_flag='-non_shared'
-    # PIC (with -KPIC) is the default.
-    ;;
-
-  cygwin* | mingw* | os2*)
-    # We can build DLLs from non-PIC.
-    ;;
-
-  osf3* | osf4* | osf5*)
-    # All OSF/1 code is PIC.
-    wl='-Wl,'
-    link_static_flag='-non_shared'
-    ;;
-
-  sco3.2v5*)
-    pic_flag='-Kpic'
-    link_static_flag='-dn'
-    special_shlib_compile_flags='-belf'
-    ;;
-
-  solaris*)
-    pic_flag='-KPIC'
-    link_static_flag='-Bstatic'
-    wl='-Wl,'
-    ;;
-
-  sunos4*)
-    pic_flag='-PIC'
-    link_static_flag='-Bstatic'
-    wl='-Qoption ld '
-    ;;
-
-  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-    pic_flag='-KPIC'
-    link_static_flag='-Bstatic'
-    wl='-Wl,'
-    ;;
-
-  uts4*)
-    pic_flag='-pic'
-    link_static_flag='-Bstatic'
-    ;;
-  sysv4*MP*)
-    if test -d /usr/nec ;then
-      pic_flag='-Kconform_pic'
-      link_static_flag='-Bstatic'
-    fi
-    ;;
-  *)
-    can_build_shared=no
-    ;;
-  esac
-fi
-
-if test -n "$pic_flag"; then
-  echo "$ac_t$pic_flag" 1>&6
-
-  # Check to make sure the pic_flag actually works.
-  echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
-  $rm conftest*
-  echo "int some_variable = 0;" > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $pic_flag -DPIC"
-  echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5
-  if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
-    # Append any warnings to the config.log.
-    cat conftest.err 1>&5
-    
-    case "$host_os" in
-    hpux9* | hpux10* | hpux11*)
-      # On HP-UX, both CC and GCC only warn that PIC is supported... then they
-      # create non-PIC objects.  So, if there were any warnings, we assume that
-      # PIC is not supported.
-      if test -s conftest.err; then
-	echo "$ac_t"no 1>&6
-	can_build_shared=no
-	pic_flag=
-      else
-	echo "$ac_t"yes 1>&6
-	pic_flag=" $pic_flag"
-      fi
-      ;;
-    *)
-      echo "$ac_t"yes 1>&6
-      pic_flag=" $pic_flag"
-      ;;
-    esac
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    can_build_shared=no
-    pic_flag=
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-else
-  echo "$ac_t"none 1>&6
-fi
-
-# Check to see if options -o and -c are simultaneously supported by compiler
-echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-$rm conftest*
-echo "int some_variable = 0;" > conftest.c
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory.  Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.o"
-echo "$progname:834: checking if $compiler supports -c -o file.o" >&5
-if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
-
-  # The compiler can only warn and ignore the option if not recognized
-  # So say no if there are warnings
-    if test -s out/conftest.err; then
-      echo "$ac_t"no 1>&6
-      compiler_c_o=no
-    else
-      echo "$ac_t"yes 1>&6
-      compiler_c_o=yes
-    fi
-else
-  # Append any errors to the config.log.
-  cat out/conftest.err 1>&5
-  compiler_c_o=no
-  echo "$ac_t"no 1>&6
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-
-if test x"$compiler_c_o" = x"yes"; then
-  # Check to see if we can write to a .lo
-  echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
-  $rm conftest*
-  echo "int some_variable = 0;" > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -c -o conftest.lo"
-  echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5
-if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
-
-    # The compiler can only warn and ignore the option if not recognized
-    # So say no if there are warnings
-      if test -s conftest.err; then
-	echo "$ac_t"no 1>&6
-	compiler_o_lo=no
-      else
-	echo "$ac_t"yes 1>&6
-	compiler_o_lo=yes
-      fi
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    compiler_o_lo=no
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-else
-  compiler_o_lo=no
-fi
-
-# Check to see if we can do hard links to lock some files if needed
-hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$ac_t$hard_links" 1>&6
-  $rm conftest*
-  if test "$hard_links" = no; then
-    echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-if test "$with_gcc" = yes; then
-  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
-  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
-  $rm conftest*
-  echo "int some_variable = 0;" > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
-  echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-  if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
-
-    # The compiler can only warn and ignore the option if not recognized
-    # So say no if there are warnings
-      if test -s conftest.err; then
-	echo "$ac_t"no 1>&6
-	compiler_rtti_exceptions=no
-      else
-	echo "$ac_t"yes 1>&6
-	compiler_rtti_exceptions=yes
-      fi
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    compiler_rtti_exceptions=no
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-
-  if test "$compiler_rtti_exceptions" = "yes"; then
-    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
-  else
-    no_builtin_flag=' -fno-builtin'
-  fi
-  
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$special_shlib_compile_flags"; then
-  echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$special_shlib_compile_flags[ 	]" >/dev/null; then :
-  else
-    echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
-    can_build_shared=no
-  fi
-fi
-
-echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
-$rm conftest*
-echo 'main(){return(0);}' > conftest.c
-save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  echo "$ac_t$link_static_flag" 1>&6
-else
-  echo "$ac_t"none 1>&6
-  link_static_flag=
-fi
-LDFLAGS="$save_LDFLAGS"
-$rm conftest*
-
-if test -z "$LN_S"; then
-  # Check to see if we can use ln -s, or we need hard links.
-  echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
-  $rm conftest.dat
-  if ln -s X conftest.dat 2>/dev/null; then
-    $rm conftest.dat
-    LN_S="ln -s"
-  else
-    LN_S=ln
-  fi
-  if test "$LN_S" = "ln -s"; then
-    echo "$ac_t"yes 1>&6
-  else
-    echo "$ac_t"no 1>&6
-  fi
-fi
-
-# Make sure LD is an absolute path.
-if test -z "$LD"; then
-  ac_prog=ld
-  if test "$with_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 "$progname:996: 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 are not 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 "$progname:1020: checking for GNU ld" >&5
-  else
-    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-    echo "$progname:1023: checking for non-GNU ld" >&5
-  fi
-
-  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
-	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 "$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"
-  fi
-
-  if test -n "$LD"; then
-    echo "$ac_t$LD" 1>&6
-  else
-    echo "$ac_t"no 1>&6
-  fi
-
-  if test -z "$LD"; then
-    echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
-    exit 1
-  fi
-fi
-
-# Check to see if it really is or is not GNU ld.
-echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
-# 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
-  with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-echo "$ac_t$with_gnu_ld" 1>&6
-
-# See if the linker supports building shared libraries.
-echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# include_expsyms should be a list of space-separated symbols to be *always*
-# included in the symbol list
-include_expsyms=
-# exclude_expsyms can be an egrep regular expression of symbols to exclude
-# it will be wrapped by ` (' and `)$', so one must not match beginning or
-# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-# as well as any symbol that contains `d'.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-# platforms (ab)use it in PIC code, but their linkers get confused if
-# the symbol is explicitly referenced.  Since portable code cannot
-# rely on this symbol name, it's probably fine to never include it in
-# preloaded symbol tables.
-
-case "$host_os" in
-cygwin* | mingw*)
-  # FIXME: the MSVC++ port hasn't been tested in a loooong time
-  # When not using gcc, we currently assume that we are using
-  # Microsoft Visual C++.
-  if test "$with_gcc" != yes; then
-    with_gnu_ld=no
-  fi
-  ;;
-
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
-  # If archive_cmds runs LD, not CC, wlarc should be empty
-  wlarc='${wl}'
-
-  # See if GNU ld supports shared libraries.
-  case "$host_os" in
-  aix3* | aix4*)
-    # On AIX, the GNU linker is very broken
-    ld_shlibs=no
-    cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-    ;;
-
-  amigaos*)
-    archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-
-    # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-    # that the semantics of dynamic libraries on AmigaOS, at least up
-    # to version 4, is to share data among multiple programs linked
-    # with the same dynamic library.  Since this doesn't match the
-    # behavior of shared libraries on other platforms, we can use
-    # them.
-    ld_shlibs=no
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      allow_undefined_flag=unsupported
-      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-
-  cygwin* | mingw*)
-    # hardcode_libdir_flag_spec is actually meaningless, as there is
-    # no search path for DLLs.
-    hardcode_libdir_flag_spec='-L$libdir'
-    allow_undefined_flag=unsupported
-    always_export_symbols=yes
-
-    # Extract the symbol export list from an `--export-all' def file,
-    # then regenerate the def file from the symbol export list, so that
-    # the compiled dll only exports the symbol export list.
-    # Be careful not to strip the DATA tag left by newer dlltools.
-    export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
-      test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
-      $DLLTOOL --export-all --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
-      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
-
-    # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
-      _lt_hint=1;
-      cat $export_symbols | while read symbol; do
-        set dummy \$symbol;
-        case \$# in
-          2) echo "	\$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
-          *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
-        esac;
-	_lt_hint=`expr 1 + \$_lt_hint`;
-      done~
-      test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
-      test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
-      $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
-      $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
-      $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
-
-      old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' 
-    ;;
-
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
-      # can we support soname and/or expsyms with a.out? -oliva
-    fi
-    ;;
-
-  solaris* | sysv5*)
-    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-      ld_shlibs=no
-      cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;      
-
-  sunos4*)
-    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    wlarc=
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-  esac
-
-  if test "$ld_shlibs" = yes; then
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    case $host_os in
-    cygwin* | mingw*)
-      # dlltool doesn't understand --whole-archive et. al.
-      whole_archive_flag_spec=
-      ;;
-    *)
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-        whole_archive_flag_spec=
-      fi
-      ;;
-    esac
-  fi
-else
-  # PORTME fill in a description of your system's linker (not GNU ld)
-  case "$host_os" in
-  aix3*)
-    allow_undefined_flag=unsupported
-    always_export_symbols=yes
-    archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
-    # Note: this linker hardcodes the directories in LIBPATH if there
-    # are no directories specified by -L.
-    hardcode_minus_L=yes
-    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
-      # Neither direct hardcoding nor static linking is supported with a
-      # broken collect2.
-      hardcode_direct=unsupported
-    fi
-    ;;
-
-  aix4*)
-    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
-    hardcode_libdir_separator=':'
-    if test "$with_gcc" = yes; then
-      collect2name=`${CC} -print-prog-name=collect2`
-      if test -f "$collect2name" && \
-	 strings "$collect2name" | grep resolve_lib_name >/dev/null
-      then
-	# We have reworked collect2
-	hardcode_direct=yes
-      else
-	# We have old collect2
-	hardcode_direct=unsupported
-	# It fails to find uninstalled libraries when the uninstalled
-	# path is not listed in the libpath.  Setting hardcode_minus_L
-	# to unsupported forces relinking
-	hardcode_minus_L=yes
-	hardcode_libdir_flag_spec='-L$libdir'
-	hardcode_libdir_separator=
-      fi
-      shared_flag='-shared'
-    else
-      shared_flag='${wl}-bM:SRE'
-      hardcode_direct=yes
-    fi
-    allow_undefined_flag=' ${wl}-berok'
-    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
-    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
-    case "$host_os" in aix4.[01]|aix4.[01].*)
-      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
-      always_export_symbols=yes ;;
-    esac
-   ;;
-
-  amigaos*)
-    archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    # see comment about different semantics on the GNU ld section
-    ld_shlibs=no
-    ;;
-
-  cygwin* | mingw*)
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    # hardcode_libdir_flag_spec is actually meaningless, as there is
-    # no search path for DLLs.
-    hardcode_libdir_flag_spec=' '
-    allow_undefined_flag=unsupported
-    # Tell ltmain to make .lib files, not .a files.
-    libext=lib
-    # FIXME: Setting linknames here is a bad hack.
-    archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-    # The linker will automatically build a .lib file if we build a DLL.
-    old_archive_from_new_cmds='true'
-    # FIXME: Should let the user specify the lib program.
-    old_archive_cmds='lib /OUT:$oldlib$oldobjs'
-    fix_srcfile_path='`cygpath -w $srcfile`'
-    ;;
-
-  freebsd1*)
-    ld_shlibs=no
-    ;;
-
-  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-  # support.  Future versions do this automatically, but an explicit c++rt0.o
-  # does not break anything, and helps significantly (at the cost of a little
-  # extra space).
-  freebsd2.2*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-  freebsd2*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-  freebsd*)
-    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  darwin[15].* | rhapsody*)
-    allow_undefined_flag='-undefined error'
-    archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname) $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
-    # We need to add '_' to the symbols in $export_symbols first
-    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    whole_archive_flag_spec='-all_load $convenience'
-    ;;
-
-  # Mac OS X v10.2 uses bash for /bin/sh instead of zsh, and the quoting syntax is incompatible
-  darwin*)
-    allow_undefined_flag='-undefined error'
-    archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $LD_RUN_PATH/$soname $tmp_verstring)'
-    # We need to add '_' to the symbols in $export_symbols first
-    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    whole_archive_flag_spec='-all_load $convenience'
-    ;;
-
-  hpux9* | hpux10* | hpux11*)
-    case "$host_os" in
-    hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
-    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
-    esac
-    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator=:
-    hardcode_direct=yes
-    hardcode_minus_L=yes # Not in the search PATH, but as the default
-			 # location of the library.
-    export_dynamic_flag_spec='${wl}-E'
-    ;;
-
-  irix5* | irix6*)
-    if test "$with_gcc" = yes; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-    else
-      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'  # a.out
-    else
-      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts'      # ELF
-    fi
-    hardcode_libdir_flag_spec='${wl}-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  os2*)
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    allow_undefined_flag=unsupported
-    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
-    old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
-    ;;
-
-  osf3*)
-    if test "$with_gcc" = yes; then
-      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-    else
-      allow_undefined_flag=' -expect_unresolved \*'
-      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-
-  osf4* | osf5*)  # As osf3* with the addition of the -msym flag
-    if test "$with_gcc" = yes; then
-      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-    else
-      allow_undefined_flag=' -expect_unresolved \*'
-      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-                                       
-  sco3.2v5*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_shlibpath_var=no
-    runpath_var=LD_RUN_PATH
-    hardcode_runpath_var=yes
-    ;;
-
-  solaris*)
-    no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_shlibpath_var=no
-    case "$host_os" in
-    solaris2.[0-5] | solaris2.[0-5].*) ;;
-    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-    esac
-    ;;
-
-  sunos4*)
-    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4)
-    if test "x$host_vendor" = xsequent; then
-      # Use $CC to link under sequent, because it throws in some extra .o 
-      # files that make .init and .fini sections work.
-      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
-    else
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    fi
-    runpath_var='LD_RUN_PATH'
-    hardcode_shlibpath_var=no
-    hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
-    ;;  
-
-  sysv4.3*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_shlibpath_var=no
-    export_dynamic_flag_spec='-Bexport'
-    ;;
-
-  sysv5*)
-    no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
-    hardcode_libdir_flag_spec=
-    hardcode_shlibpath_var=no
-    runpath_var='LD_RUN_PATH'
-    ;;
-
-  uts4*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_shlibpath_var=no
-    ;;
-
-  dgux*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4*MP*)
-    if test -d /usr/nec; then
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-      hardcode_shlibpath_var=no
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
-      ld_shlibs=yes
-    fi
-    ;;
-
-  sysv4.2uw2*)
-    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
-    hardcode_direct=yes
-    hardcode_minus_L=no
-    hardcode_shlibpath_var=no
-    hardcode_runpath_var=yes
-    runpath_var=LD_RUN_PATH
-    ;;
-
-  unixware7*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    runpath_var='LD_RUN_PATH'
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    ld_shlibs=no
-    ;;
-  esac
-fi
-echo "$ac_t$ld_shlibs" 1>&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-if test -z "$NM"; then
-  echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
-  case "$NM" in
-  [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
-  *)
-    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-    for ac_dir in $PATH /usr/ucb /usr/ccs/bin /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
-	  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
-	  NM="$ac_dir/nm -p"
-	  break
-	else
-	  NM=${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 "$NM" && NM=nm
-    ;;
-  esac
-  echo "$ac_t$NM" 1>&6
-fi
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
-  ;;
-irix*)
-  symcode='[BCDEGRST]'
-  ;;
-solaris*)
-  symcode='[BDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[ABCDGISTW]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Write the raw and C identifiers.
-  global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode\)[ 	][ 	]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-  $rm conftest*
-  cat > conftest.c <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  echo "$progname:1662: checking if global_symbol_pipe works" >&5
-  if { (eval echo $progname:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { echo "$progname:1666: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
-
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-	  # Now generate the symbol file.
-	  eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
-
-	  cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
-	  sed 's/^. \(.*\) \(.*\)$/  {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
-	  cat <<\EOF >> conftest.c
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$objext conftstm.$objext
-	  save_LIBS="$LIBS"
-	  save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$objext"
-	  CFLAGS="$CFLAGS$no_builtin_flag"
-	  if { (eval echo $progname:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-	    pipe_works=yes
-	  else
-	    echo "$progname: failed program was:" >&5
-	    cat conftest.c >&5
-	  fi
-	  LIBS="$save_LIBS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&5
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $global_symbol_pipe" >&5
-    fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.c >&5
-  fi
-  $rm conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    global_symbol_pipe=
-  fi
-done
-if test "$pipe_works" = yes; then
-  echo "${ac_t}ok" 1>&6
-else
-  echo "${ac_t}failed" 1>&6
-fi
-
-if test -z "$global_symbol_pipe"; then
-  global_symbol_to_cdecl=
-fi
-
-# Check hardcoding attributes.
-echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var"; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$hardcode_shlibpath_var" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-echo "$ac_t$hardcode_action" 1>&6
-
-
-reload_flag=
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
-# PORTME Some linkers may need a different reload flag.
-reload_flag='-r'
-echo "$ac_t$reload_flag" 1>&6
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-# PORTME Fill in your ld.so characteristics
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-file_magic_cmd=
-file_magic_test_file=
-deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
-case "$host_os" in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
-  ;;
-
-aix4*)
-  version_type=linux
-  # AIX has no versioning support, so currently we can not hardcode correct
-  # soname into executable. Probably we can add versioning support to
-  # collect2, so additional links can be useful in future.
-  # We preserve .a as extension for shared libraries though AIX4.2
-  # and later linker supports .so
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
-  shlibpath_var=LIBPATH
-  deplibs_check_method=pass_all
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}.so'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  deplibs_check_method=pass_all
-  lt_cv_dlopen="load_add_on"
-  lt_cv_dlopen_libs=
-  lt_cv_dlopen_self=yes
-  ;;
-
-bsdi4*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=/shlib/libc.so
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  export_dynamic_flag_spec=-rdynamic
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw*)
-  version_type=windows
-  need_version=no
-  need_lib_prefix=no
-  if test "$with_gcc" = yes; then
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
-  else
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
-  fi
-  dynamic_linker='Win32 ld.exe'
-  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  file_magic_cmd='${OBJDUMP} -f'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  lt_cv_dlopen="LoadLibrary"
-  lt_cv_dlopen_libs=
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-  
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case "$version_type" in
-    freebsd-elf*)
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
-      file_magic_cmd=/usr/bin/file
-      file_magic_test_file=`echo /usr/lib/libc.so*`
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      deplibs_check_method=unknown
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case "$host_os" in
-  freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  *) # from 3.2 on
-    shlibpath_overrides_runpath=no
-    ;;
-  esac
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  deplibs_check_method='file_magic Mach-O (64-bit )?dynamically linked shared library'
-  file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[012])
-    file_magic_test_file='/System/Library/Frameworks/System.framework/System'
-    ;;
-  *) # Darwin 1.3 on
-    file_magic_test_file='/usr/lib/libSystem.dylib'
-    ;;
-  esac
-  library_names_spec='${libname}.$(test x$module = xyes && echo plugin || echo dylib)'
-  soname_spec='${libname}.$(test x$module = xyes && echo plugin || echo dylib)'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  dynamic_linker="$host_os dld.sl"
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  shlibpath_var=SHLIB_PATH
-  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-  soname_spec='${libname}${release}.sl$major'
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  case "$host_os" in
-  hpux10.20*)
-    # TODO:  Does this work for hpux-11 too?
-    deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    file_magic_cmd=/usr/bin/file
-    file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-irix5* | irix6*)
-  version_type=irix
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so.$major'
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
-  case "$host_os" in
-  irix5*)
-    libsuff= shlibsuff=
-    # this will be overridden with pass_all, but let us keep it just in case
-    deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
-    ;;
-  *)
-    case "$LD" in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  deplibs_check_method='pass_all'
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  deplibs_check_method=pass_all
-
-  if test -f /lib/ld.so.1; then
-    dynamic_linker='GNU ld.so'
-  else
-    # Only the GNU ld.so supports shared libraries on MkLinux.
-    case "$host_cpu" in
-    powerpc*) dynamic_linker=no ;;
-    *) dynamic_linker='Linux ld.so' ;;
-    esac
-  fi
-  ;;
-
-netbsd*)
-  version_type=sunos
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-openbsd*)
-  version_type=sunos
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-    need_version=no
-  fi
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-os2*)
-  libname_spec='$name'
-  need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  # this will be overridden with pass_all, but let us keep it just in case
-  deplibs_check_method='file_magic COFF format alpha shared library'
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=/shlib/libc.so
-  deplibs_check_method='pass_all'
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=/lib/libc.so
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case "$host_vendor" in
-    sequent)
-      file_magic_cmd='/bin/file'
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-      ;;
-    ncr)
-      deplibs_check_method='pass_all'
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-      file_magic_cmd=/usr/bin/file
-      file_magic_test_file=`echo /usr/lib/libc.so*`
-      ;;
-  esac
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$ac_t$dynamic_linker" 1>&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-# Report the final consequences.
-echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
-
-# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
-# configure.in, otherwise build static only libraries.
-case "$host_os" in
-cygwin* | mingw* | os2*)
-  if test x$can_build_shared = xyes; then
-    test x$enable_win32_dll = xno && can_build_shared=no
-    echo "checking if package supports dlls... $can_build_shared" 1>&6
-  fi
-;;
-esac
-
-if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
-  case "$deplibs_check_method" in
-  "file_magic "*)
-    file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-    if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-       egrep "$file_magic_regex" > /dev/null; then
-      :
-    else
-      cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-    fi ;;
-  esac
-fi
-
-echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4*)
-  test "$enable_shared" = yes && enable_static=no
-  ;;
-esac
-
-echo "$ac_t$enable_shared" 1>&6
-
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-
-# Propagate what we've learned...
-ac_cv_can_build_shared="$can_build_shared"
-
-echo "checking whether to build static libraries... $enable_static" 1>&6
-
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-echo $ac_n "checking for objdir... $ac_c" 1>&6
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-echo "$ac_t$objdir" 1>&6
-
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
-  lt_cv_dlopen=no lt_cv_dlopen_libs=
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "$progname:2270: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2278 "ltconfig"
-/* 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo $progname:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "$progname:2310: checking for dlopen" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2315 "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen(); 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-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_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-dlopen();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_dlopen=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_dlopen=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="dlopen"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "$progname:2357: checking for dld_link in -ldld" >&5
-ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2365 "ltconfig"
-/* 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link();
-
-int main() {
-dld_link()
-; return 0; }
-EOF
-if { (eval echo $progname:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "$progname:2397: checking for shl_load" >&5
-if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2402 "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load(); 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load();
-
-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_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-shl_load();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_shl_load=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_shl_load=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="shl_load"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "$progname:2445: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2453 "ltconfig"
-#include "confdefs.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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo $progname:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-fi
-
-    
-fi
-
-  
-fi
-
-
-fi
-
-fi
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  fi
-
-  case "$lt_cv_dlopen" in
-  dlopen)
-for ac_hdr in dlfcn.h; do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "$progname:2510: 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 2515 "ltconfig"
-#include <$ac_hdr>
-int fnord = 0;
-EOF
-ac_try="$ac_compile >/dev/null 2>conftest.out"
-{ (eval echo $progname:2520: \"$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 "$progname: 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
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-    if test "x$ac_cv_header_dlfcn_h" = xyes; then
-      CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-    fi
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-  echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:2548: checking whether a program can dlopen itself" >&5
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    lt_cv_dlopen_self=cross
-  else
-    cat > conftest.c <<EOF
-#line 2556 "ltconfig"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL	RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-#  define LTDL_GLOBAL	DL_GLOBAL
-# else
-#  define LTDL_GLOBAL	0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-#  define LTDL_LAZY_OR_NOW	RTLD_LAZY
-# else
-#  ifdef DL_LAZY
-#   define LTDL_LAZY_OR_NOW	DL_LAZY
-#  else
-#   ifdef RTLD_NOW
-#    define LTDL_LAZY_OR_NOW	RTLD_NOW
-#   else
-#    ifdef DL_NOW
-#     define LTDL_LAZY_OR_NOW	DL_NOW
-#    else
-#     define LTDL_LAZY_OR_NOW	0
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
-    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
-	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
-
-EOF
-if { (eval echo $progname:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  lt_cv_dlopen_self=yes
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  lt_cv_dlopen_self=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self" 1>&6
-
-  if test "$lt_cv_dlopen_self" = yes; then
-    LDFLAGS="$LDFLAGS $link_static_flag"
-  echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:2621: checking whether a statically linked program can dlopen itself" >&5
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    lt_cv_dlopen_self_static=cross
-  else
-    cat > conftest.c <<EOF
-#line 2629 "ltconfig"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL	RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-#  define LTDL_GLOBAL	DL_GLOBAL
-# else
-#  define LTDL_GLOBAL	0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-#  define LTDL_LAZY_OR_NOW	RTLD_LAZY
-# else
-#  ifdef DL_LAZY
-#   define LTDL_LAZY_OR_NOW	DL_LAZY
-#  else
-#   ifdef RTLD_NOW
-#    define LTDL_LAZY_OR_NOW	RTLD_NOW
-#   else
-#    ifdef DL_NOW
-#     define LTDL_LAZY_OR_NOW	DL_NOW
-#    else
-#     define LTDL_LAZY_OR_NOW	0
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
-    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
-    if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
-
-EOF
-if { (eval echo $progname:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  lt_cv_dlopen_self_static=yes
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  lt_cv_dlopen_self_static=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
-fi
-    ;;
-  esac
-
-  case "$lt_cv_dlopen_self" in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case "$lt_cv_dlopen_self_static" in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-
-# Copy echo and quote the copy, instead of the original, because it is
-# used later.
-ltecho="$echo"
-if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   ltecho="$CONFIG_SHELL \$0 --fallback-echo"
-fi
-LTSHELL="$SHELL"
-
-LTCONFIG_VERSION="$VERSION"
-
-# Only quote variables if we're using ltmain.sh.
-case "$ltmain" in
-*.sh)
-  # Now quote all the things that may contain metacharacters.
-  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
-    old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
-    AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
-    reload_flag reload_cmds wl \
-    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
-    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
-    library_names_spec soname_spec \
-    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
-    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
-    file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
-    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
-    hardcode_libdir_flag_spec hardcode_libdir_separator  \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
-
-    case "$var" in
-    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case "$ltecho" in
-  *'\$0 --fallback-echo"')
-    ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-  trap "$rm \"$ofile\"; exit 1" 1 2 15
-  echo "creating $ofile"
-  $rm "$ofile"
-  cat <<EOF > "$ofile"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
-#
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-### BEGIN LIBTOOL CONFIG
-EOF
-  cfgfile="$ofile"
-  ;;
-
-*)
-  # Double-quote the variables that need it (for aesthetics).
-  for var in old_CC old_CFLAGS old_CPPFLAGS \
-    old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
-    eval "$var=\\\"\$var\\\""
-  done
-
-  # Just create a config file.
-  cfgfile="$ofile.cfg"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  echo "creating $cfgfile"
-  $rm "$cfgfile"
-  cat <<EOF > "$cfgfile"
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-EOF
-  ;;
-esac
-
-cat <<EOF >> "$cfgfile"
-# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
-# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
-# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
-# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
-#   $0$ltconfig_args
-#
-# Compiler and other test output produced by $progname, useful for
-# debugging $progname, is in ./config.log if it exists.
-
-# The version of $progname that generated this script.
-LTCONFIG_VERSION=$LTCONFIG_VERSION
-
-# Shell to use when invoking shell scripts.
-SHELL=$LTSHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$ltecho
-
-# The archiver.
-AR=$AR
-
-# The default C compiler.
-CC=$CC
-
-# The linker used to build libraries.
-LD=$LD
-
-# Whether we need hard or soft links.
-LN_S=$LN_S
-
-# A BSD-compatible nm program.
-NM=$NM
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$reload_flag
-reload_cmds=$reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$wl
-
-# Object file suffix (normally "o").
-objext="$objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$pic_flag
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$compiler_c_o
-
-# Can we write directly to a .lo ?
-compiler_o_lo=$compiler_o_lo
-
-# Must we lock files when doing compilation ?
-need_locks=$need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$link_static_flag
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$RANLIB
-old_archive_cmds=$old_archive_cmds
-old_postinstall_cmds=$old_postinstall_cmds
-old_postuninstall_cmds=$old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$old_archive_from_new_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$archive_cmds
-archive_expsym_cmds=$archive_expsym_cmds
-postinstall_cmds=$postinstall_cmds
-postuninstall_cmds=$postuninstall_cmds
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$global_symbol_to_cdecl
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$include_expsyms
-
-EOF
-
-case "$ltmain" in
-*.sh)
-  echo '### END LIBTOOL CONFIG' >> "$ofile"
-  echo >> "$ofile"
-  case "$host_os" in
-  aix3*)
-    cat <<\EOF >> "$ofile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # Append the ltmain.sh script.
-  sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-
-  chmod +x "$ofile"
-  ;;
-
-*)
-  # Compile the libtool program.
-  echo "FIXME: would compile $ltmain"
-  ;;
-esac
-
-test -n "$cache_file" || exit 0
-
-# AC_CACHE_SAVE
-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
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/config/ltmain.sh b/config/ltmain.sh
deleted file mode 100644
index 7612481..0000000
--- a/config/ltmain.sh
+++ /dev/null
@@ -1,4059 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun ltconfig.
-#
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.3.5
-TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo '' | od -x` in
-*15*) # EBCDIC based system
-  SP2NL='tr \100 \025'
-  NL2SP='tr \025 \100'
-  ;;
-*) # Assume ASCII based system
-  SP2NL='tr \040 \012'
-  NL2SP='tr \015\012 \040\040'
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-if test "$LTCONFIG_VERSION" != "$VERSION"; then
-  echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  echo "$modename: not configured to build any kind of library" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-# Parse our command line options once, thoroughly.
-while test $# -gt 0
-do
-  arg="$1"
-  shift
-
-  case "$arg" in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case "$prev" in
-    execute_dlfiles)
-      eval "$prev=\"\$$prev \$arg\""
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case "$arg" in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    exit 0
-    ;;
-
-  --config)
-    sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
-    exit 0
-    ;;
-
-  --debug)
-    echo "$progname: enabling shell trace mode"
-    set -x
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
-    else
-      echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
-    else
-      echo "disable static libraries"
-    fi
-    exit 0
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --quiet | --silent)
-    show=:
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    case "$nonopt" in
-    *cc | *++ | gcc* | *-gcc*)
-      mode=link
-      for arg
-      do
-	case "$arg" in
-	-c)
-	   mode=compile
-	   break
-	   ;;
-	esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-	if test -n "$nonopt"; then
-	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-	else
-	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-	fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case "$mode" in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    lastarg=
-    srcfile="$nonopt"
-    suppress_output=
-
-    user_target=no
-    for arg
-    do
-      # Accept any command-line options.
-      case "$arg" in
-      -o)
-	if test "$user_target" != "no"; then
-	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	  exit 1
-	fi
-	user_target=next
-	;;
-
-      -static)
-	build_old_libs=yes
-	continue
-	;;
-      esac
-
-      case "$user_target" in
-      next)
-	# The next one is the -o target name
-	user_target=yes
-	continue
-	;;
-      yes)
-	# We got the output file
-	user_target=set
-	libobj="$arg"
-	continue
-	;;
-      esac
-
-      # Accept the current argument as the source file.
-      lastarg="$srcfile"
-      srcfile="$arg"
-
-      # Aesthetically quote the previous argument.
-
-      # Backslashify any backslashes, double quotes, and dollar signs.
-      # These are the only characters that are still specially
-      # interpreted inside of double-quoted scrings.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly in scan
-      # sets, so we specify it separately.
-      case "$lastarg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      # Add the previous argument to base_compile.
-      if test -z "$base_compile"; then
-	base_compile="$lastarg"
-      else
-	base_compile="$base_compile $lastarg"
-      fi
-    done
-
-    case "$user_target" in
-    set)
-      ;;
-    no)
-      # Get the name of the library object.
-      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    *)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSfmso]'
-    case "$libobj" in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case "$libobj" in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $libobj"
-    else
-      removelist="$libobj"
-    fi
-
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit 1" 1 2 15
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit 1" 1 2 15
-    else
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until ln "$0" "$lockfile" 2>/dev/null; do
-	$show "Waiting for $lockfile to be removed"
-	sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-	echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-      echo $srcfile > "$lockfile"
-    fi
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      # All platforms use -DPIC, to notify preprocessed assembler code.
-      command="$base_compile $srcfile $pic_flag -DPIC"
-      if test "$build_old_libs" = yes; then
-	lo_libobj="$libobj"
-	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
-	if test "X$dir" = "X$libobj"; then
-	  dir="$objdir"
-	else
-	  dir="$dir/$objdir"
-	fi
-	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
-
-	if test -d "$dir"; then
-	  $show "$rm $libobj"
-	  $run $rm $libobj
-	else
-	  $show "$mkdir $dir"
-	  $run $mkdir $dir
-	  status=$?
-	  if test $status -ne 0 && test ! -d $dir; then
-	    exit $status
-	  fi
-	fi
-      fi
-      if test "$compiler_o_lo" = yes; then
-	output_obj="$libobj"
-	command="$command -o $output_obj"
-      elif test "$compiler_c_o" = yes; then
-	output_obj="$obj"
-	command="$command -o $output_obj"
-      fi
-
-      $run $rm "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	test -n "$output_obj" && $run $rm $removelist
-	exit 1
-      fi
-
-      if test "$need_locks" = warn &&
-	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
-	echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test x"$output_obj" != x"$libobj"; then
-	$show "$mv $output_obj $libobj"
-	if $run $mv $output_obj $libobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # If we have no pic_flag, then copy the object into place and finish.
-      if test -z "$pic_flag" && test "$build_old_libs" = yes; then
-	# Rename the .lo from within objdir to obj
-	if test -f $obj; then
-	  $show $rm $obj
-	  $run $rm $obj
-	fi
-
-	$show "$mv $libobj $obj"
-	if $run $mv $libobj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-
-	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-	if test "X$xdir" = "X$obj"; then
-	  xdir="."
-	else
-	  xdir="$xdir"
-	fi
-	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
-	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
-	# Now arrange that obj and lo_libobj become the same file
-	$show "(cd $xdir && $LN_S $baseobj $libobj)"
-	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
-	  exit 0
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Allow error messages only from the first compilation.
-      suppress_output=' >/dev/null 2>&1'
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      command="$base_compile $srcfile"
-      if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
-	output_obj="$obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	$run $rm $removelist
-	exit 1
-      fi
-
-      if test "$need_locks" = warn &&
-	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
-	echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-
-      # Just move the object if needed
-      if test x"$output_obj" != x"$obj"; then
-	$show "$mv $output_obj $obj"
-	if $run $mv $output_obj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Create an invalid libtool object if no PIC, so that we do not
-      # accidentally link it into a program.
-      if test "$build_libtool_libs" != yes; then
-	$show "echo timestamp > $libobj"
-	$run eval "echo timestamp > \$libobj" || exit $?
-      else
-	# Move the .lo from within objdir
-	$show "$mv $libobj $lo_libobj"
-	if $run $mv $libobj $lo_libobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-    fi
-
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $rm "$lockfile"
-    fi
-
-    exit 0
-    ;;
-
-  # libtool link mode
-  link)
-    modename="$modename: link"
-    case "$host" in
-    *-*-cygwin* | *-*-mingw* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invokation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-
-      # This is a source program that is used to create dlls on Windows
-      # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-      # This is a source program that is used to create import libraries
-      # on Windows for dlls which lack them. Don't remove nor modify the
-      # starting and closing comments
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999 Free Software Foundation, Inc.
-# 
-#  This file is part of GNU libtool.
-# 
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-# 
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-# 
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#  */
-# 
-#  #include <stdio.h>		/* for printf() */
-#  #include <unistd.h>		/* for open(), lseek(), read() */
-#  #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-#  #include <string.h>		/* for strdup() */
-# 
-#  static unsigned int
-#  pe_get16 (fd, offset)
-#       int fd;
-#       int offset;
-#  {
-#    unsigned char b[2];
-#    lseek (fd, offset, SEEK_SET);
-#    read (fd, b, 2);
-#    return b[0] + (b[1]<<8);
-#  }
-# 
-#  static unsigned int
-#  pe_get32 (fd, offset)
-#      int fd;
-#      int offset;
-#  {
-#    unsigned char b[4];
-#    lseek (fd, offset, SEEK_SET);
-#    read (fd, b, 4);
-#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-#  }
-# 
-#  static unsigned int
-#  pe_as32 (ptr)
-#       void *ptr;
-#  {
-#    unsigned char *b = ptr;
-#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-#  }
-# 
-#  int
-#  main (argc, argv)
-#      int argc;
-#      char *argv[];
-#  {
-#      int dll;
-#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#      unsigned long export_rva, export_size, nsections, secptr, expptr;
-#      unsigned long name_rvas, nexp;
-#      unsigned char *expdata, *erva;
-#      char *filename, *dll_name;
-# 
-#      filename = argv[1];
-# 
-#      dll = open(filename, O_RDONLY|O_BINARY);
-#      if (!dll)
-#  	return 1;
-# 
-#      dll_name = filename;
-#    
-#      for (i=0; filename[i]; i++)
-#  	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-#  	    dll_name = filename + i +1;
-# 
-#      pe_header_offset = pe_get32 (dll, 0x3c);
-#      opthdr_ofs = pe_header_offset + 4 + 20;
-#      num_entries = pe_get32 (dll, opthdr_ofs + 92);
-# 
-#      if (num_entries < 1) /* no exports */
-#  	return 1;
-# 
-#      export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#      export_size = pe_get32 (dll, opthdr_ofs + 100);
-#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#      secptr = (pe_header_offset + 4 + 20 +
-#  	      pe_get16 (dll, pe_header_offset + 4 + 16));
-# 
-#      expptr = 0;
-#      for (i = 0; i < nsections; i++)
-#      {
-#  	char sname[8];
-#  	unsigned long secptr1 = secptr + 40 * i;
-#  	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-#  	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-#  	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-#  	lseek(dll, secptr1, SEEK_SET);
-#  	read(dll, sname, 8);
-#  	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-#  	{
-#  	    expptr = fptr + (export_rva - vaddr);
-#  	    if (export_rva + export_size > vaddr + vsize)
-#  		export_size = vsize - (export_rva - vaddr);
-#  	    break;
-#  	}
-#      }
-# 
-#      expdata = (unsigned char*)malloc(export_size);
-#      lseek (dll, expptr, SEEK_SET);
-#      read (dll, expdata, export_size);
-#      erva = expdata - export_rva;
-# 
-#      nexp = pe_as32 (expdata+24);
-#      name_rvas = pe_as32 (expdata+32);
-# 
-#      printf ("EXPORTS\n");
-#      for (i = 0; i<nexp; i++)
-#      {
-#  	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-#  	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#      }
-# 
-#      return 0;
-#  }
-# /* impgen.c ends here */
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    linkopts=
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      lib_search_path=
-    fi
-    # now prepend the system-specific ones
-    eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-    
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    link_against_libtool_libs=
-    ltlibs=
-    module=no
-    objs=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case "$arg" in
-      -all-static | -static)
-	if test "X$arg" = "X-all-static"; then
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-	  fi
-	  if test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	else
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	fi
-	build_libtool_libs=no
-	build_old_libs=yes
-	prefer_static_libs=yes
-	break
-	;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test $# -gt 0; do
-      arg="$1"
-      shift
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-	case "$prev" in
-	output)
-	  compile_command="$compile_command @OUTPUT@"
-	  finalize_command="$finalize_command @OUTPUT@"
-	  ;;
-	esac
-
-	case "$prev" in
-	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
-	    # Add the symbol object into the linking commands.
-	    compile_command="$compile_command @SYMFILE@"
-	    finalize_command="$finalize_command @SYMFILE@"
-	    preload=yes
-	  fi
-	  case "$arg" in
-	  *.la | *.lo) ;;  # We handle these cases below.
-	  force)
-	    if test "$dlself" = no; then
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  self)
-	    if test "$prev" = dlprefiles; then
-	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-	      dlself=yes
-	    else
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  *)
-	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
-	    else
-	      dlprefiles="$dlprefiles $arg"
-	    fi
-	    prev=
-	    ;;
-	  esac
-	  ;;
-	expsyms)
-	  export_symbols="$arg"
-	  if test ! -f "$arg"; then
-	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit 1
-	  fi
-	  prev=
-	  continue
-	  ;;
-	expsyms_regex)
-	  export_symbols_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-	rpath | xrpath)
-	  # We need an absolute path.
-	  case "$arg" in
-	  [\\/]* | [A-Za-z]:[\\/]*) ;;
-	  *)
-	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit 1
-	    ;;
-	  esac
-	  if test "$prev" = rpath; then
-	    case "$rpath " in
-	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
-	    esac
-	  else
-	    case "$xrpath " in
-	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
-	    esac
-	  fi
-	  prev=
-	  continue
-	  ;;
-	*)
-	  eval "$prev=\"\$arg\""
-	  prev=
-	  continue
-	  ;;
-	esac
-      fi
-
-      prevarg="$arg"
-
-      case "$arg" in
-      -all-static)
-	if test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
-
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
-
-      -avoid-version)
-	avoid_version=yes
-	continue
-	;;
-
-      -dlopen)
-	prev=dlfiles
-	continue
-	;;
-
-      -dlpreopen)
-	prev=dlprefiles
-	continue
-	;;
-
-      -export-dynamic)
-	export_dynamic=yes
-	continue
-	;;
-
-      -export-symbols | -export-symbols-regex)
-	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	  $echo "$modename: not more than one -exported-symbols argument allowed"
-	  exit 1
-	fi
-	if test "X$arg" = "X-export-symbols"; then
-	  prev=expsyms
-	else
-	  prev=expsyms_regex
-	fi
-	continue
-	;;
-
-      -L*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-	# We need an absolute path.
-	case "$dir" in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  absdir=`cd "$dir" && pwd`
-	  if test -z "$absdir"; then
-	    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	    absdir="$dir"
-	  fi
-	  dir="$absdir"
-	  ;;
-	esac
-	case " $deplibs " in
-	*" $arg "*) ;;
-	*) deplibs="$deplibs $arg";;
-	esac
-	case " $lib_search_path " in
-	*" $dir "*) ;;
-	*) lib_search_path="$lib_search_path $dir";;
-	esac
-	case "$host" in
-	*-*-cygwin* | *-*-mingw* | *-*-os2*)
-	  dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
-	  case ":$dllsearchpath:" in
-	  ::) dllsearchpath="$dllsearchdir";;
-	  *":$dllsearchdir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
-	  esac
-	  ;;
-	esac
-	;;
-
-      -l*)
-	if test "$arg" = "-lc"; then
-	  case "$host" in
-	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
-	    # These systems don't actually have c library (as such)
-	    continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	    ;;
-	  esac
-	elif test "$arg" = "-lm"; then
-	  case "$host" in
-	  *-*-cygwin* | *-*-beos*)
-	    # These systems don't actually have math library (as such)
-	    continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody math library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	    ;;
-	  esac
-	fi
-	deplibs="$deplibs $arg"
-	;;
-
-      -module)
-	module=yes
-	continue
-	;;
-
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
-
-      -o) prev=output ;;
-
-      -release)
-	prev=release
-	continue
-	;;
-
-      -rpath)
-	prev=rpath
-	continue
-	;;
-
-      -R)
-	prev=xrpath
-	continue
-	;;
-
-      -R*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-	# We need an absolute path.
-	case "$dir" in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit 1
-	  ;;
-	esac
-	case "$xrpath " in
-	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
-	esac
-	continue
-	;;
-
-      -static)
-	# If we have no pic_flag, then this is the same as -all-static.
-	if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
-
-      -thread-safe)
-	thread_safe=yes
-	continue
-	;;
-
-      -version-info)
-	prev=vinfo
-	continue
-	;;
-
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-
-      *.o | *.obj | *.a | *.lib)
-	# A standard object.
-	objs="$objs $arg"
-	;;
-
-      *.lo)
-	# A library object.
-	if test "$prev" = dlfiles; then
-	  dlfiles="$dlfiles $arg"
-	  if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
-	    prev=
-	    continue
-	  else
-	    # If libtool objects are unsupported, then we need to preload.
-	    prev=dlprefiles
-	  fi
-	fi
-
-	if test "$prev" = dlprefiles; then
-	  # Preload the old-style object.
-	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
-	  prev=
-	fi
-	libobjs="$libobjs $arg"
-	;;
-
-      *.la)
-	# A libtool-controlled library.
-
-	dlname=
-	libdir=
-	library_names=
-	old_library=
-
-	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
-	  exit 1
-	fi
-
-	# If the library was installed with an old release of libtool,
-	# it will not redefine variable installed.
-	installed=yes
-
-	# Read the .la file
-	# If there is no directory component, then add one.
-	case "$arg" in
-	*/* | *\\*) . $arg ;;
-	*) . ./$arg ;;
-	esac
-
-	# Get the name of the library we link against.
-	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
-
-	if test -z "$linklib"; then
-	  $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
-	  exit 1
-	fi
-
-	# Find the relevant object directory and library name.
-	name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
-
-	if test "X$installed" = Xyes; then
-	  dir="$libdir"
-	else
-	  dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$dir" = "X$arg"; then
-	    dir="$objdir"
-	  else
-	    dir="$dir/$objdir"
-	  fi
-	fi
-
-	if test -n "$dependency_libs"; then
-	  # Extract -R and -L from dependency_libs
-	  temp_deplibs=
-	  for deplib in $dependency_libs; do
-	    case "$deplib" in
-	    -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-		 case " $rpath $xrpath " in
-		 *" $temp_xrpath "*) ;;
-		 *) xrpath="$xrpath $temp_xrpath";;
-		 esac;;
-	    -L*) case "$compile_command $temp_deplibs " in
-		 *" $deplib "*) ;;
-		 *) temp_deplibs="$temp_deplibs $deplib";;
-		 esac
-		 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-		 case " $lib_search_path " in
-		 *" $temp_dir "*) ;;
-		 *) lib_search_path="$lib_search_path $temp_dir";;
-		 esac
-		 ;;
-	    *) temp_deplibs="$temp_deplibs $deplib";;
-	    esac
-	  done
-	  dependency_libs="$temp_deplibs"
-	fi
-
-	if test -z "$libdir"; then
-	  # It is a libtool convenience library, so add in its objects.
-	  convenience="$convenience $dir/$old_library"
-	  old_convenience="$old_convenience $dir/$old_library"
-	  deplibs="$deplibs$dependency_libs"
-	  compile_command="$compile_command $dir/$old_library$dependency_libs"
-	  finalize_command="$finalize_command $dir/$old_library$dependency_libs"
-	  continue
-	fi
-
-	# This library was specified with -dlopen.
-	if test "$prev" = dlfiles; then
-	  dlfiles="$dlfiles $arg"
-	  if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
-	    # If there is no dlname, no dlopen support or we're linking statically,
-	    # we need to preload.
-	    prev=dlprefiles
-	  else
-	    # We should not create a dependency on this library, but we
-	    # may need any libraries it requires.
-	    compile_command="$compile_command$dependency_libs"
-	    finalize_command="$finalize_command$dependency_libs"
-	    prev=
-	    continue
-	  fi
-	fi
-
-	# The library was specified with -dlpreopen.
-	if test "$prev" = dlprefiles; then
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    dlprefiles="$dlprefiles $dir/$old_library"
-	  else
-	    dlprefiles="$dlprefiles $dir/$linklib"
-	  fi
-	  prev=
-	fi
-
-	if test -n "$library_names" &&
-	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-	  link_against_libtool_libs="$link_against_libtool_libs $arg"
-	  if test -n "$shlibpath_var"; then
-	    # Make sure the rpath contains only unique directories.
-	    case "$temp_rpath " in
-	    *" $dir "*) ;;
-	    *) temp_rpath="$temp_rpath $dir" ;;
-	    esac
-	  fi
-
-	  # We need an absolute path.
-	  case "$dir" in
-	  [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-	  *)
-	    absdir=`cd "$dir" && pwd`
-	    if test -z "$absdir"; then
-	      $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-	      $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	      absdir="$dir"
-	    fi
-	    ;;
-	  esac
-	  
-	  # This is the magic to use -rpath.
-	  # Skip directories that are in the system default run-time
-	  # search path, unless they have been requested with -R.
-	  case " $sys_lib_dlsearch_path " in
-	  *" $absdir "*) ;;
-	  *)
-	    case "$compile_rpath " in
-	    *" $absdir "*) ;;
-	    *) compile_rpath="$compile_rpath $absdir" 
-	    esac
-	    ;;
-	  esac
-
-	  case " $sys_lib_dlsearch_path " in
-	  *" $libdir "*) ;;
-	  *)
-	    case "$finalize_rpath " in
-	    *" $libdir "*) ;;
-	    *) finalize_rpath="$finalize_rpath $libdir"
-	    esac
-	    ;;
-	  esac
-
-	  lib_linked=yes
-	  case "$hardcode_action" in
-	  immediate | unsupported)
-	    if test "$hardcode_direct" = no; then
-	      compile_command="$compile_command $dir/$linklib"
-	      deplibs="$deplibs $dir/$linklib"
-	      case "$host" in
-	      *-*-cygwin* | *-*-mingw* | *-*-os2*)
-		dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
-		if test -n "$dllsearchpath"; then
-		  dllsearchpath="$dllsearchpath:$dllsearchdir"
-		else
-		  dllsearchpath="$dllsearchdir"
-		fi
-		;;
-	      esac
-	    elif test "$hardcode_minus_L" = no; then
-	      case "$host" in
-	      *-*-sunos*)
-		compile_shlibpath="$compile_shlibpath$dir:"
-		;;
-	      esac
-	      case "$compile_command " in
-	      *" -L$dir "*) ;;
-	      *) compile_command="$compile_command -L$dir";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -L$dir -l$name"
-	    elif test "$hardcode_shlibpath_var" = no; then
-	      case ":$compile_shlibpath:" in
-	      *":$dir:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$dir:";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -l$name"
-	    else
-	      lib_linked=no
-	    fi
-	    ;;
-
-	  relink)
-	    if test "$hardcode_direct" = yes; then
-	      compile_command="$compile_command $absdir/$linklib"
-	      deplibs="$deplibs $absdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      case "$compile_command " in
-	      *" -L$absdir "*) ;;
-	      *) compile_command="$compile_command -L$absdir";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -L$absdir -l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
-	      case ":$compile_shlibpath:" in
-	      *":$absdir:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$absdir:";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -l$name"
-	    else
-	      lib_linked=no
-	    fi
-	    ;;
-
-	  *)
-	    lib_linked=no
-	    ;;
-	  esac
-
-	  if test "$lib_linked" != yes; then
-	    $echo "$modename: configuration error: unsupported hardcode properties"
-	    exit 1
-	  fi
-
-	  # Finalize command for both is simple: just hardcode it.
-	  if test "$hardcode_direct" = yes; then
-	    finalize_command="$finalize_command $libdir/$linklib"
-	  elif test "$hardcode_minus_L" = yes; then
-	    case "$finalize_command " in
-	    *" -L$libdir "*) ;;
-	    *) finalize_command="$finalize_command -L$libdir";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  elif test "$hardcode_shlibpath_var" = yes; then
-	    case ":$finalize_shlibpath:" in
-	    *":$libdir:"*) ;;
-	    *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  else
-	    # We cannot seem to hardcode it, guess we'll fake it.
-	    case "$finalize_command " in
-	    *" -L$dir "*) ;;
-	    *) finalize_command="$finalize_command -L$libdir";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  fi
-	else
-	  # Transform directly to old archives if we don't build new libraries.
-	  if test -n "$pic_flag" && test -z "$old_library"; then
-	    $echo "$modename: cannot find static library for \`$arg'" 1>&2
-	    exit 1
-	  fi
-
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_command="$compile_command $dir/$linklib"
-	    finalize_command="$finalize_command $dir/$linklib"
-	  else
-	    case "$compile_command " in
-	    *" -L$dir "*) ;;
-	    *) compile_command="$compile_command -L$dir";;
-	    esac
-	    compile_command="$compile_command -l$name"
-	    case "$finalize_command " in
-	    *" -L$dir "*) ;;
-	    *) finalize_command="$finalize_command -L$dir";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  fi
-	fi
-
-	# Add in any libraries that this one depends upon.
-	compile_command="$compile_command$dependency_libs"
-	finalize_command="$finalize_command$dependency_libs"
-	continue
-	;;
-
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-      esac
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
-
-    case "$output" in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-      ;;
-
-    *.a | *.lib)
-      if test -n "$link_against_libtool_libs"; then
-	$echo "$modename: error: cannot link libtool libraries into archives" 1>&2
-	exit 1
-      fi
-
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      ;;
-
-    *.la)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case "$outputname" in
-      lib*)
-	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-	eval libname=\"$libname_spec\"
-	;;
-      *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-	if test "$need_lib_prefix" != no; then
-	  # Add the "lib" prefix for modules if required
-	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	  eval libname=\"$libname_spec\"
-	else
-	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	fi
-	;;
-      esac
-
-      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$output_objdir" = "X$output"; then
-	output_objdir="$objdir"
-      else
-	output_objdir="$output_objdir/$objdir"
-      fi
-
-      if test -n "$objs"; then
-	$echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
-	exit 1
-      fi
-
-      # How the heck are we supposed to write a wrapper for a shared library?
-      if test -n "$link_against_libtool_libs"; then
-	 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
-	 exit 1
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
-      fi
-
-      set dummy $rpath
-      if test $# -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      oldlibs=
-      if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
-	  # Building a libtool convenience library.
-	  libext=al
-	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
-	  build_libtool_libs=convenience
-	  build_old_libs=yes
-	fi
-	dependency_libs="$deplibs"
-
-	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
-	fi
-
-	if test -n "$release"; then
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-	fi
-      else
-
-	# Parse the version information argument.
-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'
-	set dummy $vinfo 0 0 0
-	IFS="$save_ifs"
-
-	if test -n "$8"; then
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	current="$2"
-	revision="$3"
-	age="$4"
-
-	# Check that each of the things are valid numbers.
-	case "$current" in
-	0 | [1-9] | [1-9][0-9]*) ;;
-	*)
-	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	case "$revision" in
-	0 | [1-9] | [1-9][0-9]*) ;;
-	*)
-	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	case "$age" in
-	0 | [1-9] | [1-9][0-9]*) ;;
-	*)
-	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	if test $age -gt $current; then
-	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	fi
-
-	# Calculate the version variables.
-	major=
-	versuffix=
-	verstring=
-	case "$version_type" in
-	none) ;;
-
-	irix)
-	  major=`expr $current - $age + 1`
-	  versuffix="$major.$revision"
-	  verstring="sgi$major.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$revision
-	  while test $loop != 0; do
-	    iface=`expr $revision - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="sgi$major.$iface:$verstring"
-	  done
-	  ;;
-
-	linux)
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  ;;
-
-	osf)
-	  major=`expr $current - $age`
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$age
-	  while test $loop != 0; do
-	    iface=`expr $current - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring:${iface}.0"
-	  done
-
-	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
-	  ;;
-
-	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
-	  ;;
-
-	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
-	  ;;
-
-	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current";
-	  ;;
-
-	windows)
-	  # Like Linux, but with '-' rather than '.', since we only
-	  # want one extension on Windows 95.
-	  major=`expr $current - $age`
-	  versuffix="-$major-$age-$revision"
-	  ;;
-
-	darwin)
-	  # Like Linux, but with the current version available in
-	  # verstring for coding it into the library header
-	  major=`expr $current - $age`
-	  versuffix=".$major.$age.$revision"
-	  # Darwin ld doesn't like 0 for these options...
-	  minor_current=`expr $current + 1`
-	  verstring="-compatibility_version $major -current_version $major.$age.$revision"
-	  major=".$major"
-	  ;;
-
-	*)
-	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	# Clear the version info if we defaulted, and they specified a release.
-	if test -z "$vinfo" && test -n "$release"; then
-	  major=
-	  verstring="0.0"
-	  if test "$need_version" = no; then
-	    versuffix=
-	  else
-	    versuffix=".0.0"
-	  fi
-	fi
-
-	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
-	  major=
-	  versuffix=
-	  verstring=""
-	fi
-	
-	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-	    build_libtool_libs=no
-	    build_old_libs=yes
-	  fi
-	else
-	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
-	fi
-
-	dependency_libs="$deplibs"
-	case "$host" in
-	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
-	  # these systems don't actually have a c library (as such)!
-	  ;;
-        *-*-rhapsody* | *-*-darwin1.[012])
-	  # Rhapsody C library is in the System framework
-	  deplibs="$deplibs -framework System"
-	  ;;
-	*)
-	  # Add libc to deplibs on all other systems.
-	  deplibs="$deplibs -lc"
-	  ;;
-	esac
-      fi
-
-      # Create the output directory, or remove our outputs if we need to.
-      if test -d $output_objdir; then
-	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
-	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
-      else
-	$show "$mkdir $output_objdir"
-	$run $mkdir $output_objdir
-	status=$?
-	if test $status -ne 0 && test ! -d $output_objdir; then
-	  exit $status
-	fi
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      if test "$build_libtool_libs" = yes; then
-	# Transform deplibs into only deplibs that can be linked in shared.
-	name_save=$name
-	libname_save=$libname
-	release_save=$release
-	versuffix_save=$versuffix
-	major_save=$major
-	# I'm not sure if I'm treating the release correctly.  I think
-	# release should show up in the -l (ie -lgmp5) so we don't want to
-	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
-	newdeplibs=
-	droppeddeps=no
-	case "$deplibs_check_method" in
-	pass_all)
-	  # Don't check for shared/static.  Everything works.
-	  # This might be a little naive.  We might want to check
-	  # whether the library exists or not.  But this is on
-	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behaviour.
-	  newdeplibs=$deplibs
-	  ;;
-	test_compile)
-	  # This code stresses the "libraries are programs" paradigm to its
-	  # limits. Maybe even breaks it.  We compile a program, linking it
-	  # against the deplibs as a proxy for the library.  Then we can check
-	  # whether they linked in statically or dynamically with ldd.
-	  $rm conftest.c
-	  cat > conftest.c <<EOF
-	  int main() { return 0; }
-EOF
-	  $rm conftest
-	  $CC -o conftest conftest.c $deplibs
-	  if test $? -eq 0 ; then
-	    ldd_output=`ldd conftest`
-	    for i in $deplibs; do
-	      name="`expr X$i : 'X-l\(.*\)'`"
-	      # If $name is empty we are operating on a -L argument.
-	      if test "$name" != "" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		set dummy $deplib_matches
-		deplib_match=$2
-		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		  newdeplibs="$newdeplibs $i"
-		else
-		  droppeddeps=yes
-		  echo
-		  echo "*** Warning: This library needs some functionality provided by $i."
-		  echo "*** I have the capability to make that library automatically link in when"
-		  echo "*** you link to this library.  But I can only do this if you have a"
-		  echo "*** shared version of the library, which you do not appear to have."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  else
-	    # Error occured in the first compile.  Let's try to salvage the situation:
-	    # Compile a seperate program for each library.
-	    for i in $deplibs; do
-	      name="`expr X$i : 'X-l\(.*\)'`"
-	     # If $name is empty we are operating on a -L argument.
-	      if test "$name" != "" ; then
-		$rm conftest
-		$CC -o conftest conftest.c $i
-		# Did it work?
-		if test $? -eq 0 ; then
-		  ldd_output=`ldd conftest`
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    echo
-		    echo "*** Warning: This library needs some functionality provided by $i."
-		    echo "*** I have the capability to make that library automatically link in when"
-		    echo "*** you link to this library.  But I can only do this if you have a"
-		    echo "*** shared version of the library, which you do not appear to have."
-		  fi
-		else
-		  droppeddeps=yes
-		  echo
-		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  echo "***  make it link in!  You will probably need to install it or some"
-		  echo "*** library that it depends on before this library will be fully"
-		  echo "*** functional.  Installing it before continuing would be even better."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  fi
-	  ;;
-	file_magic*)
-	  set dummy $deplibs_check_method
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
-	  for a_deplib in $deplibs; do
-	    name="`expr X$a_deplib : 'X-l\(.*\)'`"
-	    # If $name is empty we are operating on a -L argument.
-	    if test "$name" != "" ; then
-	      libname=`eval \\$echo \"$libname_spec\"`
-	      for i in $lib_search_path; do
-		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		    for potent_lib in $potential_libs; do
-		      # Follow soft links.
-		      if ls -lLd "$potent_lib" 2>/dev/null \
-			 | grep " -> " >/dev/null; then
-			continue 
-		      fi
-		      # The statement above tries to avoid entering an
-		      # endless loop below, in case of cyclic links.
-		      # We might still enter an endless loop, since a link
-		      # loop can be closed while we follow links,
-		      # but so what?
-		      potlib="$potent_lib"
-		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
-			case "$potliblink" in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-			esac
-		      done
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-			 | sed 10q \
-			 | egrep "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
-			a_deplib=""
-			break 2
-		      fi
-		    done
-	      done
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		echo
-		echo "*** Warning: This library needs some functionality provided by $a_deplib."
-		echo "*** I have the capability to make that library automatically link in when"
-		echo "*** you link to this library.  But I can only do this if you have a"
-		echo "*** shared version of the library, which you do not appear to have."
-	      fi
-	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
-	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	none | unknown | *)
-	  newdeplibs=""
-	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
-	     grep . >/dev/null; then
-	    echo
-	    if test "X$deplibs_check_method" = "Xnone"; then
-	      echo "*** Warning: inter-library dependencies are not supported in this platform."
-	    else
-	      echo "*** Warning: inter-library dependencies are not known to be supported."
-	    fi
-	    echo "*** All declared inter-library dependencies are being dropped."
-	    droppeddeps=yes
-	  fi
-	  ;;
-	esac
-	versuffix=$versuffix_save
-	major=$major_save
-	release=$release_save
-	libname=$libname_save
-	name=$name_save
-
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
-	    echo
-	    echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    echo "*** a static module, that should work as long as the dlopening"
-	    echo "*** application is linked with the -dlopen flag."
-	    if test -z "$global_symbol_pipe"; then
-	      echo
-	      echo "*** However, this would only work if libtool was able to extract symbol"
-	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      echo "*** not find such a program.  So, this module is probably useless."
-	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
-	      build_libtool_libs=module
-	      build_old_libs=yes
-	    else
-	      build_libtool_libs=no
-	    fi
-	  else
-	    echo "*** The inter-library dependencies that have been dropped here will be"
-	    echo "*** automatically added whenever a program is linked with this library"
-	    echo "*** or is declared to -dlopen it."
-	  fi
-	fi
-	# Done checking deplibs!
-	deplibs=$newdeplibs
-      fi
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-      
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	# Get the real and link names of the library.
-	eval library_names=\"$library_names_spec\"
-	set dummy $library_names
-	realname="$2"
-	shift; shift
-
-	if test -n "$soname_spec"; then
-	  eval soname=\"$soname_spec\"
-	else
-	  soname="$realname"
-	fi
-
-	lib="$output_objdir/$realname"
-	for link
-	do
-	  linknames="$linknames $link"
-	done
-
-	# Ensure that we have .o objects for linkers which dislike .lo
-	# (e.g. aix) in case we are running --disable-static
-	for obj in $libobjs; do
-	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$xdir" = "X$obj"; then
-	    xdir="."
-	  else
-	    xdir="$xdir"
-	  fi
-	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
-	  if test ! -f $xdir/$oldobj; then
-	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
-	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
-	  fi
-	done
-
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
-	# Prepare the list of exported symbols
-	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    eval cmds=\"$export_symbols_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd" || exit $?
-	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex"; then
-	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
-	    fi
-	  fi
-	fi
-
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-	fi
-
-	if test -n "$convenience"; then
-	  if test -n "$whole_archive_flag_spec"; then
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  else
-	    gentop="$output_objdir/${outputname}x"
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "mkdir $gentop"
-	    $run mkdir "$gentop"
-	    status=$?
-	    if test $status -ne 0 && test ! -d "$gentop"; then
-	      exit $status
-	    fi
-	    generated="$generated $gentop"
-
-	    for xlib in $convenience; do
-	      # Extract the objects.
-	      case "$xlib" in
-	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	      *) xabs=`pwd`"/$xlib" ;;
-	      esac
-	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	      xdir="$gentop/$xlib"
-
-	      $show "${rm}r $xdir"
-	      $run ${rm}r "$xdir"
-	      $show "mkdir $xdir"
-	      $run mkdir "$xdir"
-	      status=$?
-	      if test $status -ne 0 && test ! -d "$xdir"; then
-		exit $status
-	      fi
-	      $show "(cd $xdir && $AR x $xabs)"
-	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
-	    done
-	  fi
-	fi
-
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-	  eval flag=\"$thread_safe_flag_spec\"
-	  linkopts="$linkopts $flag"
-	fi
-
-	# Do each of the archive commands.
-	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval cmds=\"$archive_expsym_cmds\"
-	else
-	  if test "x$verstring" = "x0.0"; then
-	    tmp_verstring=
-	  else
-	    tmp_verstring="$verstring"
-	  fi
-	  eval cmds=\"$archive_cmds\"
-	fi
-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-
-	# Create links to the real library.
-	for linkname in $linknames; do
-	  if test "$realname" != "$linkname"; then
-	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-	  fi
-	done
-
-	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
-	  # On all known operating systems, these are identical.
-	  dlname="$soname"
-	fi
-      fi
-      ;;
-
-    *.lo | *.o | *.obj)
-      if test -n "$link_against_libtool_libs"; then
-	$echo "$modename: error: cannot link libtool libraries into objects" 1>&2
-	exit 1
-      fi
-
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
-
-      case "$output" in
-      *.lo)
-	if test -n "$objs"; then
-	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit 1
-	fi
-	libobj="$output"
-	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-	;;
-      *)
-	libobj=
-	obj="$output"
-	;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
-      wl= 
-
-      if test -n "$convenience"; then
-	if test -n "$whole_archive_flag_spec"; then
-	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
-	else
-	  gentop="$output_objdir/${obj}x"
-	  $show "${rm}r $gentop"
-	  $run ${rm}r "$gentop"
-	  $show "mkdir $gentop"
-	  $run mkdir "$gentop"
-	  status=$?
-	  if test $status -ne 0 && test ! -d "$gentop"; then
-	    exit $status
-	  fi
-	  generated="$generated $gentop"
-
-	  for xlib in $convenience; do
-	    # Extract the objects.
-	    case "$xlib" in
-	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	    *) xabs=`pwd`"/$xlib" ;;
-	    esac
-	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	    xdir="$gentop/$xlib"
-
-	    $show "${rm}r $xdir"
-	    $run ${rm}r "$xdir"
-	    $show "mkdir $xdir"
-	    $run mkdir "$xdir"
-	    status=$?
-	    if test $status -ne 0 && test ! -d "$xdir"; then
-	      exit $status
-	    fi
-	    $show "(cd $xdir && $AR x $xabs)"
-	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
-	  done
-	fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
-
-      output="$obj"
-      eval cmds=\"$reload_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	exit 0
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	# Create an invalid libtool object if no PIC, so that we don't
-	# accidentally link it into a program.
-	$show "echo timestamp > $libobj"
-	$run eval "echo timestamp > $libobj" || exit $?
-	exit 0
-      fi
-
-      if test -n "$pic_flag"; then
-	# Only do commands if we really have different PIC objects.
-	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
-	eval cmds=\"$reload_cmds\"
-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-      else
-	# Just create a symlink.
-	$show $rm $libobj
-	$run $rm $libobj
-	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
-	if test "X$xdir" = "X$libobj"; then
-	  xdir="."
-	else
-	  xdir="$xdir"
-	fi
-	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
-	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
-	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
-	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
-      fi
-
-      if test -n "$gentop"; then
-	$show "${rm}r $gentop"
-	$run ${rm}r $gentop
-      fi
-
-      exit 0
-      ;;
-
-    # Anything else should be a program.
-    *)
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
-
-      if test "$preload" = yes; then
-	if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
-	   test "$dlopen_self_static" = unknown; then
-	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-	fi 
-      fi
-    
-      if test -n "$rpath$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath $xrpath; do
-	  # This is the magic to use -rpath.
-	  case "$compile_rpath " in
-	  *" $libdir "*) ;;
-	  *) compile_rpath="$compile_rpath $libdir" ;;
-	  esac
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$finalize_perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$output_objdir" = "X$output"; then
-	output_objdir="$objdir"
-      else
-	output_objdir="$output_objdir/$objdir"
-      fi
-
-      # Create the binary in the object directory, then wrap it.
-      if test ! -d $output_objdir; then
-	$show "$mkdir $output_objdir"
-	$run $mkdir $output_objdir
-	status=$?
-	if test $status -ne 0 && test ! -d $output_objdir; then
-	  exit $status
-	fi
-      fi
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-	# Transform all the library objects into standard objects.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	  dlsyms="${outputname}S.c"
-	else
-	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-	fi
-      fi
-
-      if test -n "$dlsyms"; then
-	case "$dlsyms" in
-	"") ;;
-	*.c)
-	  # Discover the nlist of each of the dlfiles.
-	  nlist="$output_objdir/${outputname}.nm"
-
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Parse the name list into a source file.
-	  $show "creating $output_objdir/$dlsyms"
-
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-	  if test "$dlself" = yes; then
-	    $show "generating symbol list for \`$output'"
-
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
-	    # Add our own program objects to the symbol list.
-	    progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	    for arg in $progfiles; do
-	      $show "extracting global C symbols from \`$arg'"
-	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	    done
-
-	    if test -n "$exclude_expsyms"; then
-	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-	    
-	    if test -n "$export_symbols_regex"; then
-	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-
-	    # Prepare the list of exported symbols
-	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$output.exp"
-	      $run $rm $export_symbols
-	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-	    else
-	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
-	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
-	      $run eval 'mv "$nlist"T "$nlist"'
-	    fi
-	  fi
-
-	  for arg in $dlprefiles; do
-	    $show "extracting global C symbols from \`$arg'"
-	    name=`echo "$arg" | sed -e 's%^.*/%%'`
-	    $run eval 'echo ": $name " >> "$nlist"'
-	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	  done
-
-	  if test -z "$run"; then
-	    # Make sure we have at least an empty file.
-	    test -f "$nlist" || : > "$nlist"
-
-	    if test -n "$exclude_expsyms"; then
-	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-	      $mv "$nlist"T "$nlist"
-	    fi
-
-	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
-	      :
-	    else
-	      grep -v "^: " < "$nlist" > "$nlist"S
-	    fi
-
-	    if test -f "$nlist"S; then
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-	    else
-	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-	    sed -n -e 's/^: \([^ ]*\) $/  {\"\1\", (lt_ptr_t) 0},/p' \
-		-e 's/^. \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr_t) \&\2},/p' \
-		  < "$nlist" >> "$output_objdir/$dlsyms"
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr_t) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-	  fi
-
-	  pic_flag_for_symtable=
-	  case "$host" in
-	  # compiling the symbol table file with pic_flag works around
-	  # a FreeBSD bug that causes programs to crash when -lm is
-	  # linked before any other PIC object.  But we must not use
-	  # pic_flag when linking with -static.  The problem exists in
-	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
-	    esac;;
-	  *-*-hpux*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
-	    esac
-	  esac
-
-	  # Now compile the dynamic symbol file.
-	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-	  # Clean up the generated files.
-	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Transform the symbol file into the correct name.
-	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  ;;
-	*)
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit 1
-	  ;;
-	esac
-      else
-	# We keep going just in case the user didn't refer to
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-	# really was required.
-
-	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
-	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	link_command="$compile_command$compile_rpath"
-
-	# We have no uninstalled library dependencies, so finalize right now.
-	$show "$link_command"
-	$run eval "$link_command"
-	status=$?
-	
-	# Delete the generated files.
-	if test -n "$dlsyms"; then
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
-	fi
-
-	exit $status
-      fi
-
-      if test -n "$shlibpath_var"; then
-	# We should set the shlibpath_var
-	rpath=
-	for dir in $temp_rpath; do
-	  case "$dir" in
-	  [\\/]* | [A-Za-z]:[\\/]*)
-	    # Absolute path.
-	    rpath="$rpath$dir:"
-	    ;;
-	  *)
-	    # Relative path: add a thisdir entry.
-	    rpath="$rpath\$thisdir/$dir:"
-	    ;;
-	  esac
-	done
-	temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-	if test -n "$perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-	if test -n "$finalize_perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-      fi
-
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
-	
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-      
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
-	case "$0" in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
-	esac
-	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-	# win32 will think the script is a binary if it has
-	# a .exe suffix, so we strip it off here.
-	case $output in
-	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
-	esac
-	$rm $output
-	trap "$rm $output; exit 1" 1 2 15
-
-	$echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  link_against_libtool_libs='$link_against_libtool_libs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-	$echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-	if test "$fast_install" = yes; then
-	  echo >> $output "\
-  program=lt-'$outputname'
-  progdir=\"\$thisdir/$objdir\"
-  
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
-
-	  echo >> $output "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if (cd \"\$thisdir\" && eval \$relink_command); then :
-      else
-	$rm \"\$progdir/\$file\"
-	exit 1
-      fi
-    fi
-
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-	else
-	  echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-	fi
-
-	echo >> $output "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-	  $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-	fi
-
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
-	$echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-	case $host in
-	  # win32 systems need to use the prog path for dll
-	  # lookup to work
-	*-*-cygwin*)
-	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-	  ;;
-
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2*)
-	  $echo >> $output "\
-      exec \$progdir\\\\\$program \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $echo >> $output "\
-      # Export the path to the program.
-      PATH=\"\$progdir:\$PATH\"
-      export PATH
-
-      exec \$program \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
-  fi
-fi\
-"
-	chmod +x $output
-      fi
-      exit 0
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
-	  build_libtool_libs=no
-	else
-	  oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
-	fi
-	addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	$show "${rm}r $gentop"
-	$run ${rm}r "$gentop"
-	$show "mkdir $gentop"
-	$run mkdir "$gentop"
-	status=$?
-	if test $status -ne 0 && test ! -d "$gentop"; then
-	  exit $status
-	fi
-	generated="$generated $gentop"
-	  
-	# Add in members from convenience archives.
-	for xlib in $addlibs; do
-	  # Extract the objects.
-	  case "$xlib" in
-	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	  *) xabs=`pwd`"/$xlib" ;;
-	  esac
-	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	  xdir="$gentop/$xlib"
-
-	  $show "${rm}r $xdir"
-	  $run ${rm}r "$xdir"
-	  $show "mkdir $xdir"
-	  $run mkdir "$xdir"
-	  status=$?
-	  if test $status -ne 0 && test ! -d "$xdir"; then
-	    exit $status
-	  fi
-	  $show "(cd $xdir && $AR x $xabs)"
-	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-	done
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-	eval cmds=\"$old_archive_from_new_cmds\"
-      else
-	# Ensure that we have .o objects in place in case we decided
-	# not to build a shared library, and have fallen back to building
-	# static libs even though --disable-static was passed!
-	for oldobj in $oldobjs; do
-	  if test ! -f $oldobj; then
-	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
-	    if test "X$xdir" = "X$oldobj"; then
-	      xdir="."
-	    else
-	      xdir="$xdir"
-	    fi
-	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
-	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
-	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
-	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
-	  fi
-	done
-
-	eval cmds=\"$old_archive_cmds\"
-      fi
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
-
-    # Now create the libtool archive.
-    case "$output" in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
-
-      if test -n "$xrpath"; then
-	temp_xrpath=
-	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
-	done
-	dependency_libs="$temp_xrpath $dependency_libs"
-      fi
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-	for installed in no yes; do
-	  if test "$installed" = yes; then
-	    if test -z "$install_libdir"; then
-	      break
-	    fi
-	    output="$output_objdir/$outputname"i
-	  fi
-	  $rm $output
-	  $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$dlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'\
-"
-	done
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
-      ;;
-    esac
-    exit 0
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg="$nonopt"
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case "$arg" in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-	files="$files $dest"
-	dest="$arg"
-	continue
-      fi
-
-      case "$arg" in
-      -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
-      -s)
-	stripme=" -s"
-	continue
-	;;
-      -*) ;;
-
-      *)
-	# If the previous option needed an argument, then skip it.
-	if test -n "$prev"; then
-	  prev=
-	else
-	  dest="$arg"
-	  continue
-	fi
-	;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-	$echo "$modename: no file or destination specified" 1>&2
-      else
-	$echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test $# -gt 2; then
-	$echo "$modename: \`$dest' is not a directory" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-    fi
-    case "$destdir" in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-	case "$file" in
-	*.lo) ;;
-	*)
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	  ;;
-	esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case "$file" in
-      *.a | *.lib)
-	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
-	;;
-
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	library_names=
-	old_library=
-	# If there is no directory component, then add one.
-	case "$file" in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Add the libdir to current_libdirs if it is the destination.
-	if test "X$destdir" = "X$libdir"; then
-	  case "$current_libdirs " in
-	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
-	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
-	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
-	  esac
-	fi
-
-	dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
-	test "X$dir" = "X$file/" && dir=
-	dir="$dir$objdir"
-
-	# See the names of the shared library.
-	set dummy $library_names
-	if test -n "$2"; then
-	  realname="$2"
-	  shift
-	  shift
-
-	  # Install the shared library and build the symlinks.
-	  $show "$install_prog $dir/$realname $destdir/$realname"
-	  $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
-
-	  if test $# -gt 0; then
-	    # Delete the old symlinks, and create new ones.
-	    for linkname
-	    do
-	      if test "$linkname" != "$realname"; then
-		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-	      fi
-	    done
-	  fi
-
-	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
-	  eval cmds=\"$postinstall_cmds\"
-	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
-	  done
-	  IFS="$save_ifs"
-	fi
-
-	# Install the pseudo-library for information purposes.
-	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	instname="$dir/$name"i
-	$show "$install_prog $instname $destdir/$name"
-	$run eval "$install_prog $instname $destdir/$name" || exit $?
-
-	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-	;;
-
-      *.lo)
-	# Install (i.e. copy) a libtool object.
-
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# Deduce the name of the destination old-style object file.
-	case "$destfile" in
-	*.lo)
-	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-	  ;;
-	*.o | *.obj)
-	  staticdest="$destfile"
-	  destfile=
-	  ;;
-	*)
-	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	# Install the libtool object if requested.
-	if test -n "$destfile"; then
-	  $show "$install_prog $file $destfile"
-	  $run eval "$install_prog $file $destfile" || exit $?
-	fi
-
-	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
-	  # Deduce the name of the old-style object file.
-	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-	  $show "$install_prog $staticobj $staticdest"
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-	fi
-	exit 0
-	;;
-
-      *)
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# Do a test to see if this is really a libtool program.
-	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  link_against_libtool_libs=
-	  relink_command=
-
-	  # If there is no directory component, then add one.
-	  case "$file" in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Check the variables that should have been set.
-	  if test -z "$link_against_libtool_libs"; then
-	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
-	    exit 1
-	  fi
-
-	  finalize=yes
-	  for lib in $link_against_libtool_libs; do
-	    # Check to see that each library is installed.
-	    libdir=
-	    if test -f "$lib"; then
-	      # If there is no directory component, then add one.
-	      case "$lib" in
-	      */* | *\\*) . $lib ;;
-	      *) . ./$lib ;;
-	      esac
-	    fi
-	    libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
-	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-	      finalize=no
-	    fi
-	  done
-
-	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
-	    if test "$finalize" = yes && test -z "$run"; then
-	      tmpdir="/tmp"
-	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
-	      tmpdir="$tmpdir/libtool-$$"
-	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
-	      else
-		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
-		continue
-	      fi
-	      outputname="$tmpdir/$file"
-	      # Replace the output file specification.
-	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-	      $show "$relink_command"
-	      if $run eval "$relink_command"; then :
-	      else
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-		${rm}r "$tmpdir"
-		continue
-	      fi
-	      file="$outputname"
-	    else
-	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
-	    fi
-	  else
-	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-	  fi
-	fi
-
-	$show "$install_prog$stripme $file $destfile"
-	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-	test -n "$outputname" && ${rm}r "$tmpdir"
-	;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      # Do each command in the postinstall commands.
-      eval cmds=\"$old_postinstall_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec $SHELL $0 --finish$current_libdirs
-      exit 1
-    fi
-
-    exit 0
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  eval cmds=\"$finish_cmds\"
-	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    $show "$cmd"
-	    $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
-	  done
-	  IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-	fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit 0
-
-    echo "----------------------------------------------------------------------"
-    echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      echo "   $libdir"
-    done
-    echo
-    echo "If you ever happen to want to link against installed libraries"
-    echo "in a given directory, LIBDIR, you must either use libtool, and"
-    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
-    echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    echo
-    echo "See any operating system documentation about shared libraries for"
-    echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    echo "----------------------------------------------------------------------"
-    exit 0
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit 1
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-
-      dir=
-      case "$file" in
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	# Read the libtool library.
-	dlname=
-	library_names=
-
-	# If there is no directory component, then add one.
-	case "$file" in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
-	fi
-	;;
-
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
-
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-	continue
-	;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case "$file" in
-      -*) ;;
-      *)
-	# Do a test to see if this is really a libtool program.
-	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case "$file" in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-	;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-        # Export the shlibpath_var.
-        eval "export $shlibpath_var"
-      fi
-
-      # Restore saved enviroment variables
-      if test "${save_LC_ALL+set}" = set; then
-	LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-	LANG="$save_LANG"; export LANG
-      fi
-
-      # Now actually exec the command.
-      eval "exec \$cmd$args"
-
-      $echo "$modename: cannot exec \$cmd$args"
-      exit 1
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-        $echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit 0
-    fi
-    ;;
-
-  # libtool uninstall mode
-  uninstall)
-    modename="$modename: uninstall"
-    rm="$nonopt"
-    files=
-
-    for arg
-    do
-      case "$arg" in
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$dir" = "X$file" && dir=.
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      rmfiles="$file"
-
-      case "$name" in
-      *.la)
-	# Possibly a libtool archive, so verify it.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  . $dir/$name
-
-	  # Delete the libtool libraries and symlinks.
-	  for n in $library_names; do
-	    rmfiles="$rmfiles $dir/$n"
-	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
-
-	  $show "$rm $rmfiles"
-	  $run $rm $rmfiles
-
-	  if test -n "$library_names"; then
-	    # Do each command in the postuninstall commands.
-	    eval cmds=\"$postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-	  if test -n "$old_library"; then
-	    # Do each command in the old_postuninstall commands.
-	    eval cmds=\"$old_postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-	  # FIXME: should reinstall the best remaining shared library.
-	fi
-	;;
-
-      *.lo)
-	if test "$build_old_libs" = yes; then
-	  oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
-	  rmfiles="$rmfiles $dir/$oldobj"
-	fi
-	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-	;;
-
-      *)
-	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-	;;
-      esac
-    done
-    exit 0
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit 1
-    ;;
-  esac
-
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$generic_help" 1>&2
-  exit 1
-fi # test -z "$show_help"
-
-# We need to display help for each of the modes.
-case "$mode" in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --version         print version information
-
-MODE must be one of the following:
-
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
-  exit 0
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-		    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-		    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-		    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-  ;;
-esac
-
-echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/config/missing b/config/missing
deleted file mode 100755
index 6a37006..0000000
--- a/config/missing
+++ /dev/null
@@ -1,336 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-  aclocal*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f y.tab.h ]; then
-	echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit 1
-    fi
-    ;;
-
-  makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
-    fi
-    touch $file
-    ;;
-
-  tar)
-    shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case "$firstarg" in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case "$firstarg" in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
diff --git a/config/mkinstalldirs b/config/mkinstalldirs
deleted file mode 100755
index d2d5f21..0000000
--- a/config/mkinstalldirs
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage" 1>&2
-      exit 0
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-case $dirmode in
-  '')
-    if mkdir -p -- . 2>/dev/null; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    fi
-    ;;
-esac
-
-for file
-do
-  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-  shift
-
-  pathcomp=
-  for d
-  do
-    pathcomp="$pathcomp$d"
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-  	errstatus=$lasterr
-      else
-  	if test ! -z "$dirmode"; then
-	  echo "chmod $dirmode $pathcomp"
-    	  lasterr=""
-  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-  	  if test ! -z "$lasterr"; then
-  	    errstatus=$lasterr
-  	  fi
-  	fi
-      fi
-    fi
-
-    pathcomp="$pathcomp/"
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# End:
-# mkinstalldirs ends here
diff --git a/configure b/configure
deleted file mode 100755
index 93fee28..0000000
--- a/configure
+++ /dev/null
@@ -1,20241 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-
-  if test $as_have_required = yes &&	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-	   done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-	done
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf at gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="lib/saslint.h"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-enable_option_checking=no
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-subdirs
-DIRS
-LTLIBOBJS
-LTGETNAMEINFOOBJS
-GETNAMEINFOOBJS
-LTGETADDRINFOOBJS
-GETADDRINFOOBJS
-LTSNPRINTFOBJS
-SNPRINTFOBJS
-GETSUBOPT
-LIBOBJS
-SASL_UTIL_HEADERS_EXTRA
-SASL_UTIL_LIBS_EXTRA
-SMTPTEST_PROGRAM
-SFIO_LIB_FLAGS
-SFIO_INC_FLAGS
-DMALLOC_LIBS
-MACOSX_FALSE
-MACOSX_TRUE
-configdir
-plugindir
-SASL_STATIC_LIBS
-SASL_STATIC_OBJS
-SASL_STATIC_SRCS
-SASL_MECHS
-LIB_LDAP
-LIB_SQLITE3
-LIB_SQLITE
-LIB_PGSQL
-LIB_MYSQL
-PASSDSS_LIBS
-NTLM_LIBS
-PLAIN_LIBS
-GSSAPIBASE_LIBS
-GSSAPI_LIBS
-LIB_CRYPT
-SASL_KRB_LIB
-SRP_LIBS
-OTP_LIBS
-SCRAM_LIBS
-LIB_DES
-CMU_LIB_SUBDIR
-LIB_DOOR
-IPCTYPE
-PWCHECK_FALSE
-PWCHECK_TRUE
-PWCHECKMETH
-SASLAUTHD_FALSE
-SASLAUTHD_TRUE
-NM
-SASL_DL_LIB
-NO_SASL_DB_MANS_FALSE
-NO_SASL_DB_MANS_TRUE
-SASL_DB_LIB
-SASL_DB_INC
-SASL_DB_BACKEND_STATIC
-SASL_DB_BACKEND
-SASL_DB_MANS
-SASL_DB_UTILS
-EGREP
-GREP
-LIB_SOCKET
-SAMPLE_FALSE
-SAMPLE_TRUE
-JAVAROOT
-JAVA_INCLUDES
-JAVA_FALSE
-JAVA_TRUE
-JAVADOC
-JAVAH
-JAVAC
-PURIFY
-PURECOV
-LIBTOOL
-RANLIB
-LN_S
-CPP
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_cmulocal
-enable_sample
-enable_obsolete_cram_attr
-enable_dependency_tracking
-with_staticsasl
-enable_static
-enable_shared
-enable_fast_install
-with_gnu_ld
-enable_libtool_lock
-enable_staticdlopen
-with_purecov
-with_purify
-enable_java
-with_javabase
-with_dbpath
-with_dblib
-with_bdb_libdir
-with_bdb_incdir
-with_gdbm
-enable_keep_db_open
-with_devrandom
-with_pam
-with_saslauthd
-with_authdaemond
-with_pwcheck
-with_ipctype
-enable_alwaystrue
-enable_checkapop
-enable_cram
-with_lib_subdir
-with_openssl
-with_des
-enable_digest
-enable_scram
-enable_otp
-with_with_opie
-enable_srp
-enable_srp_setpass
-enable_krb4
-enable_gssapi
-with_gss_impl
-enable_gss_mutexes
-enable_plain
-enable_anon
-enable_login
-enable_ntlm
-enable_passdss
-with_ldap
-enable_sql
-with_mysql
-with_pgsql
-with_sqlite
-with_sqlite3
-enable_ldapdb
-with_plugindir
-with_configdir
-with_rc4
-enable_macos_framework
-with_dmalloc
-with_sfio
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-ac_subdirs_all='saslauthd'
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -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_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$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 ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$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 | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$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 ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    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 | -n)
-    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 ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$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_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=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 ;;
-
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
-
-
-# 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 the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  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
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --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
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-cmulocal       enable local mods for CMU [[no]]
-  --enable-sample         compile sample code [[yes]]
-  --enable-obsolete_cram_attr
-                          enable support for cmusaslsecretCRAM-MD5 auxprop
-                          property [[yes]]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-static=PKGS  build static libraries default=no
-  --enable-shared=PKGS  build shared libraries default=yes
-  --enable-fast-install=PKGS  optimize for fast installation default=yes
-  --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-staticdlopen   try dynamic plugins when we are a static libsasl [no]
-  --enable-java           compile Java support [no]
-  --enable-keep-db-open   keep handle to Berkeley DB open for improved performance [no]
-  --enable-alwaystrue     enable the alwaystrue password verifier (discouraged)
-  --enable-checkapop      enable use of sasl_checkapop [yes]
-  --enable-cram           enable CRAM-MD5 authentication [yes]
-  --enable-digest         enable DIGEST-MD5 authentication [yes]
-  --enable-scram            enable SCRAM authentication [yes]
-  --enable-otp            enable OTP authentication [yes]
-  --enable-srp            enable SRP authentication [no]
-  --enable-srp-setpass    enable setting SRP secrets with saslpasswd [no]
-  --enable-krb4           enable KERBEROS_V4 authentication [no]
-  --enable-gssapi=<DIR>   enable GSSAPI authentication [yes]
-  --enable-gss_mutexes     use mutexes around calls to the GSS library
-  --enable-plain          enable PLAIN authentication yes
-  --enable-anon           enable ANONYMOUS authentication [yes]
-  --enable-login          enable unsupported LOGIN authentication [no]
-  --enable-ntlm           enable unsupported NTLM authentication [no]
-  --enable-passdss        enable PASSDSS authentication (experimental) [no]
-  --enable-sql            enable SQL auxprop [no]
-  --enable-ldapdb         enable LDAPDB plugin no
-  --disable-macos-framework       disable building and installing replacement SASL2 Framework for MacOS X-provided SASL Framework [no]
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-
-  --with-gnu-ld           assume the C compiler uses GNU ld default=no
-  --with-purecov          link with purecov
-  --with-purify           link with purify
-  --with-javabase=PATH    set path to find jni.h in /usr/java/include
-  --with-dbpath=PATH      set the DB path to use /etc/sasldb2
-  --with-dblib=DBLIB      set the DB library to use berkeley
-  --with-bdb-libdir=DIR   Berkeley DB lib files are in DIR
-  --with-bdb-incdir=DIR   Berkeley DB include files are in DIR
-  --with-gdbm=PATH        use gdbm from PATH
-  --with-devrandom=PATH   set the path to /dev/random [/dev/random]
-  --with-pam=DIR          use PAM (rooted in DIR) [yes]
-  --with-saslauthd=DIR    enable use of the saslauth daemon using state dir DIR
-  --with-authdaemond=PATH enable use of authdaemon with default socket=PATH [yes]
-  --with-pwcheck=DIR     enable deprecated pwcheck daemon using statedir DIR
-  --with-ipctype={unix,doors}    use ipctype [unix]
-  --with-lib-subdir=DIR   Find libraries in DIR instead of lib
-  --with-openssl=PATH     use OpenSSL from PATH
-  --with-des=DIR          with DES (look in DIR) yes
-  --with-opie=PATH        use OPIE (One Time Passwords in Everything) from PATH
-  --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
-                          choose specific GSSAPI implementation [[auto]]
-  --with-ldap=DIR         use LDAP (in DIR) for saslauthd no
-  --with-mysql=PATH       use MySQL from PATH
-  --with-pgsql=PATH       use PostgreSQL from PATH
-  --with-sqlite=PATH       use SQLite from PATH
-  --with-sqlite3=PATH       use SQLite3 from PATH
-  --with-plugindir=DIR    set the directory where plugins will
-                          be found [/usr/lib/sasl2]
-   --with-configdir=DIR    set the directory where config files will
-                          be found /usr/lib/sasl2
-  --with-rc4              use internal rc4 routines [yes]
-  --with-dmalloc=DIR      with DMALLOC support (for test applications) [no]
-  --with-sfio=DIR         with SFIO support (for smtptest/libsfsasl) [no]
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-if test $cache_file = "/dev/null"; then
-cache_file="./config.cache"
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-fi
-
-ac_aux_dir=
-for ac_dir in config "$srcdir"/config; 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
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-$as_echo "$as_me: error: invalid value of canonical target" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-am__api_version='1.11'
-
-# 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
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# 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"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /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
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-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.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&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}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
-done
-IFS=$as_save_IFS
-
-fi
-
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE=cyrus-sasl
- VERSION=2.1.26
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-
-	ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
-
-
-# and include our config dir scripts
-ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config"
-
-DIRS=""
-
-# Check whether --enable-cmulocal was given.
-if test "${enable_cmulocal+set}" = set; then
-  enableval=$enable_cmulocal;
-else
-  enable_cmulocal=no
-fi
-
-
-# Check whether --enable-sample was given.
-if test "${enable_sample+set}" = set; then
-  enableval=$enable_sample; enable_sample=yes
-fi
-
-
-# Check whether --enable-obsolete_cram_attr was given.
-if test "${enable_obsolete_cram_attr+set}" = set; then
-  enableval=$enable_obsolete_cram_attr; enable_obsolete_cram_attr=$enableval
-else
-  enable_obsolete_cram_attr=yes
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_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 $# != 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
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&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
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-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
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# 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"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /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
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-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.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&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}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for __attribute__" >&5
-$as_echo_n "checking for __attribute__... " >&6; }
-if test "${ac_cv___attribute__+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
-  exit(1);
-}
-
-int
-main ()
-{
-
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv___attribute__=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv___attribute__=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___ATTRIBUTE__ 1
-_ACEOF
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
-$as_echo "$ac_cv___attribute__" >&6; }
-
-
-
-   # CMU GUESS RUNPATH SWITCH
-  { $as_echo "$as_me:$LINENO: checking for runpath switch" >&5
-$as_echo_n "checking for runpath switch... " >&6; }
-if test "${andrew_cv_runpath_switch+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-    # first, try -R
-    SAVE_LDFLAGS="${LDFLAGS}"
-    LDFLAGS="-R /usr/lib"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  andrew_cv_runpath_switch="-R"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-  	LDFLAGS="-Wl,-rpath,/usr/lib"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  andrew_cv_runpath_switch="-Wl,-rpath,"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	andrew_cv_runpath_switch="none"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS="${SAVE_LDFLAGS}"
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $andrew_cv_runpath_switch" >&5
-$as_echo "$andrew_cv_runpath_switch" >&6; }
-
-
-# Check whether --with-staticsasl was given.
-if test "${with_staticsasl+set}" = set; then
-  withval=$with_staticsasl;
-fi
-
-if test "$with_staticsasl" = yes; then
-	enable_shared=yes
-	enable_static=yes
-fi
-
-save_target=$target
-if test -z "$target"; then
-	target="NONE"
-fi
-
-# new libtool
-# Check whether --enable-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=no
-fi
-
-# Check whether --enable-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-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
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-# Check whether --with-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_c_compiler_gnu" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-$as_echo_n "checking for ld used by GCC... " >&6; }
-  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
-  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${ac_cv_path_LD+set}" = set; then
-  $as_echo_n "(cached) " >&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
-  { $as_echo "$as_me:$LINENO: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${ac_cv_prog_gnu_ld+set}" = set; then
-  $as_echo_n "(cached) " >&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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
-$as_echo "$ac_cv_prog_gnu_ld" >&6; }
-
-
-{ $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-$as_echo_n "checking for BSD-compatible nm... " >&6; }
-if test "${ac_cv_path_NM+set}" = set; then
-  $as_echo_n "(cached) " >&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"
-{ $as_echo "$as_me:$LINENO: result: $NM" >&5
-$as_echo "$NM" >&6; }
-
-
-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_c_compiler_gnu" = 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 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 4787 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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"
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  lt_cv_cc_needs_belf=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	lt_cv_cc_needs_belf=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&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 <<\_ACEOF
-# 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, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# 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.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  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 \
-|| { { $as_echo "$as_me:$LINENO: error: libtool configure failed" >&5
-$as_echo "$as_me: error: libtool configure failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$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
-
-
-target=$save_target
-
-if test "$enable_static" = yes; then
-	SASL_STATIC_LIBS=libsasl2.a
-else
-	SASL_STATIC_LIBS=
-fi
-
-# Check whether --enable-staticdlopen was given.
-if test "${enable_staticdlopen+set}" = set; then
-  enableval=$enable_staticdlopen; enable_staticdlopen=$enableval
-else
-  enable_staticdlopen=no
-fi
-
-
-if test "$enable_staticdlopen" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TRY_DLOPEN_WHEN_STATIC /**/
-_ACEOF
-
-fi
-
-if test "$ac_cv_c_compiler_gnu" = yes; then
-  CFLAGS="-Wall -W ${CFLAGS}"
-fi
-
-
-# Check whether --with-purecov was given.
-if test "${with_purecov+set}" = set; then
-  withval=$with_purecov;
-fi
-
-if test "$with_purecov" = yes; then
-  for ac_prog in purecov
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PURECOV+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PURECOV"; then
-  ac_cv_prog_PURECOV="$PURECOV" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PURECOV="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-PURECOV=$ac_cv_prog_PURECOV
-if test -n "$PURECOV"; then
-  { $as_echo "$as_me:$LINENO: result: $PURECOV" >&5
-$as_echo "$PURECOV" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$PURECOV" && break
-done
-
-fi
-
-# Check whether --with-purify was given.
-if test "${with_purify+set}" = set; then
-  withval=$with_purify;
-fi
-
-if test "$with_purify" = yes; then
-  for ac_prog in purify
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PURIFY+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PURIFY"; then
-  ac_cv_prog_PURIFY="$PURIFY" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PURIFY="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-PURIFY=$ac_cv_prog_PURIFY
-if test -n "$PURIFY"; then
-  { $as_echo "$as_me:$LINENO: result: $PURIFY" >&5
-$as_echo "$PURIFY" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$PURIFY" && break
-done
-
-fi
-
-# Check whether --enable-java was given.
-if test "${enable_java+set}" = set; then
-  enableval=$enable_java; enable_java=$enableval
-else
-  enable_java=no
-fi
-
-if test "$enable_java" = yes; then
-  # Extract the first word of "javac", so it can be a program name with args.
-set dummy javac; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVAC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $JAVAC in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_JAVAC" && ac_cv_path_JAVAC="no"
-  ;;
-esac
-fi
-JAVAC=$ac_cv_path_JAVAC
-if test -n "$JAVAC"; then
-  { $as_echo "$as_me:$LINENO: result: $JAVAC" >&5
-$as_echo "$JAVAC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  for ac_prog in javah kaffeh
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVAH+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $JAVAH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-JAVAH=$ac_cv_path_JAVAH
-if test -n "$JAVAH"; then
-  { $as_echo "$as_me:$LINENO: result: $JAVAH" >&5
-$as_echo "$JAVAH" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$JAVAH" && break
-done
-test -n "$JAVAH" || JAVAH="no"
-
-  for ac_prog in javadoc
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_JAVADOC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$JAVADOC"; then
-  ac_cv_prog_JAVADOC="$JAVADOC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_JAVADOC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-JAVADOC=$ac_cv_prog_JAVADOC
-if test -n "$JAVADOC"; then
-  { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5
-$as_echo "$JAVADOC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$JAVADOC" && break
-done
-test -n "$JAVADOC" || JAVADOC=":"
-
-  if test "$JAVAC" = "no" -o "$JAVAH" = "no"; then
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling Java support" >&5
-$as_echo "$as_me: WARNING: Disabling Java support" >&2;}
-    enable_java=no
-  fi
-else
-# Make distcheck work
-  JAVAC="true"
-  JAVAH="true"
-  JAVADOC="true"
-fi
- if test "$enable_java" = yes; then
-  JAVA_TRUE=
-  JAVA_FALSE='#'
-else
-  JAVA_TRUE='#'
-  JAVA_FALSE=
-fi
-
-
-if test "$enable_java" = yes; then
-  { $as_echo "$as_me:$LINENO: checking JNI cpp flags" >&5
-$as_echo_n "checking JNI cpp flags... " >&6; }
-  if test "${sasl_cv_java_includes+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-  if test `echo $JAVAH | sed 's,.*/,,'` = "kaffeh"; then
-    sasl_cv_java_includes=-I`echo $JAVAH | sed -e 's,/bin.*,/include/kaffe,'`
-  else
-    java_base=`echo $JAVAC | sed 's,/bin.*,'','`
-
-
-# Check whether --with-javabase was given.
-if test "${with_javabase+set}" = set; then
-  withval=$with_javabase; java_base=$withval
-fi
-
-
-
-    sasl_cv_java_includes=''
-    for dir in `find ${java_base}/include -follow -type d -print | grep -v green_threads`; do
-      sasl_cv_java_includes="${sasl_cv_java_includes} -I$dir"
-    done
-  fi
-
-  sasl_cv_java_includes="${sasl_cv_java_includes} -I$javapath/include"
-fi
-
-
-  JAVA_INCLUDES=$sasl_cv_java_includes
-
-  { $as_echo "$as_me:$LINENO: result: ok" >&5
-$as_echo "ok" >&6; }
-
-  JAVAROOT=".."
-
-  JAVAC=`echo "$JAVAC" | sed 's,.*/,,'`
-  JAVAH=`echo "$JAVAH" | sed 's,.*/,,'`
-fi
-
- if test "$enable_sample" = yes; then
-  SAMPLE_TRUE=
-  SAMPLE_FALSE='#'
-else
-  SAMPLE_TRUE='#'
-  SAMPLE_FALSE=
-fi
-
-
-
-	save_LIBS="$LIBS"
-	LIB_SOCKET=""
-	{ $as_echo "$as_me:$LINENO: checking for connect" >&5
-$as_echo_n "checking for connect... " >&6; }
-if test "${ac_cv_func_connect+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define connect to an innocuous variant, in case <limits.h> declares connect.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define connect innocuous_connect
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char connect (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef connect
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-/* 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_connect || defined __stub___connect
-choke me
-#endif
-
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_connect=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_connect=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
-$as_echo "$ac_cv_func_connect" >&6; }
-if test "x$ac_cv_func_connect" = x""yes; then
-  :
-else
-  { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_nsl_gethostbyname=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_nsl_gethostbyname=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
-  LIB_SOCKET="-lnsl $LIB_SOCKET"
-fi
-
-		{ $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
-$as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_connect=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_connect=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
-$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then
-  LIB_SOCKET="-lsocket $LIB_SOCKET"
-fi
-
-
-fi
-
-	LIBS="$LIB_SOCKET $save_LIBS"
-	{ $as_echo "$as_me:$LINENO: checking for res_search" >&5
-$as_echo_n "checking for res_search... " >&6; }
-if test "${ac_cv_func_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define res_search innocuous_res_search
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char res_search (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef res_search
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-/* 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_res_search || defined __stub___res_search
-choke me
-#endif
-
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
-$as_echo "$ac_cv_func_res_search" >&6; }
-if test "x$ac_cv_func_res_search" = x""yes; then
-  :
-else
-  LIBS="-lresolv $LIB_SOCKET $save_LIBS"
-		cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-[
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#ifdef HAVE_ARPA_NAMESER_COMPAT_H
-#include <arpa/nameser_compat.h>
-#endif
-#include <resolv.h>]
-int
-main ()
-{
-[
-const char host[12]="openafs.org";
-u_char ans[1024];
-res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
-return 0;
-]
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  LIB_SOCKET="-lresolv $LIB_SOCKET"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-
-	LIBS="$LIB_SOCKET $save_LIBS"
-
-
-for ac_func in dn_expand dns_lookup
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-	LIBS="$save_LIBS"
-
-
-
-
-
-# Check whether --with-dbpath was given.
-if test "${with_dbpath+set}" = set; then
-  withval=$with_dbpath; dbpath=$withval
-else
-  dbpath=/etc/sasldb2
-fi
-
-{ $as_echo "$as_me:$LINENO: checking DB path to use" >&5
-$as_echo_n "checking DB path to use... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $dbpath" >&5
-$as_echo "$dbpath" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define SASL_DB_PATH "$dbpath"
-_ACEOF
-
-
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#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))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-cmu_save_LIBS="$LIBS"
-
-# Check whether --with-dblib was given.
-if test "${with_dblib+set}" = set; then
-  withval=$with_dblib; dblib=$withval
-else
-  dblib=auto_detect
-fi
-
-
-
-
-# Check whether --with-bdb-libdir was given.
-if test "${with_bdb_libdir+set}" = set; then
-  withval=$with_bdb_libdir; with_bdb_lib=$withval
-else
-   test "${with_bdb_lib+set}" = set || with_bdb_lib=none
-fi
-
-
-# Check whether --with-bdb-incdir was given.
-if test "${with_bdb_incdir+set}" = set; then
-  withval=$with_bdb_incdir; with_bdb_inc=$withval
-else
-   test "${with_bdb_inc+set}" = set || with_bdb_inc=none
-fi
-
-
-
-SASL_DB_LIB=""
-
-case "$dblib" in
-  berkeley)
-
-
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_bdb_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
-	    BDB_INCADD="-I$with_bdb_inc"
-	else
-	    BDB_INCADD=""
-	fi
-
-	                if test "${ac_cv_header_db_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking db.h usability" >&5
-$as_echo_n "checking db.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <db.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking db.h presence" >&5
-$as_echo_n "checking db.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <db.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: db.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_db_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-
-fi
-if test "x$ac_cv_header_db_h" = x""yes; then
-
-	BDB_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_bdb_lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
-  else
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
-  else
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-	else
-	    BDB_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-	    for dbname in ${with_bdb} \
-	        db-5.2 db5.2 db52 \
-	        db-5.1 db5.2 db51 \
-	        db-5.0 db5.2 db50 \
-	        db-4.8 db4.8 db48 \
-	        db-4.7 db4.7 db47 \
-	        db-4.6 db4.6 db46 \
-	        db-4.5 db4.5 db45 \
-	        db-4.4 db4.4 db44 \
-	        db-4.3 db4.3 db43 \
-	        db-4.2 db4.2 db42 \
-	        db-4.1 db4.1 db41 \
-	        db-4.0 db4.0 db40 db-4 db4 \
-	        db-3.3 db3.3 db33 \
-	        db-3.2 db3.2 db32 \
-	        db-3.1 db3.1 db31 \
-	        db-3.0 db3.0 db30 db-3 db3 \
-	        db
-	      do
-	    LIBS="$saved_LIBS -l$dbname"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_create(NULL, NULL, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-	    if test "$dblib" = "berkeley"; then break; fi
-          done
-        if test "$dblib" = "no"; then
-	    LIBS="$saved_LIBS -ldb"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        fi
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$BDB_SAVE_LDFLAGS
-
-else
-  dblib="no"
-fi
-
-
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-
-	CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
-	SASL_DB_INC=$BDB_INCADD
-	SASL_DB_LIB="${BDB_LIBADD}"
-	;;
-  gdbm)
-
-# Check whether --with-gdbm was given.
-if test "${with_gdbm+set}" = set; then
-  withval=$with_gdbm; with_gdbm="${withval}"
-fi
-
-
-        case "$with_gdbm" in
-           ""|yes)
-               if test "${ac_cv_header_gdbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
-$as_echo_n "checking gdbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gdbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
-$as_echo_n "checking gdbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gdbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gdbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gdbm_h" = x""yes; then
-
-			{ $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgdbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gdbm_open ();
-int
-main ()
-{
-return gdbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gdbm_gdbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gdbm_gdbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
-  SASL_DB_LIB="-lgdbm"
-else
-  dblib="no"
-fi
-
-else
-  dblib="no"
-fi
-
-
-               ;;
-           *)
-               if test -d $with_gdbm; then
-                 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
-                 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
-                 SASL_DB_LIB="-lgdbm"
-               else
-                 with_gdbm="no"
-               fi
-       esac
-	;;
-  ndbm)
-			if test "${ac_cv_header_ndbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
-$as_echo_n "checking ndbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <ndbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
-$as_echo_n "checking ndbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ndbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_ndbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_ndbm_h" = x""yes; then
-
-			{ $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
-$as_echo_n "checking for dbm_open in -lndbm... " >&6; }
-if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lndbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ndbm_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ndbm_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
-$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
-if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
-  SASL_DB_LIB="-lndbm"
-else
-
-				{ $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
-$as_echo_n "checking for dbm_open... " >&6; }
-if test "${ac_cv_func_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dbm_open innocuous_dbm_open
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dbm_open (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dbm_open
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-/* 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_dbm_open || defined __stub___dbm_open
-choke me
-#endif
-
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
-$as_echo "$ac_cv_func_dbm_open" >&6; }
-if test "x$ac_cv_func_dbm_open" = x""yes; then
-  :
-else
-  dblib="no"
-fi
-
-fi
-
-else
-  dblib="no"
-fi
-
-
-	;;
-  auto_detect)
-
-
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_bdb_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
-	    BDB_INCADD="-I$with_bdb_inc"
-	else
-	    BDB_INCADD=""
-	fi
-
-	                if test "${ac_cv_header_db_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking db.h usability" >&5
-$as_echo_n "checking db.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <db.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking db.h presence" >&5
-$as_echo_n "checking db.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <db.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: db.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_db_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-
-fi
-if test "x$ac_cv_header_db_h" = x""yes; then
-
-	BDB_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_bdb_lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
-  else
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
-  else
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-	else
-	    BDB_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-	    for dbname in ${with_bdb} \
-	        db-5.2 db5.2 db52 \
-	        db-5.1 db5.2 db51 \
-	        db-5.0 db5.2 db50 \
-	        db-4.8 db4.8 db48 \
-	        db-4.7 db4.7 db47 \
-	        db-4.6 db4.6 db46 \
-	        db-4.5 db4.5 db45 \
-	        db-4.4 db4.4 db44 \
-	        db-4.3 db4.3 db43 \
-	        db-4.2 db4.2 db42 \
-	        db-4.1 db4.1 db41 \
-	        db-4.0 db4.0 db40 db-4 db4 \
-	        db-3.3 db3.3 db33 \
-	        db-3.2 db3.2 db32 \
-	        db-3.1 db3.1 db31 \
-	        db-3.0 db3.0 db30 db-3 db3 \
-	        db
-	      do
-	    LIBS="$saved_LIBS -l$dbname"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_create(NULL, NULL, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-	    if test "$dblib" = "berkeley"; then break; fi
-          done
-        if test "$dblib" = "no"; then
-	    LIBS="$saved_LIBS -ldb"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        fi
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$BDB_SAVE_LDFLAGS
-
-else
-  dblib="no"
-fi
-
-
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-
-	if test "$dblib" = no; then
-	  	  if test "${ac_cv_header_ndbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
-$as_echo_n "checking ndbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <ndbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
-$as_echo_n "checking ndbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ndbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_ndbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_ndbm_h" = x""yes; then
-
-		{ $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
-$as_echo_n "checking for dbm_open in -lndbm... " >&6; }
-if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lndbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ndbm_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ndbm_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
-$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
-if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
-  dblib="ndbm"; SASL_DB_LIB="-lndbm"
-else
-  dblib="weird"
-fi
-
-else
-  dblib="no"
-fi
-
-
-	  if test "$dblib" = "weird"; then
-	                { $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
-$as_echo_n "checking for dbm_open... " >&6; }
-if test "${ac_cv_func_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dbm_open innocuous_dbm_open
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dbm_open (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dbm_open
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-/* 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_dbm_open || defined __stub___dbm_open
-choke me
-#endif
-
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
-$as_echo "$ac_cv_func_dbm_open" >&6; }
-if test "x$ac_cv_func_dbm_open" = x""yes; then
-  dblib="ndbm"
-else
-  dblib="no"
-fi
-
-	  fi
-
-	  if test "$dblib" = no; then
-               	    if test "${ac_cv_header_gdbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
-$as_echo_n "checking gdbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gdbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
-$as_echo_n "checking gdbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gdbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gdbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gdbm_h" = x""yes; then
-
-		{ $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgdbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gdbm_open ();
-int
-main ()
-{
-return gdbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gdbm_gdbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gdbm_gdbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
-  dblib="gdbm";
-					     SASL_DB_LIB="-lgdbm"
-else
-  dblib="no"
-fi
-
-else
-  dblib="no"
-fi
-
-
-	  fi
-	else
-	  	  CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
-	  SASL_DB_INC=$BDB_INCADD
-          SASL_DB_LIB="${BDB_LIBADD}"
-	fi
-	;;
-  none)
-	;;
-  no)
-	;;
-  *)
-	{ $as_echo "$as_me:$LINENO: WARNING: Bad DB library implementation specified;" >&5
-$as_echo "$as_me: WARNING: Bad DB library implementation specified;" >&2;}
-	{ { $as_echo "$as_me:$LINENO: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&5
-$as_echo "$as_me: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&2;}
-   { (exit 1); exit 1; }; }
-	dblib=no
-	;;
-esac
-LIBS="$cmu_save_LIBS"
-
-{ $as_echo "$as_me:$LINENO: checking DB library to use" >&5
-$as_echo_n "checking DB library to use... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $dblib" >&5
-$as_echo "$dblib" >&6; }
-
-SASL_DB_BACKEND="db_${dblib}.lo"
-SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
-SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
-SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
-SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
-
-case "$dblib" in
-  gdbm)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-
-cat >>confdefs.h <<\_ACEOF
-#define SASL_GDBM /**/
-_ACEOF
-
-    ;;
-  ndbm)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-
-cat >>confdefs.h <<\_ACEOF
-#define SASL_NDBM /**/
-_ACEOF
-
-    ;;
-  berkeley)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-
-cat >>confdefs.h <<\_ACEOF
-#define SASL_BERKELEYDB /**/
-_ACEOF
-
-    ;;
-  *)
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling SASL authentication database support" >&5
-$as_echo "$as_me: WARNING: Disabling SASL authentication database support" >&2;}
-            SASL_DB_BACKEND="db_none.lo"
-    SASL_DB_BACKEND_STATIC="db_none.o"
-    SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
-    SASL_DB_UTILS=""
-    SASL_DB_MANS=""
-    SASL_DB_LIB=""
-    ;;
-esac
-
-if test "$enable_static" = yes; then
-    if test "$dblib" != "none"; then
-      SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
-      SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_SASLDB /**/
-_ACEOF
-
-    else
-      SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
-      SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
-    fi
-fi
-
-
-
-
-
-
-
-
-
-# Do we not install the SASL DB man pages?
- if test "x$SASL_DB_MANS" = "x"; then
-  NO_SASL_DB_MANS_TRUE=
-  NO_SASL_DB_MANS_FALSE='#'
-else
-  NO_SASL_DB_MANS_TRUE='#'
-  NO_SASL_DB_MANS_FALSE=
-fi
-
-
-# Check whether --enable-keep_db_open was given.
-if test "${enable_keep_db_open+set}" = set; then
-  enableval=$enable_keep_db_open; keep_db_open=$enableval
-else
-  keep_db_open=no
-fi
-
-
-# Disable if Berkeley DB is not used
-if test "$dblib" != berkeley; then
-  keep_db_open=no
-fi
-
-if test "$keep_db_open" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define KEEP_DB_OPEN /**/
-_ACEOF
-
-fi
-{ $as_echo "$as_me:$LINENO: checking if Berkeley DB handle is kept open in SASLDB" >&5
-$as_echo_n "checking if Berkeley DB handle is kept open in SASLDB... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $keep_db_open" >&5
-$as_echo "$keep_db_open" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_dl_dlopen=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  SASL_DL_LIB="-ldl"
-else
-  SASL_DL_LIB=""
-fi
-
-
-
-
-
-# Check whether --with-devrandom was given.
-if test "${with_devrandom+set}" = set; then
-  withval=$with_devrandom; devrandom=$withval
-else
-  devrandom=/dev/random
-fi
-
-{ $as_echo "$as_me:$LINENO: checking /dev/random to use" >&5
-$as_echo_n "checking /dev/random to use... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $devrandom" >&5
-$as_echo "$devrandom" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define SASL_DEV_RANDOM "$devrandom"
-_ACEOF
-
-
-
-for ac_prog in nm
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NM+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$NM"; then
-  ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_NM="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
-  { $as_echo "$as_me:$LINENO: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$NM" && break
-done
-
-
-{ $as_echo "$as_me:$LINENO: checking for underscore before symbols" >&5
-$as_echo_n "checking for underscore before symbols... " >&6; }
-if test "${sasl_cv_uscore+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-    echo "main(){int i=1;}
-    foo(){int i=6;}" > conftest.c
-    ${CC} -o a.out conftest.c > /dev/null
-    if (${NM} a.out | grep _foo) > /dev/null; then
-      sasl_cv_uscore=yes
-    else
-      sasl_cv_uscore=no
-    fi
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $sasl_cv_uscore" >&5
-$as_echo "$sasl_cv_uscore" >&6; }
-rm -f conftest.c a.out
-
-if test $sasl_cv_uscore = yes; then
-  if test $ac_cv_lib_dl_dlopen = yes ; then
-	{ $as_echo "$as_me:$LINENO: checking whether dlsym adds the underscore for us" >&5
-$as_echo_n "checking whether dlsym adds the underscore for us... " >&6; }
-	cmu_save_LIBS="$LIBS"
-	LIBS="$LIBS $SASL_DL_LIB"
-	if test "${sasl_cv_dlsym_adds_uscore+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  { $as_echo "$as_me:$LINENO: WARNING: cross-compiler" >&5
-$as_echo "$as_me: WARNING: cross-compiler" >&2;}
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <dlfcn.h>
-#include <stdio.h>
-foo() { int i=0;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
-    if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo");
-    if(ptr1 && !ptr2) exit(0); } exit(1); }
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  sasl_cv_dlsym_adds_uscore=yes
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-sasl_cv_dlsym_adds_uscore=no
-
-cat >>confdefs.h <<\_ACEOF
-#define DLSYM_NEEDS_UNDERSCORE /**/
-_ACEOF
-
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-
-	LIBS="$cmu_save_LIBS"
-      { $as_echo "$as_me:$LINENO: result: $sasl_cv_dlsym_adds_uscore" >&5
-$as_echo "$sasl_cv_dlsym_adds_uscore" >&6; }
-  fi
-fi
-
-
-for ac_func in syslog
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-# Check whether --with-pam was given.
-if test "${with_pam+set}" = set; then
-  withval=$with_pam; with_pam=$withval
-else
-  with_pam=yes
-fi
-
-if test "$with_pam" != no; then
-  if test -d $with_pam; then
-    CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
-    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
-  fi
-
-
-for ac_header in security/pam_appl.h pam/pam_appl.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-  cmu_save_LIBS="$LIBS"
-  { $as_echo "$as_me:$LINENO: checking for pam_start" >&5
-$as_echo_n "checking for pam_start... " >&6; }
-if test "${ac_cv_func_pam_start+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define pam_start to an innocuous variant, in case <limits.h> declares pam_start.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pam_start innocuous_pam_start
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pam_start (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef pam_start
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pam_start ();
-/* 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_pam_start || defined __stub___pam_start
-choke me
-#endif
-
-int
-main ()
-{
-return pam_start ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_pam_start=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_pam_start=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pam_start" >&5
-$as_echo "$ac_cv_func_pam_start" >&6; }
-if test "x$ac_cv_func_pam_start" = x""yes; then
-  :
-else
-  LIBS="-lpam $LIBS"
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#ifdef HAVE_PAM_PAM_APPL_H
-#include <pam/pam_appl.h>
-#endif
-#ifdef HAVE_SECURITY_PAM_H
-#include <security/pam_appl.h>
-#endif
-int
-main ()
-{
-
-const char *service="foo";
-const char *user="bar";
-pam_handle_t *pamh;
-struct pam_conv *conv;
-int baz;
-baz = pam_start(service, user, conv, &pamh);
-return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  LIBPAM="-lpam"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-
-  LIBS="$cmu_save_LIBS $LIBPAM"
-fi
-
-
-# Check whether --with-saslauthd was given.
-if test "${with_saslauthd+set}" = set; then
-  withval=$with_saslauthd; with_saslauthd=$withval
-else
-  with_saslauthd=yes
-fi
-
-if test "$with_saslauthd" != no; then
-  if test "$with_saslauthd" = yes; then
-    with_saslauthd="/var/state/saslauthd"
-  fi
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SASLAUTHD /**/
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PATH_SASLAUTHD_RUNDIR "$with_saslauthd"
-_ACEOF
-
-fi
- if test "$with_saslauthd" != no; then
-  SASLAUTHD_TRUE=
-  SASLAUTHD_FALSE='#'
-else
-  SASLAUTHD_TRUE='#'
-  SASLAUTHD_FALSE=
-fi
-
-{ $as_echo "$as_me:$LINENO: checking if I should include saslauthd" >&5
-$as_echo_n "checking if I should include saslauthd... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $with_saslauthd" >&5
-$as_echo "$with_saslauthd" >&6; }
-
-
-# Check whether --with-authdaemond was given.
-if test "${with_authdaemond+set}" = set; then
-  withval=$with_authdaemond; with_authdaemon=$withval
-else
-  with_authdaemon=yes
-fi
-
-if test "$with_authdaemon" != no; then
-  if test "$with_authdaemon" = yes; then
-    with_authdaemon="/dev/null"
-  fi
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_AUTHDAEMON /**/
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PATH_AUTHDAEMON_SOCKET "$with_authdaemon"
-_ACEOF
-
-fi
-{ $as_echo "$as_me:$LINENO: checking to include Courier authdaemond support" >&5
-$as_echo_n "checking to include Courier authdaemond support... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $with_authdaemon" >&5
-$as_echo "$with_authdaemon" >&6; }
-
-
-# Check whether --with-pwcheck was given.
-if test "${with_pwcheck+set}" = set; then
-  withval=$with_pwcheck; with_pwcheck=$withval
-else
-  with_pwcheck=no
-fi
-
-if test "$with_pwcheck" != no; then
-   if test "$with_pwcheck" = yes; then
-     with_pwcheck=/var/pwcheck
-   fi
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PWCHECK /**/
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PWCHECKDIR "$with_pwcheck"
-_ACEOF
-
-   { $as_echo "$as_me:$LINENO: checking for getspnam" >&5
-$as_echo_n "checking for getspnam... " >&6; }
-if test "${ac_cv_func_getspnam+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getspnam to an innocuous variant, in case <limits.h> declares getspnam.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getspnam innocuous_getspnam
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getspnam (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getspnam
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getspnam ();
-/* 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_getspnam || defined __stub___getspnam
-choke me
-#endif
-
-int
-main ()
-{
-return getspnam ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_getspnam=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_getspnam=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
-$as_echo "$ac_cv_func_getspnam" >&6; }
-if test "x$ac_cv_func_getspnam" = x""yes; then
-  PWCHECKMETH="getspnam"
-else
-  PWCHECKMETH="getpwnam"
-fi
-
-
-fi
- if test "$with_pwcheck" != no; then
-  PWCHECK_TRUE=
-  PWCHECK_FALSE='#'
-else
-  PWCHECK_TRUE='#'
-  PWCHECK_FALSE=
-fi
-
-{ $as_echo "$as_me:$LINENO: checking if I should include pwcheck" >&5
-$as_echo_n "checking if I should include pwcheck... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $with_pwcheck" >&5
-$as_echo "$with_pwcheck" >&6; }
-
-
-# Check whether --with-ipctype was given.
-if test "${with_ipctype+set}" = set; then
-  withval=$with_ipctype; with_ipctype=$withval
-else
-  with_ipctype="unix"
-fi
-
-IPCTYPE=$with_ipctype
-
-LIB_DOOR=
-if test "$with_ipctype" = "doors"; then
-   LIB_DOOR="-ldoor"
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_DOORS /**/
-_ACEOF
-
-fi
-
-
-# Check whether --enable-alwaystrue was given.
-if test "${enable_alwaystrue+set}" = set; then
-  enableval=$enable_alwaystrue; enable_alwaystrue=$enableval
-else
-  enable_alwaystrue=no
-fi
-
-if test "$enable_alwaystrue" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALWAYSTRUE /**/
-_ACEOF
-
-fi
-{ $as_echo "$as_me:$LINENO: checking if I should include the alwaystrue verifier" >&5
-$as_echo_n "checking if I should include the alwaystrue verifier... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $enable_alwaystrue" >&5
-$as_echo "$enable_alwaystrue" >&6; }
-
-# Check whether --enable-checkapop was given.
-if test "${enable_checkapop+set}" = set; then
-  enableval=$enable_checkapop; checkapop=$enableval
-else
-  checkapop=yes
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking if we should enable sasl_checkapop" >&5
-$as_echo_n "checking if we should enable sasl_checkapop... " >&6; }
-if test "$checkapop" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define DO_SASL_CHECKAPOP /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-cram was given.
-if test "${enable_cram+set}" = set; then
-  enableval=$enable_cram; cram=$enableval
-else
-  cram=yes
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking CRAM-MD5" >&5
-$as_echo_n "checking CRAM-MD5... " >&6; }
-if test "$cram" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SASL_MECHS="$SASL_MECHS libcrammd5.la"
-  if test "$enable_obsolete_cram_attr" = yes; then
-    CPPFLAGS="$CPPFLAGS -DOBSOLETE_CRAM_ATTR=1"
-  fi
-  if test "$enable_static" = yes; then
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS cram.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/cram.c"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_CRAMMD5 /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-# Check whether --with-lib-subdir was given.
-if test "${with_lib_subdir+set}" = set; then
-  withval=$with_lib_subdir;
-fi
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (long))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (long))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-{ $as_echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
-$as_echo_n "checking what directory libraries are found in... " >&6; }
-if test "${ac_cv_cmu_lib_subdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
-test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
-if test "X$with_lib_subdir" = "X" ; then
-  ac_cv_cmu_lib_subdir=lib
-  if test $ac_cv_sizeof_long -eq 4 ; then
-    test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
-  fi
-  if test $ac_cv_sizeof_long -eq 8 ; then
-    test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
-  fi
-else
-  ac_cv_cmu_lib_subdir=$with_lib_subdir
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
-$as_echo "$ac_cv_cmu_lib_subdir" >&6; }
-CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
-
-
-
-
-
-# Check whether --with-openssl was given.
-if test "${with_openssl+set}" = set; then
-  withval=$with_openssl; with_openssl=$withval
-else
-  with_openssl="yes"
-fi
-
-
-	save_CPPFLAGS=$CPPFLAGS
-	save_LDFLAGS=$LDFLAGS
-
-	if test -d $with_openssl; then
-	  CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
-
-  # this is CMU ADD LIBPATH
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
-  else
-	LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR $andrew_cv_runpath_switch${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
-  fi
-
-	fi
-
-case "$with_openssl" in
-	no)
-	  with_openssl="no";;
-	*)
-	  	                  LIB_RSAREF=""
-	        { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
-$as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
-if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrsaref  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RSAPublicEncrypt ();
-int
-main ()
-{
-return RSAPublicEncrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_rsaref_RSAPublicEncrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_rsaref_RSAPublicEncrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
-$as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
-if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
-  cmu_have_rsaref=yes;
-			{ $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lRSAglue" >&5
-$as_echo_n "checking for RSAPublicEncrypt in -lRSAglue... " >&6; }
-if test "${ac_cv_lib_RSAglue_RSAPublicEncrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lRSAglue  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RSAPublicEncrypt ();
-int
-main ()
-{
-return RSAPublicEncrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_RSAglue_RSAPublicEncrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_RSAglue_RSAPublicEncrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_RSAglue_RSAPublicEncrypt" >&5
-$as_echo "$ac_cv_lib_RSAglue_RSAPublicEncrypt" >&6; }
-if test "x$ac_cv_lib_RSAglue_RSAPublicEncrypt" = x""yes; then
-  LIB_RSAREF="-lRSAglue -lrsaref"
-else
-  LIB_RSAREF="-lrsaref"
-fi
-
-else
-  cmu_have_rsaref=no
-fi
-
-
-		if test "${ac_cv_header_openssl_evp_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
-$as_echo_n "checking for openssl/evp.h... " >&6; }
-if test "${ac_cv_header_openssl_evp_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
-$as_echo "$ac_cv_header_openssl_evp_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/evp.h usability" >&5
-$as_echo_n "checking openssl/evp.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/evp.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/evp.h presence" >&5
-$as_echo_n "checking openssl/evp.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/evp.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
-$as_echo_n "checking for openssl/evp.h... " >&6; }
-if test "${ac_cv_header_openssl_evp_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_evp_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
-$as_echo "$ac_cv_header_openssl_evp_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_evp_h" = x""yes; then
-
-			{ $as_echo "$as_me:$LINENO: checking for EVP_DigestInit in -lcrypto" >&5
-$as_echo_n "checking for EVP_DigestInit in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_EVP_DigestInit+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char EVP_DigestInit ();
-int
-main ()
-{
-return EVP_DigestInit ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_EVP_DigestInit=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_EVP_DigestInit=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_EVP_DigestInit" >&5
-$as_echo "$ac_cv_lib_crypto_EVP_DigestInit" >&6; }
-if test "x$ac_cv_lib_crypto_EVP_DigestInit" = x""yes; then
-  with_openssl="yes"
-else
-  with_openssl="no"
-fi
-
-else
-  with_openssl=no
-fi
-
-
-		;;
-esac
-
-	if test "$with_openssl" != "no"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPENSSL /**/
-_ACEOF
-
-	else
-		CPPFLAGS=$save_CPPFLAGS
-		LDFLAGS=$save_LDFLAGS
-	fi
-
-{ $as_echo "$as_me:$LINENO: checking for OpenSSL" >&5
-$as_echo_n "checking for OpenSSL... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
-$as_echo "$with_openssl" >&6; }
-
-
-
-# Check whether --with-des was given.
-if test "${with_des+set}" = set; then
-  withval=$with_des; with_des=$withval
-else
-  with_des=yes
-fi
-
-
-LIB_DES=""
-if test "$with_des" != no; then
-  if test -d $with_des; then
-    CPPFLAGS="$CPPFLAGS -I${with_des}/include"
-    LDFLAGS="$LDFLAGS -L${with_des}/lib"
-  fi
-
-  if test "$with_openssl" != no; then
-        { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
-
-        if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
-$as_echo_n "checking openssl/des.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/des.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
-$as_echo_n "checking openssl/des.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/des.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_des_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_des_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SSL_DES /**/
-_ACEOF
-
-                                       LIB_DES="-lcrypto";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-
-else
-  with_des=no
-fi
-
-
-        if test "$with_des" = no; then
-      { $as_echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char DES_cbc_encrypt ();
-int
-main ()
-{
-return DES_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_DES_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_DES_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = x""yes; then
-
-        if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
-$as_echo_n "checking openssl/des.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/des.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
-$as_echo_n "checking openssl/des.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/des.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_des_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_des_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SSL_DES /**/
-_ACEOF
-
-                                       LIB_DES="-lcrypto";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-
-else
-  with_des=no
-fi
-
-    fi
-  fi
-
-  if test "$with_des" = no; then
-    { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
-if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_des_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then
-  LIB_DES="-ldes";
-                                        with_des=yes
-else
-  with_des=no
-fi
-
-  fi
-
-  if test "$with_des" = no; then
-     { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
-if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes425  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_des425_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des425_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then
-  LIB_DES="-ldes425";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-  fi
-
-  if test "$with_des" = no; then
-     { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes524" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes524... " >&6; }
-if test "${ac_cv_lib_des524_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes524  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_des524_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des524_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des524_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des524_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des524_des_cbc_encrypt" = x""yes; then
-  LIB_DES="-ldes524";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-  fi
-
-  if test "$with_des" = no; then
-
-            LIB_RSAREF=""
-    { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
-$as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
-if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrsaref  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RSAPublicEncrypt ();
-int
-main ()
-{
-return RSAPublicEncrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_rsaref_RSAPublicEncrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_rsaref_RSAPublicEncrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
-$as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
-if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
-  LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
-else
-  cmu_have_rsaref=no
-fi
-
-
-    { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
-
-	if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
-$as_echo_n "checking openssl/des.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/des.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
-$as_echo_n "checking openssl/des.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/des.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_des_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_des_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SSL_DES /**/
-_ACEOF
-
-					LIB_DES="-lcrypto";
-					with_des=yes
-else
-  with_des=no
-fi
-
-
-else
-  with_des=no
-fi
-
-  fi
-fi
-
-if test "$with_des" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_DES /**/
-_ACEOF
-
-fi
-
-
-
-
-# Check whether --enable-digest was given.
-if test "${enable_digest+set}" = set; then
-  enableval=$enable_digest; digest=$enableval
-else
-  digest=yes
-fi
-
-
-if test "$digest" != no; then
-    if test -d $digest; then
-    CPPFLAGS="$CPPFLAGS -I$digest/include"
-    LDFLAGS="$LDFLAGS -L$digest/lib"
-  fi
-  if test "$with_des" = no; then
-    { $as_echo "$as_me:$LINENO: WARNING: No DES support for DIGEST-MD5" >&5
-$as_echo "$as_me: WARNING: No DES support for DIGEST-MD5" >&2;}
-  fi
-fi
-
-{ $as_echo "$as_me:$LINENO: checking DIGEST-MD5" >&5
-$as_echo_n "checking DIGEST-MD5... " >&6; }
-if test "$digest" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SASL_MECHS="$SASL_MECHS libdigestmd5.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/digestmd5.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS digestmd5.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_DIGESTMD5 /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-scram was given.
-if test "${enable_scram+set}" = set; then
-  enableval=$enable_scram; scram=$enableval
-else
-  scram=yes
-fi
-
-
-if test "$with_openssl" = no; then
-  { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- SCRAM will be disabled" >&5
-$as_echo "$as_me: WARNING: OpenSSL not found -- SCRAM will be disabled" >&2;}
-  scram=no
-fi
-
-{ $as_echo "$as_me:$LINENO: checking SCRAM" >&5
-$as_echo_n "checking SCRAM... " >&6; }
-if test "$scram" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SCRAM_LIBS="-lcrypto $LIB_RSAREF"
-
-  SASL_MECHS="$SASL_MECHS libscram.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/scram.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS scram.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_SCRAM /**/
-_ACEOF
-
-  fi
-
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-otp was given.
-if test "${enable_otp+set}" = set; then
-  enableval=$enable_otp; otp=$enableval
-else
-  otp=yes
-fi
-
-
-if test "$with_openssl" = no; then
-  { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- OTP will be disabled" >&5
-$as_echo "$as_me: WARNING: OpenSSL not found -- OTP will be disabled" >&2;}
-  otp=no
-fi
-
-{ $as_echo "$as_me:$LINENO: checking OTP" >&5
-$as_echo_n "checking OTP... " >&6; }
-if test "$otp" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  OTP_LIBS="-lcrypto $LIB_RSAREF"
-
-  SASL_MECHS="$SASL_MECHS libotp.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/otp.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS otp.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_OTP /**/
-_ACEOF
-
-  fi
-
-
-# Check whether --with-with-opie was given.
-if test "${with_with_opie+set}" = set; then
-  withval=$with_with_opie; with_opie="${withval}"
-fi
-
-
-  case "$with_opie" in
-	""|yes)
-		{ $as_echo "$as_me:$LINENO: checking for opiechallenge in -lopie" >&5
-$as_echo_n "checking for opiechallenge in -lopie... " >&6; }
-if test "${ac_cv_lib_opie_opiechallenge+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lopie  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opiechallenge ();
-int
-main ()
-{
-return opiechallenge ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_opie_opiechallenge=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_opie_opiechallenge=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_opie_opiechallenge" >&5
-$as_echo "$ac_cv_lib_opie_opiechallenge" >&6; }
-if test "x$ac_cv_lib_opie_opiechallenge" = x""yes; then
-
-			if test "${ac_cv_header_opie_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for opie.h" >&5
-$as_echo_n "checking for opie.h... " >&6; }
-if test "${ac_cv_header_opie_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_opie_h" >&5
-$as_echo "$ac_cv_header_opie_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking opie.h usability" >&5
-$as_echo_n "checking opie.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <opie.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking opie.h presence" >&5
-$as_echo_n "checking opie.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <opie.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: opie.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: opie.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: opie.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: opie.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: opie.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: opie.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: opie.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: opie.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: opie.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for opie.h" >&5
-$as_echo_n "checking for opie.h... " >&6; }
-if test "${ac_cv_header_opie_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_opie_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_opie_h" >&5
-$as_echo "$ac_cv_header_opie_h" >&6; }
-
-fi
-if test "x$ac_cv_header_opie_h" = x""yes; then
-  with_opie="yes"
-else
-  with_opie="no"
-fi
-
-
-else
-  with_opie="no"
-fi
-
-		;;
-	*)
-		if test -d $with_opie; then
-		  CPPFLAGS="${CPPFLAGS} -I${with_opie}/include"
-		  LDFLAGS="${LDFLAGS} -L${with_opie}/lib"
-		else
-		  with_opie="no"
-		fi
-		;;
-  esac
-
-  { $as_echo "$as_me:$LINENO: checking for OPIE" >&5
-$as_echo_n "checking for OPIE... " >&6; }
-  { $as_echo "$as_me:$LINENO: result: $with_opie" >&5
-$as_echo "$with_opie" >&6; }
-
-  if test "$with_opie" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPIE /**/
-_ACEOF
-
-    OTP_LIBS="$OTP_LIBS -lopie"
-  fi
-
-
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-srp was given.
-if test "${enable_srp+set}" = set; then
-  enableval=$enable_srp; srp=$enableval
-else
-  srp=no
-fi
-
-
-if test "$with_openssl" = no; then
-  { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- SRP will be disabled" >&5
-$as_echo "$as_me: WARNING: OpenSSL not found -- SRP will be disabled" >&2;}
-  srp=no
-fi
-
-{ $as_echo "$as_me:$LINENO: checking SRP" >&5
-$as_echo_n "checking SRP... " >&6; }
-if test "$srp" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SRP_LIBS="-lcrypto $LIB_RSAREF"
-
-  SASL_MECHS="$SASL_MECHS libsrp.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/srp.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS srp.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_SRP /**/
-_ACEOF
-
-  fi
-
-  # Check whether --enable-srp_setpass was given.
-if test "${enable_srp_setpass+set}" = set; then
-  enableval=$enable_srp_setpass; srp_setpass=$enableval
-else
-  srp_setpass=no
-fi
-
-
-  { $as_echo "$as_me:$LINENO: checking if we should enable setting SRP secrets with saslpasswd" >&5
-$as_echo_n "checking if we should enable setting SRP secrets with saslpasswd... " >&6; }
-  if test "$srp_setpass" != no; then
-    { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define DO_SRP_SETPASS /**/
-_ACEOF
-
-  else
-    { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-  fi
-
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-
-
-  # Check whether --enable-krb4 was given.
-if test "${enable_krb4+set}" = set; then
-  enableval=$enable_krb4; krb4=$enableval
-else
-  krb4=no
-fi
-
-
-  if test "$krb4" != no; then
-
-{ $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
-
-fi
-
-
-            if test -d ${krb4}; then
-       { $as_echo "$as_me:$LINENO: checking for Kerberos includes" >&5
-$as_echo_n "checking for Kerberos includes... " >&6; }
-if test "${cyrus_krbinclude+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-         for krbhloc in include/kerberosIV include/kerberos include
-         do
-           if test -f ${krb4}/${krbhloc}/krb.h ; then
-             cyrus_krbinclude=${krb4}/${krbhloc}
-             break
-           fi
-         done
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
-$as_echo "$cyrus_krbinclude" >&6; }
-
-       if test -n "${cyrus_krbinclude}"; then
-         CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
-       fi
-       LDFLAGS="$LDFLAGS -L$krb4/lib"
-    fi
-
-    if test "$with_des" != no; then
-      if test "${ac_cv_header_krb_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for krb.h" >&5
-$as_echo_n "checking for krb.h... " >&6; }
-if test "${ac_cv_header_krb_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
-$as_echo "$ac_cv_header_krb_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking krb.h usability" >&5
-$as_echo_n "checking krb.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <krb.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking krb.h presence" >&5
-$as_echo_n "checking krb.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <krb.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: krb.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: krb.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for krb.h" >&5
-$as_echo_n "checking for krb.h... " >&6; }
-if test "${ac_cv_header_krb_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_krb_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
-$as_echo "$ac_cv_header_krb_h" >&6; }
-
-fi
-if test "x$ac_cv_header_krb_h" = x""yes; then
-
-        { $as_echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
-$as_echo_n "checking for com_err in -lcom_err... " >&6; }
-if test "${ac_cv_lib_com_err_com_err+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcom_err  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char com_err ();
-int
-main ()
-{
-return com_err ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_com_err_com_err=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_com_err_com_err=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
-$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
-if test "x$ac_cv_lib_com_err_com_err" = x""yes; then
-
-	  { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
-$as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb $LIB_DES -lcom_err $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_mk_priv ();
-int
-main ()
-{
-return krb_mk_priv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb_krb_mk_priv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb_krb_mk_priv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
-$as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
-if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
-  COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
-else
-  krb4lib=no
-fi
-
-else
-
-    	  { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
-$as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb $LIB_DES $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_mk_priv ();
-int
-main ()
-{
-return krb_mk_priv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb_krb_mk_priv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb_krb_mk_priv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
-$as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
-if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
-  COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
-else
-  krb4lib=no
-fi
-
-fi
-
-else
-  krb4="no"
-fi
-
-
-
-      if test "$krb4" != "no" -a "$krb4lib" = "no"; then
-	{ $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb4" >&5
-$as_echo_n "checking for krb_mk_priv in -lkrb4... " >&6; }
-if test "${ac_cv_lib_krb4_krb_mk_priv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb4 $LIB_DES $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_mk_priv ();
-int
-main ()
-{
-return krb_mk_priv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb4_krb_mk_priv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb4_krb_mk_priv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_mk_priv" >&5
-$as_echo "$ac_cv_lib_krb4_krb_mk_priv" >&6; }
-if test "x$ac_cv_lib_krb4_krb_mk_priv" = x""yes; then
-  COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes
-else
-  krb4=no
-fi
-
-      fi
-      if test "$krb4" = no; then
-          { $as_echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
-$as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}
-      fi
-    else
-      { $as_echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
-$as_echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
-      krb4=no
-    fi
-  fi
-
-  if test "$krb4" != no; then
-    cmu_save_LIBS="$LIBS"
-    LIBS="$LIBS $SASL_KRB_LIB"
-
-for ac_func in krb_get_err_text
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-    LIBS="$cmu_save_LIBS"
-  fi
-
-  { $as_echo "$as_me:$LINENO: checking KERBEROS_V4" >&5
-$as_echo_n "checking KERBEROS_V4... " >&6; }
-  if test "$krb4" != no; then
-    { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-    SASL_MECHS="$SASL_MECHS libkerberos4.la"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_KERBEROS4 /**/
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KRB /**/
-_ACEOF
-
-    SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
-  else
-    { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-  fi
-
-
-{ $as_echo "$as_me:$LINENO: checking for crypt" >&5
-$as_echo_n "checking for crypt... " >&6; }
-if test "${ac_cv_func_crypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define crypt innocuous_crypt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char crypt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef crypt
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-/* 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_crypt || defined __stub___crypt
-choke me
-#endif
-
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_crypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_crypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
-$as_echo "$ac_cv_func_crypt" >&6; }
-if test "x$ac_cv_func_crypt" = x""yes; then
-  cmu_have_crypt=yes
-else
-  { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-$as_echo_n "checking for crypt in -lcrypt... " >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypt_crypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypt_crypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
-if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
-  LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
-else
-  cmu_have_crypt=no
-fi
-
-fi
-
-
-
-
-
-# Check whether --enable-gssapi was given.
-if test "${enable_gssapi+set}" = set; then
-  enableval=$enable_gssapi; gssapi=$enableval
-else
-  gssapi=yes
-fi
-
-
-# Check whether --with-gss_impl was given.
-if test "${with_gss_impl+set}" = set; then
-  withval=$with_gss_impl; gss_impl=$withval
-else
-  gss_impl=auto
-fi
-
-
-if test "$gssapi" != no; then
-  platform=
-  case "${host}" in
-    *-*-linux*)
-      platform=__linux
-      ;;
-    *-*-hpux*)
-      platform=__hpux
-      ;;
-    *-*-irix*)
-      platform=__irix
-      ;;
-    *-*-solaris2*)
-# When should we use __sunos?
-      platform=__solaris
-      ;;
-    *-*-aix*)
-###_AIX
-      platform=__aix
-      ;;
-    *)
-      { $as_echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
-$as_echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
-      if test "$gss_impl" = "cybersafe"; then
-        { { $as_echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
-$as_echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
-   { (exit 1); exit 1; }; }
-      fi
-      ;;
-  esac
-
-  cmu_saved_CPPFLAGS=$CPPFLAGS
-
-  if test -d ${gssapi}; then
-    CPPFLAGS="$CPPFLAGS -I$gssapi/include"
-# We want to keep -I in our CPPFLAGS, but only if we succeed
-    cmu_saved_CPPFLAGS=$CPPFLAGS
-### I am not sure how useful is this (and whether this is required at all
-### especially when we have to provide two -L flags for new CyberSafe
-    LDFLAGS="$LDFLAGS -L$gssapi/lib"
-
-    if test -n "$platform"; then
-      if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
-        CPPFLAGS="$CPPFLAGS -D$platform"
-        if test -d "${gssapi}/appsec-sdk/include"; then
-          CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
-        fi
-      fi
-    fi
-  fi
-  if test "${ac_cv_header_gssapi_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
-$as_echo_n "checking for gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gssapi.h usability" >&5
-$as_echo_n "checking gssapi.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gssapi.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gssapi.h presence" >&5
-$as_echo_n "checking gssapi.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gssapi.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gssapi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
-$as_echo_n "checking for gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gssapi_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gssapi_h" = x""yes; then
-  :
-else
-  if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
-$as_echo_n "checking for gssapi/gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
-$as_echo_n "checking gssapi/gssapi.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gssapi/gssapi.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
-$as_echo_n "checking gssapi/gssapi.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
-$as_echo_n "checking for gssapi/gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then
-  :
-else
-  { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
-$as_echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
-fi
-
-
-fi
-
-
-
-for ac_header in gssapi/gssapi_ext.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-  CPPFLAGS=$cmu_saved_CPPFLAGS
-
-fi
-
-if test "$gssapi" != no; then
-  if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSSAPI_H /**/
-_ACEOF
-
-  fi
-
-  # We need to find out which gssapi implementation we are
-  # using. Supported alternatives are: MIT Kerberos 5,
-  # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
-  # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
-  # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
-  #
-  # The choice is reflected in GSSAPIBASE_LIBS
-
-
-{ $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
-
-fi
-
-  if test -d ${gssapi}; then
-     gssapi_dir="${gssapi}/lib"
-     GSSAPIBASE_LIBS="-L$gssapi_dir"
-     GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
-  else
-     # FIXME: This is only used for building cyrus, and then only as
-     # a real hack.  it needs to be fixed.
-     gssapi_dir="/usr/local/lib"
-  fi
-
-  # Check a full link against the Heimdal libraries.
-  # If this fails, check a full link against the MIT libraries.
-  # If this fails, check a full link against the CyberSafe libraries.
-  # If this fails, check a full link against the Solaris 8 and up libgss.
-
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
-    gss_failed=0
-    { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
-$as_echo_n "checking for gss_unwrap in -lgssapi... " >&6; }
-if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_unwrap ();
-int
-main ()
-{
-return gss_unwrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gssapi_gss_unwrap=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gssapi_gss_unwrap=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
-$as_echo "$ac_cv_lib_gssapi_gss_unwrap" >&6; }
-if test "x$ac_cv_lib_gssapi_gss_unwrap" = x""yes; then
-  gss_impl="heimdal"
-else
-  gss_failed=1
-fi
-
-    if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
-      gss_impl="failed"
-    fi
-  fi
-
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
-    # check for libkrb5support first
-    { $as_echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
-$as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; }
-if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb5int_getspecific ();
-int
-main ()
-{
-return krb5int_getspecific ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb5support_krb5int_getspecific=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb5support_krb5int_getspecific=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
-$as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
-if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = x""yes; then
-  K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
-fi
-
-
-    gss_failed=0
-    { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
-$as_echo_n "checking for gss_unwrap in -lgssapi_krb5... " >&6; }
-if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_unwrap ();
-int
-main ()
-{
-return gss_unwrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gssapi_krb5_gss_unwrap=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gssapi_krb5_gss_unwrap=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
-$as_echo "$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
-if test "x$ac_cv_lib_gssapi_krb5_gss_unwrap" = x""yes; then
-  gss_impl="mit"
-else
-  gss_failed=1
-fi
-
-    if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
-      gss_impl="failed"
-    fi
-  fi
-
-  # For Cybersafe one has to set a platform define in order to make compilation work
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
-
-    cmu_saved_CPPFLAGS=$CPPFLAGS
-    cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
-# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
-    if test -d "${gssapi}/appsec-rt/lib"; then
-      GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
-    fi
-    CPPFLAGS="$CPPFLAGS -D$platform"
-    if test -d "${gssapi}/appsec-sdk/include"; then
-      CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
-    fi
-
-    gss_failed=0
-
-# Check for CyberSafe with two libraries first, than fall back to a single
-# library (older CyberSafe)
-
-    unset ac_cv_lib_gss_csf_gss_acq_user
-    { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
-$as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
-if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char csf_gss_acq_user ();
-int
-main ()
-{
-return csf_gss_acq_user ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gss_csf_gss_acq_user=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gss_csf_gss_acq_user=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
-$as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
-if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
-  gss_impl="cybersafe03"
-else
-  unset ac_cv_lib_gss_csf_gss_acq_user;
-                  { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
-$as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
-if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char csf_gss_acq_user ();
-int
-main ()
-{
-return csf_gss_acq_user ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gss_csf_gss_acq_user=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gss_csf_gss_acq_user=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
-$as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
-if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
-  gss_impl="cybersafe"
-else
-  gss_failed=1
-fi
-
-fi
-
-
-    if test "$gss_failed" = "1"; then
-# Restore variables
-      GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
-      CPPFLAGS=$cmu_saved_CPPFLAGS
-
-      if test "$gss_impl" != "auto"; then
-        gss_impl="failed"
-      fi
-    fi
-  fi
-
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
-    gss_failed=0
-    { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
-$as_echo_n "checking for gss_unwrap in -lgss... " >&6; }
-if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss -lgss $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_unwrap ();
-int
-main ()
-{
-return gss_unwrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gss_gss_unwrap=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gss_gss_unwrap=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
-$as_echo "$ac_cv_lib_gss_gss_unwrap" >&6; }
-if test "x$ac_cv_lib_gss_gss_unwrap" = x""yes; then
-  gss_impl="seam"
-else
-  gss_failed=1
-fi
-
-    if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
-      gss_impl="failed"
-    fi
-  fi
-
-  if test "$gss_impl" = "mit"; then
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
-    GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
-  elif test "$gss_impl" = "heimdal"; then
-    CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
-    GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
-  elif test "$gss_impl" = "cybersafe03"; then
-# Version of CyberSafe with two libraries
-    CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
-    # there is no static libgss for CyberSafe
-    GSSAPIBASE_STATIC_LIBS=none
-  elif test "$gss_impl" = "cybersafe"; then
-    CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
-    # there is no static libgss for CyberSafe
-    GSSAPIBASE_STATIC_LIBS=none
-  elif test "$gss_impl" = "seam"; then
-    GSSAPIBASE_LIBS=-lgss
-    # there is no static libgss on Solaris 8 and up
-    GSSAPIBASE_STATIC_LIBS=none
-  elif test "$gss_impl" = "failed"; then
-    gssapi="no"
-    GSSAPIBASE_LIBS=
-    GSSAPIBASE_STATIC_LIBS=
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
-$as_echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
-  else
-    gssapi="no"
-    GSSAPIBASE_LIBS=
-    GSSAPIBASE_STATIC_LIBS=
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
-$as_echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
-  fi
-fi
-
-#
-# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
-# in gssapi\rfckrb5.h
-#
-if test "$gssapi" != "no"; then
-  if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-                  #ifdef GSS_C_NT_HOSTBASED_SERVICE
-                    hostbased_service_gss_nt_yes
-                  #endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
-$as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
-fi
-rm -f conftest*
-
-
-  elif test "$ac_cv_header_gssapi_h" = "yes"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-  elif test "$ac_cv_header_gssapi_gssapi_h"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-  fi
-
-  if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-                  #ifdef GSS_C_NT_USER_NAME
-                   user_name_yes_gss_nt
-                  #endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_USER_NAME /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
-$as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
-fi
-rm -f conftest*
-
-  elif test "$ac_cv_header_gssapi_h" = "yes"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_USER_NAME /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
-  rfc5587=yes
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
-  rfc5801=yes
-fi
-rm -f conftest*
-
-  elif test "$ac_cv_header_gssapi_gssapi_h"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_USER_NAME /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
-  rfc5587=yes
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
-  rfc5801=yes
-fi
-rm -f conftest*
-
-  fi
-fi
-
-GSSAPI_LIBS=""
-{ $as_echo "$as_me:$LINENO: checking GSSAPI" >&5
-$as_echo_n "checking GSSAPI... " >&6; }
-if test "$gssapi" != no; then
-  { $as_echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
-$as_echo "with implementation ${gss_impl}" >&6; }
-  { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
-  GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
-fi
-
-  SASL_MECHS="$SASL_MECHS libgssapiv2.la"
-  SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
-  SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c"
-  if test "$rfc5587" = "yes" -a "$rfc5801" = "yes"; then
-    SASL_MECHS="$SASL_MECHS libgs2.la"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gs2.c"
-  fi
-
-  cmu_save_LIBS="$LIBS"
-  LIBS="$LIBS $GSSAPIBASE_LIBS"
-
-for ac_func in gsskrb5_register_acceptor_identity
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in gss_decapsulate_token
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in gss_encapsulate_token
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in gss_oid_equal
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-  LIBS="$cmu_save_LIBS"
-
-  cmu_save_LIBS="$LIBS"
-  LIBS="$LIBS $GSSAPIBASE_LIBS"
-
-for ac_func in gss_get_name_attribute
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-  LIBS="$cmu_save_LIBS"
-
-  cmu_save_LIBS="$LIBS"
-  LIBS="$LIBS $GSSAPIBASE_LIBS"
-  { $as_echo "$as_me:$LINENO: checking for SPNEGO support in GSSAPI libraries" >&5
-$as_echo_n "checking for SPNEGO support in GSSAPI libraries... " >&6; }
-  if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#else
-#include <gssapi/gssapi.h>
-#endif
-
-int main(void)
-{
-    gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
-    gss_OID_set mech_set;
-    OM_uint32 min_stat;
-    int have_spnego = 0;
-
-    if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
-	gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
-	gss_release_oid_set(&min_stat, &mech_set);
-    }
-
-    return (!have_spnego);  // 0 = success, 1 = failure
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_SPNEGO /**/
-_ACEOF
-
-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-  LIBS="$cmu_save_LIBS"
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-
-
-if test "$gssapi" != "no"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_GSSAPIV2 /**/
-_ACEOF
-
-  mutex_default="no"
-  if test "$gss_impl" = "mit"; then
-     mutex_default="yes"
-  fi
-  { $as_echo "$as_me:$LINENO: checking to use mutexes aroung GSS calls" >&5
-$as_echo_n "checking to use mutexes aroung GSS calls... " >&6; }
-  # Check whether --enable-gss_mutexes was given.
-if test "${enable_gss_mutexes+set}" = set; then
-  enableval=$enable_gss_mutexes; use_gss_mutexes=$enableval
-else
-  use_gss_mutexes=$mutex_default
-fi
-
-  if test $use_gss_mutexes = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define GSS_USE_MUTEXES /**/
-_ACEOF
-
-  fi
-  { $as_echo "$as_me:$LINENO: result: $use_gss_mutexes" >&5
-$as_echo "$use_gss_mutexes" >&6; }
-fi
-
-
-
-
- # Check whether --enable-plain was given.
-if test "${enable_plain+set}" = set; then
-  enableval=$enable_plain; plain=$enableval
-else
-  plain=yes
-fi
-
-
- PLAIN_LIBS=""
- if test "$plain" != no; then
-    if test "$cmu_have_crypt" = yes; then
-    PLAIN_LIBS=$LIB_CRYPT
-  fi
- fi
-
-
- { $as_echo "$as_me:$LINENO: checking PLAIN" >&5
-$as_echo_n "checking PLAIN... " >&6; }
- if test "$plain" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SASL_MECHS="$SASL_MECHS libplain.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS plain.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/plain.c"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_PLAIN /**/
-_ACEOF
-
-  fi
- else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
- fi
-
-
-# Check whether --enable-anon was given.
-if test "${enable_anon+set}" = set; then
-  enableval=$enable_anon; anon=$enableval
-else
-  anon=yes
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking ANONYMOUS" >&5
-$as_echo_n "checking ANONYMOUS... " >&6; }
-if test "$anon" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SASL_MECHS="$SASL_MECHS libanonymous.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS anonymous.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/anonymous.c"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_ANONYMOUS /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-login was given.
-if test "${enable_login+set}" = set; then
-  enableval=$enable_login; login=$enableval
-else
-  login=no
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking LOGIN" >&5
-$as_echo_n "checking LOGIN... " >&6; }
-if test "$login" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SASL_MECHS="$SASL_MECHS liblogin.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/login.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS login.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_LOGIN /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-ntlm was given.
-if test "${enable_ntlm+set}" = set; then
-  enableval=$enable_ntlm; ntlm=$enableval
-else
-  ntlm=no
-fi
-
-
-if test "$with_openssl" = no; then
-  { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- NTLM will be disabled" >&5
-$as_echo "$as_me: WARNING: OpenSSL not found -- NTLM will be disabled" >&2;}
-  ntlm=no
-fi
-
-{ $as_echo "$as_me:$LINENO: checking NTLM" >&5
-$as_echo_n "checking NTLM... " >&6; }
-if test "$ntlm" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  NTLM_LIBS="-lcrypto $LIB_RSAREF"
-
-
-  SASL_MECHS="$SASL_MECHS libntlm.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ntlm.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS ntlm.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_NTLM /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-# Check whether --enable-passdss was given.
-if test "${enable_passdss+set}" = set; then
-  enableval=$enable_passdss; passdss=$enableval
-else
-  passdss=no
-fi
-
-
-if test "$with_openssl" = no; then
-  { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- PASSDSS will be disabled" >&5
-$as_echo "$as_me: WARNING: OpenSSL not found -- PASSDSS will be disabled" >&2;}
-  passdss=no
-fi
-
-{ $as_echo "$as_me:$LINENO: checking PASSDSS" >&5
-$as_echo_n "checking PASSDSS... " >&6; }
-if test "$passdss" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  PASSDSS_LIBS="-lcrypto $LIB_RSAREF"
-
-
-  SASL_MECHS="$SASL_MECHS libpassdss.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS passdss.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/passdss.c"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_PASSDSS /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-# make the option show up so people don't whine that it is only in the
-# saslauthd configure script --help
-
-# Check whether --with-ldap was given.
-if test "${with_ldap+set}" = set; then
-  withval=$with_ldap;
-else
-  with_ldap=no
-fi
-
-
-
-
-# Check whether --enable-sql was given.
-if test "${enable_sql+set}" = set; then
-  enableval=$enable_sql; sql=$enableval
-else
-  sql=no
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking SQL" >&5
-$as_echo_n "checking SQL... " >&6; }
-if test "$sql" != no; then
-  { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-  SASL_MECHS="$SASL_MECHS libsql.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sql.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS sql.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_SQL /**/
-_ACEOF
-
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-# Check whether --with-mysql was given.
-if test "${with_mysql+set}" = set; then
-  withval=$with_mysql; with_mysql=$withval
-else
-  with_mysql=$sql
-fi
-
-
-# find location of library
-# presuming if one given then correct
-if test "${with_mysql}" = "yes"; then
-  with_mysql=notfound
-  for mysqlloc in lib/mysql lib mysql/lib
-  do
-    if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then
-      with_mysql="${prefix}"
-      break
-    elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then
-      with_mysql="/usr/local"
-      break
-    elif test -f /usr/${mysqlloc}/libmysqlclient.a; then
-      with_mysql="/usr"
-      break
-    fi
-  done
-fi
-
-LIB_MYSQL=""
-
-case "$with_mysql" in
-    no) true;;
-    notfound) { $as_echo "$as_me:$LINENO: WARNING: MySQL Library not found" >&5
-$as_echo "$as_me: WARNING: MySQL Library not found" >&2;}; true;;
-    *)
-     if test -d ${with_mysql}/lib/mysql; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_MYSQL="-L${with_mysql}/lib/mysql ${LIB_MYSQL}"
-  else
-	LIB_MYSQL="-L${with_mysql}/lib/mysql ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}/lib/mysql"
-  fi
-
-     elif test -d ${with_mysql}/mysql/lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_MYSQL="-L${with_mysql}/mysql/lib ${LIB_MYSQL}"
-  else
-	LIB_MYSQL="-L${with_mysql}/mysql/lib ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}/mysql/lib"
-  fi
-
-     elif test -d ${with_mysql}/lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_MYSQL="-L${with_mysql}/lib ${LIB_MYSQL}"
-  else
-	LIB_MYSQL="-L${with_mysql}/lib ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}/lib"
-  fi
-
-     else
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_MYSQL="-L${with_mysql} ${LIB_MYSQL}"
-  else
-	LIB_MYSQL="-L${with_mysql} ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}"
-  fi
-
-     fi
-
-     LIB_MYSQL_DIR=$LIB_MYSQL
-     LIB_MYSQL="$LIB_MYSQL -lmysqlclient"
-
-     if test -d ${with_mysql}/include/mysql; then
-         CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include/mysql"
-     elif test -d ${with_mysql}/mysql/include; then
-         CPPFLAGS="${CPPFLAGS} -I${with_mysql}/mysql/include"
-     elif test -d ${with_mysql}/include; then
-         CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include"
-     else
-         CPPFLAGS="${CPPFLAGS} -I${with_mysql}"
-     fi
-
-       save_LDFLAGS=$LDFLAGS
-       LDFLAGS="$LDFLAGS $LIB_MYSQL_DIR"
-       { $as_echo "$as_me:$LINENO: checking for mysql_select_db in -lmysqlclient" >&5
-$as_echo_n "checking for mysql_select_db in -lmysqlclient... " >&6; }
-if test "${ac_cv_lib_mysqlclient_mysql_select_db+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_select_db ();
-int
-main ()
-{
-return mysql_select_db ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_mysqlclient_mysql_select_db=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_mysqlclient_mysql_select_db=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_select_db" >&5
-$as_echo "$ac_cv_lib_mysqlclient_mysql_select_db" >&6; }
-if test "x$ac_cv_lib_mysqlclient_mysql_select_db" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MYSQL /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: MySQL library mysqlclient does not work" >&5
-$as_echo "$as_me: WARNING: MySQL library mysqlclient does not work" >&2;}
-	    with_mysql=no
-fi
-
-       LDFLAGS=$save_LDFLAGS;;
-
-esac
-
-
-
-# Check whether --with-pgsql was given.
-if test "${with_pgsql+set}" = set; then
-  withval=$with_pgsql; with_pgsql=$withval
-else
-  with_pgsql=$sql
-fi
-
-
-# find location of library
-# presuing if one given then correct
-if test "${with_pgsql}" = "yes"; then
-  with_pgsql=notfound
-  for pgsqlloc in lib/pgsql lib pgsql/lib
-  do
-    if test -f ${prefix}/${pgsqlloc}/libpq.a; then
-      with_pgsql="${prefix}"
-      break
-    elif test -f /usr/local/${pgsqlloc}/libpq.a; then
-      with_pgsql="/usr/local"
-      break
-    elif test -f /usr/${pgsqlloc}/libpq.a; then
-      with_pgsql="/usr"
-      break
-    fi
-  done
-fi
-
-LIB_PGSQL=""
-
-case "$with_pgsql" in
-    no) true;;
-    notfound) { $as_echo "$as_me:$LINENO: WARNING: PostgreSQL Library not found" >&5
-$as_echo "$as_me: WARNING: PostgreSQL Library not found" >&2;}; true;;
-    *)
-     if test -d ${with_pgsql}/lib/pgsql; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_PGSQL="-L${with_pgsql}/lib/pgsql ${LIB_PGSQL}"
-  else
-	LIB_PGSQL="-L${with_pgsql}/lib/pgsql ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}/lib/pgsql"
-  fi
-
-     elif test -d ${with_pgsql}/pgsql/lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_PGSQL="-L${with_pgsql}/pgsql/lib ${LIB_PGSQL}"
-  else
-	LIB_PGSQL="-L${with_pgsql}/pgsql/lib ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}/pgsql/lib"
-  fi
-
-     elif test -d ${with_pgsql}/lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_PGSQL="-L${with_pgsql}/lib ${LIB_PGSQL}"
-  else
-	LIB_PGSQL="-L${with_pgsql}/lib ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}/lib"
-  fi
-
-     else
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LIB_PGSQL="-L${with_pgsql} ${LIB_PGSQL}"
-  else
-	LIB_PGSQL="-L${with_pgsql} ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}"
-  fi
-
-     fi
-
-     LIB_PGSQL_DIR=$LIB_PGSQL
-     LIB_PGSQL="$LIB_PGSQL -lpq"
-
-     if test -d ${with_pgsql}/include/pgsql; then
-         CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql"
-     elif test -d ${with_pgsql}/pgsql/include; then
-         CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
-     elif test -d ${with_pgsql}/include; then
-         CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include"
-     else
-         CPPFLAGS="${CPPFLAGS} -I${with_pgsql}"
-     fi
-
-
-       save_LDFLAGS=$LDFLAGS
-       LDFLAGS="$LDFLAGS $LIB_PGSQL_DIR"
-       { $as_echo "$as_me:$LINENO: checking for PQsetdbLogin in -lpq" >&5
-$as_echo_n "checking for PQsetdbLogin in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQsetdbLogin+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpq  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char PQsetdbLogin ();
-int
-main ()
-{
-return PQsetdbLogin ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_pq_PQsetdbLogin=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_pq_PQsetdbLogin=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsetdbLogin" >&5
-$as_echo "$ac_cv_lib_pq_PQsetdbLogin" >&6; }
-if test "x$ac_cv_lib_pq_PQsetdbLogin" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGSQL /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: PostgreSQL Library pq does not work" >&5
-$as_echo "$as_me: WARNING: PostgreSQL Library pq does not work" >&2;}
-	    with_pgsql=no
-fi
-
-       LDFLAGS=$save_LDFLAGS;;
-
-esac
-
-
-
-# Check whether --with-sqlite was given.
-if test "${with_sqlite+set}" = set; then
-  withval=$with_sqlite; with_sqlite=$withval
-else
-  with_sqlite=$sql
-fi
-
-
-# find location of library
-# presuing if one given then correct
-if test "${with_sqlite}" = "yes"; then
-  with_sqlite=notfound
-  for sqliteloc in lib
-  do
-    if test -f ${prefix}/${sqliteloc}/libsqlite.a; then
-      with_sqlite="${prefix}"
-      break
-    elif test -f /usr/local/${sqliteloc}/libsqlite.a; then
-      with_sqlite="/usr/local"
-      break
-    elif test -f /usr/${sqliteloc}/libsqlite.a; then
-      with_sqlite="/usr"
-      break
-    fi
-  done
-fi
-
-LIB_SQLITE=""
-
-case "$with_sqlite" in
-    no) true;;
-    notfound) { $as_echo "$as_me:$LINENO: WARNING: SQLite Library not found" >&5
-$as_echo "$as_me: WARNING: SQLite Library not found" >&2;}; true;;
-    *)
-     if test -d ${with_sqlite}/lib; then
-         LIB_SQLITE="-L${with_sqlite}/lib -R${with_sqlite}/lib"
-     else
-         LIB_SQLITE="-L${with_sqlite} -R${with_sqlite}"
-     fi
-
-     LIB_SQLITE_DIR=$LIB_SQLITE
-     LIB_SQLITE="$LIB_SQLITE -lsqlite"
-
-     if test -d ${with_sqlite}/include; then
-         CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include"
-     else
-         CPPFLAGS="${CPPFLAGS} -I${with_sqlite}"
-     fi
-       { $as_echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5
-$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
-if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsqlite $LIB_SQLITE_DIR $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sqlite_open ();
-int
-main ()
-{
-return sqlite_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_sqlite_sqlite_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_sqlite_sqlite_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_open" >&5
-$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
-if test "x$ac_cv_lib_sqlite_sqlite_open" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SQLITE /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: SQLite Library sqlite does not work" >&5
-$as_echo "$as_me: WARNING: SQLite Library sqlite does not work" >&2;}
-	    with_sqlite=no
-fi
-;;
-
-esac
-
-
-
-# Check whether --with-sqlite3 was given.
-if test "${with_sqlite3+set}" = set; then
-  withval=$with_sqlite3; with_sqlite3=$withval
-else
-  with_sqlite3=$sql
-fi
-
-
-# find location of library
-# we assume that if one given then it is correct
-if test "${with_sqlite3}" = "yes"; then
-  with_sqlite3=notfound
-  for sqlite3loc in lib
-  do
-    if test -f ${prefix}/${sqlite3loc}/libsqlite3.a; then
-      with_sqlite3="${prefix}"
-      break
-    elif test -f /usr/local/${sqlite3loc}/libsqlite3.a; then
-      with_sqlite3="/usr/local"
-      break
-    elif test -f /usr/${sqlite3loc}/libsqlite3.a; then
-      with_sqlite3="/usr"
-      break
-    fi
-  done
-fi
-
-LIB_SQLITE3=""
-
-case "$with_sqlite3" in
-    no) true;;
-    notfound) { $as_echo "$as_me:$LINENO: WARNING: SQLite3 Library not found" >&5
-$as_echo "$as_me: WARNING: SQLite3 Library not found" >&2;}; true;;
-    *)
-     if test -d ${with_sqlite3}/lib; then
-         LIB_SQLITE3="-L${with_sqlite3}/lib -R${with_sqlite3}/lib"
-     else
-         LIB_SQLITE3="-L${with_sqlite3} -R${with_sqlite3}"
-     fi
-
-     LIB_SQLITE3_DIR=$LIB_SQLITE3
-     LIB_SQLITE3="$LIB_SQLITE3 -lsqlite3"
-
-     if test -d ${with_sqlite3}/include; then
-         CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}/include"
-     else
-         CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}"
-     fi
-       { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
-$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
-if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsqlite3 $LIB_SQLITE3_DIR $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sqlite3_open ();
-int
-main ()
-{
-return sqlite3_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_sqlite3_sqlite3_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_sqlite3_sqlite3_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
-$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
-if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SQLITE3 /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: SQLite3 Library sqlite3 does not work" >&5
-$as_echo "$as_me: WARNING: SQLite3 Library sqlite3 does not work" >&2;}
-	    with_sqlite3=no
-fi
-;;
-
-esac
-
-
-if test "$sql" = yes -a "$with_pgsql" = no -a "$with_mysql" = no -a "$with_sqlite" = no -a "$with_sqlite3" = no; then
-    { { $as_echo "$as_me:$LINENO: error: --enable-sql chosen but neither Postgres nor MySQL nor SQLite nor SQLite3 found" >&5
-$as_echo "$as_me: error: --enable-sql chosen but neither Postgres nor MySQL nor SQLite nor SQLite3 found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-if test "$enable_shared" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define DO_DLOPEN /**/
-_ACEOF
-
-fi
-
-# Check whether --enable-ldapdb was given.
-if test "${enable_ldapdb+set}" = set; then
-  enableval=$enable_ldapdb; ldapdb=$enableval
-else
-  ldapdb=no
-fi
-
-{ $as_echo "$as_me:$LINENO: checking LDAPDB" >&5
-$as_echo_n "checking LDAPDB... " >&6; }
-if test "$ldapdb" != no; then
-    { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-
-    if test "$with_ldap" = no; then
-        { { $as_echo "$as_me:$LINENO: error: Cannot enable LDAPDB plugin: You need to specify --with-ldap" >&5
-$as_echo "$as_me: error: Cannot enable LDAPDB plugin: You need to specify --with-ldap" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
-    save_CPPFLAGS=$CPPFLAGS
-    save_LDFLAGS=$LDFLAGS
-
-    if test -d $with_ldap; then
-        CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include"
-
-  # this is CMU ADD LIBPATH
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L${with_ldap}/lib ${LDFLAGS}"
-  else
-	LDFLAGS="-L${with_ldap}/lib $andrew_cv_runpath_switch${with_ldap}/lib ${LDFLAGS}"
-  fi
-
-    fi
-
-
-
-for ac_header in ldap.h lber.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-    if test $ac_cv_header_ldap_h = yes -a $ac_cv_header_lber_h = yes; then
-        { $as_echo "$as_me:$LINENO: checking OpenLDAP api" >&5
-$as_echo_n "checking OpenLDAP api... " >&6; }
-if test "${cmu_cv_openldap_api+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <ldap.h>
-
-#ifdef LDAP_API_FEATURE_X_OPENLDAP
-char *__openldap_api = LDAP_API_FEATURE_X_OPENLDAP;
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__openldap_api" >/dev/null 2>&1; then
-  cmu_cv_openldap_api=yes
-else
-  cmu_cv_openldap_api=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $cmu_cv_openldap_api" >&5
-$as_echo "$cmu_cv_openldap_api" >&6; }
-
-
-        if test "$cmu_cv_openldap_api" = yes; then
-            { $as_echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
-$as_echo_n "checking for ldap_initialize in -lldap... " >&6; }
-if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap -llber $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ldap_initialize ();
-int
-main ()
-{
-return ldap_initialize ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ldap_ldap_initialize=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ldap_ldap_initialize=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_initialize" = x""yes; then
-   cmu_link_openldap="-lldap -llber"
-else
-   cmu_link_openldap=no
-fi
-
-        fi
-    fi
-
-    if test "$cmu_cv_openldap_api" = no -o "$cmu_link_openldap" = no; then
-        { { $as_echo "$as_me:$LINENO: error: Cannot enable LDAPDB plugin: Could not locate OpenLDAP" >&5
-$as_echo "$as_me: error: Cannot enable LDAPDB plugin: Could not locate OpenLDAP" >&2;}
-   { (exit 1); exit 1; }; }
-    else
-        { $as_echo "$as_me:$LINENO: checking OpenLDAP version" >&5
-$as_echo_n "checking OpenLDAP version... " >&6; }
-if test "${cmu_cv_openldap_compat+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <ldap.h>
-
-/* Require 2.1.27+ and 2.2.6+ */
-#if LDAP_VENDOR_VERSION_MAJOR == 2  && LDAP_VENDOR_VERSION_MINOR == 1 && LDAP_VENDOR_VERSION_PATCH > 26
-char *__openldap_compat = "2.1.27 or better okay";
-#elif LDAP_VENDOR_VERSION_MAJOR == 2  && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5
-char *__openldap_compat = "2.2.6 or better okay";
-#elif LDAP_VENDOR_VERSION_MAJOR == 2  && LDAP_VENDOR_VERSION_MINOR > 2
-char *__openldap_compat = "2.3 or better okay"
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__openldap_compat" >/dev/null 2>&1; then
-  cmu_cv_openldap_compat=yes
-else
-  cmu_cv_openldap_compat=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $cmu_cv_openldap_compat" >&5
-$as_echo "$cmu_cv_openldap_compat" >&6; }
-
-
-        if test "$cmu_cv_openldap_compat" = no; then
-            { { $as_echo "$as_me:$LINENO: error: Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible" >&5
-$as_echo "$as_me: error: Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible" >&2;}
-   { (exit 1); exit 1; }; }
-        else
-            LIB_LDAP=$cmu_link_openldap
-
-
-            SASL_MECHS="$SASL_MECHS libldapdb.la"
-            if test "$enable_static" = yes; then
-                SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ldapdb.c"
-                SASL_STATIC_OBJS="$SASL_STATIC_OBJS ldapdb.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_LDAPDB /**/
-_ACEOF
-
-            fi
-        fi
-    fi
-
-    if test "$cmu_cv_openldap_compat" != yes; then
-        CPPFLAGS=$save_CPPFLAGS
-        LDFLAGS=$save_LDFLAGS
-    fi
-else
-    { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-
-
-
-
-
-# Check whether --with-plugindir was given.
-if test "${with_plugindir+set}" = set; then
-  withval=$with_plugindir; plugindir=$withval
-else
-  plugindir=/usr/lib/sasl2
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define PLUGINDIR "$plugindir"
-_ACEOF
-
-
-
-
-# Check whether --with-configdir was given.
-if test "${with_configdir+set}" = set; then
-  withval=$with_configdir; configdir=$withval
-else
-  configdir=$plugindir:/etc/sasl2
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define CONFIGDIR "$configdir"
-_ACEOF
-
-
-
-
-# Check whether --with-rc4 was given.
-if test "${with_rc4+set}" = set; then
-  withval=$with_rc4; with_rc4=$withval
-else
-  with_rc4=yes
-fi
-
-
-if test "$with_rc4" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_RC4 /**/
-_ACEOF
-
-fi
-
-building_for_macosx=no
-case "$host_os" in
-        darwin*)
-# Check whether --enable-macos-framework was given.
-if test "${enable_macos_framework+set}" = set; then
-  enableval=$enable_macos_framework; building_for_macosx=no
-else
-  building_for_macosx=yes
-fi
-
-        ;;
-esac
- if test "$building_for_macosx" = yes; then
-  MACOSX_TRUE=
-  MACOSX_FALSE='#'
-else
-  MACOSX_TRUE='#'
-  MACOSX_FALSE=
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking for dmalloc library" >&5
-$as_echo_n "checking for dmalloc library... " >&6; }
-
-# Check whether --with-dmalloc was given.
-if test "${with_dmalloc+set}" = set; then
-  withval=$with_dmalloc; with_dmalloc=$withval
-else
-  with_dmalloc=no
-fi
-
-
-DMALLOC_LIBS=""
-
-if test "$with_dmalloc" != "no"; then
-   if test "$with_dmalloc" = "yes"; then
-	with_dmalloc="/usr/local"
-   fi
-
-   if test -r "$with_dmalloc/libdmalloc.a"; then
-	DMALLOC_LIBS="$with_dmalloc/libdmalloc.a"
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_DMALLOC /**/
-_ACEOF
-
-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-   elif test -r "$with_dmalloc/lib/libdmalloc.a"; then
-	DMALLOC_LIBS="$with_dmalloc/lib/libdmalloc.a"
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_DMALLOC /**/
-_ACEOF
-
-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-   else
-	{ { $as_echo "$as_me:$LINENO: error: cannot find dmalloc library" >&5
-$as_echo "$as_me: error: cannot find dmalloc library" >&2;}
-   { (exit please check your installation.); exit please check your installation.; }; }
-   fi
-else
-   { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for sfio library" >&5
-$as_echo_n "checking for sfio library... " >&6; }
-
-# Check whether --with-sfio was given.
-if test "${with_sfio+set}" = set; then
-  withval=$with_sfio; with_sfio=$withval
-else
-  with_sfio=no
-fi
-
-
-if test "$with_sfio" != "no"; then
-   if test "$with_sfio" = "yes"; then
-	with_sfio="/usr/local"
-   fi
-
-
-
-
-
-   if test -r "$with_sfio/sfio.h"; then SFIO_DIR=$with_sfio;
-					      SFIO_INC_DIR=$with_sfio
-   elif test -r "$with_sfio/include/sfio.h"; then SFIO_DIR=$with_sfio;
-					      SFIO_INC_DIR=$with_sfio/include
-   elif test -r "$with_sfio/include/sfio/sfio.h"; then SFIO_DIR=$with_sfio;
-					      SFIO_INC_DIR=$with_sfio/include/sfio
-   fi
-
-   if test -z "$SFIO_DIR"; then
-	{ { $as_echo "$as_me:$LINENO: error: Cannot find sfio.h" >&5
-$as_echo "$as_me: error: Cannot find sfio.h" >&2;}
-   { (exit Please check your SFIO installation.); exit Please check your SFIO installation.; }; }
-   fi
-
-
-		str="$SFIO_DIR/lib/libsfio.*"
-		for i in `echo $str`; do
-			if test -r $i; then
-				SFIO_LIBDIR=$SFIO_DIR/lib
-				break 2
-			fi
-		done
-
-
-		str="$SFIO_DIR/lib/sfio/libsfio.*"
-		for i in `echo $str`; do
-			if test -r $i; then
-				SFIO_LIBDIR=$SFIO_DIR/lib/sfio
-				break 2
-			fi
-		done
-
-
-   if test -z "$SFIO_LIBDIR"; then
-	{ { $as_echo "$as_me:$LINENO: error: Cannot find sfio library" >&5
-$as_echo "$as_me: error: Cannot find sfio library" >&2;}
-   { (exit Please check your SFIO installation.); exit Please check your SFIO installation.; }; }
-   fi
-
-   SFIO_INC_FLAGS="-I$SFIO_INC_DIR"
-   SFIO_LIB_FLAGS="-L$SFIO_LIBDIR -lsfio"
-   SMTPTEST_PROGRAM="smtptest"
-   SASL_UTIL_LIBS_EXTRA=libsfsasl2.la
-   SASL_UTIL_HEADERS_EXTRA=sfsasl.h
-
-   { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-   { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-   SFIO_INC_FLAGS=""
-   SFIO_LIB_FLAGS=""
-   SMTPTEST_PROGRAM=""
-   SASL_UTIL_LIBS_EXTRA=""
-   SASL_UTIL_HEADERS_EXTRA=""
-fi
-
-
-
-
-
-
-
-sasl_cv_getsubopt=no
-{ $as_echo "$as_me:$LINENO: checking for getsubopt" >&5
-$as_echo_n "checking for getsubopt... " >&6; }
-if test "${ac_cv_func_getsubopt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getsubopt to an innocuous variant, in case <limits.h> declares getsubopt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getsubopt innocuous_getsubopt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getsubopt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getsubopt
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getsubopt ();
-/* 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_getsubopt || defined __stub___getsubopt
-choke me
-#endif
-
-int
-main ()
-{
-return getsubopt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_getsubopt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_getsubopt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getsubopt" >&5
-$as_echo "$ac_cv_func_getsubopt" >&6; }
-if test "x$ac_cv_func_getsubopt" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETSUBOPT /**/
-_ACEOF
-
-else
-  sasl_cv_getsubopt=yes
-fi
-
-if test $sasl_cv_getsubopt = yes; then
-	case " $LIBOBJS " in
-  *" getsubopt.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS getsubopt.$ac_objext"
- ;;
-esac
-
-	GETSUBOPT="getsubopt.lo"
-fi
-
-
-sasl_cv_snprintf=no
-SNPRINTFOBJS=""
-{ $as_echo "$as_me:$LINENO: checking for snprintf" >&5
-$as_echo_n "checking for snprintf... " >&6; }
-if test "${ac_cv_func_snprintf+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define snprintf to an innocuous variant, in case <limits.h> declares snprintf.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define snprintf innocuous_snprintf
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char snprintf (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef snprintf
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char snprintf ();
-/* 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_snprintf || defined __stub___snprintf
-choke me
-#endif
-
-int
-main ()
-{
-return snprintf ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_snprintf=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_snprintf=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_snprintf" >&5
-$as_echo "$ac_cv_func_snprintf" >&6; }
-if test "x$ac_cv_func_snprintf" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SNPRINTF /**/
-_ACEOF
-
-else
-  sasl_cv_snprintf=yes
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for vsnprintf" >&5
-$as_echo_n "checking for vsnprintf... " >&6; }
-if test "${ac_cv_func_vsnprintf+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define vsnprintf innocuous_vsnprintf
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char vsnprintf (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef vsnprintf
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char vsnprintf ();
-/* 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_vsnprintf || defined __stub___vsnprintf
-choke me
-#endif
-
-int
-main ()
-{
-return vsnprintf ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_vsnprintf=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_vsnprintf=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5
-$as_echo "$ac_cv_func_vsnprintf" >&6; }
-if test "x$ac_cv_func_vsnprintf" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_VSNPRINTF /**/
-_ACEOF
-
-else
-  sasl_cv_snprintf=yes
-fi
-
-if test $sasl_cv_snprintf = yes; then
-	case " $LIBOBJS " in
-  *" snprintf.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
- ;;
-esac
-
-        SNPRINTFOBJS="snprintf.o"
-        LTSNPRINTFOBJS="snprintf.lo"
-fi
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
-$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_aton ();
-int
-main ()
-{
-return inet_aton ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_inet_aton=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_inet_aton=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
-$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
-if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
-
-fi
-
-
-GETADDRINFOOBJS=""
-sasl_cv_getaddrinfo=yes
-
-{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
-$as_echo_n "checking for getaddrinfo... " >&6; }
-if test "${ac_cv_func_getaddrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getaddrinfo innocuous_getaddrinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getaddrinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getaddrinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaddrinfo ();
-/* 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_getaddrinfo || defined __stub___getaddrinfo
-choke me
-#endif
-
-int
-main ()
-{
-return getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_getaddrinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_getaddrinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
-$as_echo "$ac_cv_func_getaddrinfo" >&6; }
-if test "x$ac_cv_func_getaddrinfo" = x""yes; then
-    ac_cv_lib_socket_getaddrinfo=no
-  ac_cv_lib_inet6_getaddrinfo=no
-
-else
-    { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
-$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaddrinfo ();
-int
-main ()
-{
-return getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_getaddrinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_getaddrinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
-$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
-if test "x$ac_cv_lib_socket_getaddrinfo" = x""yes; then
-      LIBS="$LIBS -lsocket"
-    ac_cv_lib_inet6_getaddrinfo=no
-
-else
-      { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
-$as_echo_n "checking whether your system has IPv6 directory... " >&6; }
-    if test "${ipv6_cv_dir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-        for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
-	if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
-	  break
-	fi
-      done
-fi
-    { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
-$as_echo "$ipv6_cv_dir" >&6; }
-    if test $ipv6_cv_dir = no; then
-      ac_cv_lib_inet6_getaddrinfo=no
-    else
-      if test x$ipv6_libinet6 = x; then
-	ipv6_libinet6=no
-	SAVELDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
-      fi
-      { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
-$as_echo_n "checking for getaddrinfo in -linet6... " >&6; }
-if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet6  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaddrinfo ();
-int
-main ()
-{
-return getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_inet6_getaddrinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_inet6_getaddrinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
-$as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; }
-if test "x$ac_cv_lib_inet6_getaddrinfo" = x""yes; then
-  	if test $ipv6_libinet6 = no; then
-	  ipv6_libinet6=yes
-	  LIBS="$LIBS -linet6"
-	fi
-fi
-      if test $ipv6_libinet6 = no; then
-	LDFLAGS="$SAVELDFLAGS"
-      fi
-    fi
-fi
-
-fi
-ipv6_cv_getaddrinfo=no
-if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
-     -o $ac_cv_lib_inet6_getaddrinfo = yes
-then
-  ipv6_cv_getaddrinfo=yes
-fi
-if test $ipv6_cv_getaddrinfo = no; then
-  if test getaddrinfo = getaddrinfo; then
-    for ipv6_cv_pfx in o n; do
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
-  as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
-$as_echo_n "checking for ${ipv6_cv_pfx}getaddrinfo... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef ${ipv6_cv_pfx}getaddrinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ${ipv6_cv_pfx}getaddrinfo ();
-/* 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_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
-choke me
-#endif
-
-int
-main ()
-{
-return ${ipv6_cv_pfx}getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-
-fi
-rm -f conftest*
-
-      if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-        ipv6_cv_getaddrinfo=yes
-        break
-      fi
-    done
-  fi
-fi
-if test $ipv6_cv_getaddrinfo = yes; then
-
-{ $as_echo "$as_me:$LINENO: checking for gai_strerror" >&5
-$as_echo_n "checking for gai_strerror... " >&6; }
-if test "${ac_cv_func_gai_strerror+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define gai_strerror innocuous_gai_strerror
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gai_strerror (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef gai_strerror
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gai_strerror ();
-/* 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_gai_strerror || defined __stub___gai_strerror
-choke me
-#endif
-
-int
-main ()
-{
-return gai_strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_gai_strerror=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_gai_strerror=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
-$as_echo "$ac_cv_func_gai_strerror" >&6; }
-if test "x$ac_cv_func_gai_strerror" = x""yes; then
-    ac_cv_lib_socket_gai_strerror=no
-  ac_cv_lib_inet6_gai_strerror=no
-
-else
-    { $as_echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
-$as_echo_n "checking for gai_strerror in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gai_strerror ();
-int
-main ()
-{
-return gai_strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_gai_strerror=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_gai_strerror=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
-$as_echo "$ac_cv_lib_socket_gai_strerror" >&6; }
-if test "x$ac_cv_lib_socket_gai_strerror" = x""yes; then
-      LIBS="$LIBS -lsocket"
-    ac_cv_lib_inet6_gai_strerror=no
-
-else
-      { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
-$as_echo_n "checking whether your system has IPv6 directory... " >&6; }
-    if test "${ipv6_cv_dir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-        for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
-	if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
-	  break
-	fi
-      done
-fi
-    { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
-$as_echo "$ipv6_cv_dir" >&6; }
-    if test $ipv6_cv_dir = no; then
-      ac_cv_lib_inet6_gai_strerror=no
-    else
-      if test x$ipv6_libinet6 = x; then
-	ipv6_libinet6=no
-	SAVELDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
-      fi
-      { $as_echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
-$as_echo_n "checking for gai_strerror in -linet6... " >&6; }
-if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet6  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gai_strerror ();
-int
-main ()
-{
-return gai_strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_inet6_gai_strerror=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_inet6_gai_strerror=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
-$as_echo "$ac_cv_lib_inet6_gai_strerror" >&6; }
-if test "x$ac_cv_lib_inet6_gai_strerror" = x""yes; then
-  	if test $ipv6_libinet6 = no; then
-	  ipv6_libinet6=yes
-	  LIBS="$LIBS -linet6"
-	fi
-fi
-      if test $ipv6_libinet6 = no; then
-	LDFLAGS="$SAVELDFLAGS"
-      fi
-    fi
-fi
-
-fi
-ipv6_cv_gai_strerror=no
-if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
-     -o $ac_cv_lib_inet6_gai_strerror = yes
-then
-  ipv6_cv_gai_strerror=yes
-fi
-if test $ipv6_cv_gai_strerror = no; then
-  if test gai_strerror = getaddrinfo; then
-    for ipv6_cv_pfx in o n; do
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
-  as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
-$as_echo_n "checking for ${ipv6_cv_pfx}gai_strerror... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef ${ipv6_cv_pfx}gai_strerror
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ${ipv6_cv_pfx}gai_strerror ();
-/* 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_${ipv6_cv_pfx}gai_strerror || defined __stub___${ipv6_cv_pfx}gai_strerror
-choke me
-#endif
-
-int
-main ()
-{
-return ${ipv6_cv_pfx}gai_strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-
-fi
-rm -f conftest*
-
-      if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-        ipv6_cv_gai_strerror=yes
-        break
-      fi
-    done
-  fi
-fi
-if test $ipv6_cv_gai_strerror = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-                sasl_cv_getaddrinfo=no
-else
-  :
-fi
-else
-  :
-fi
-if test $sasl_cv_getaddrinfo = yes; then
-    case " $LIBOBJS " in
-  *" getaddrinfo.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
- ;;
-esac
-
-    GETADDRINFOOBJS="getaddrinfo.o"
-    LTGETADDRINFOOBJS="getaddrinfo.lo"
-fi
-
-
-
-GETNAMEINFOOBJS=""
-sasl_cv_getnameinfo=no
-
-{ $as_echo "$as_me:$LINENO: checking for getnameinfo" >&5
-$as_echo_n "checking for getnameinfo... " >&6; }
-if test "${ac_cv_func_getnameinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getnameinfo innocuous_getnameinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getnameinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getnameinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-/* 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_getnameinfo || defined __stub___getnameinfo
-choke me
-#endif
-
-int
-main ()
-{
-return getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_getnameinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_getnameinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
-$as_echo "$ac_cv_func_getnameinfo" >&6; }
-if test "x$ac_cv_func_getnameinfo" = x""yes; then
-    ac_cv_lib_socket_getnameinfo=no
-  ac_cv_lib_inet6_getnameinfo=no
-
-else
-    { $as_echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
-$as_echo_n "checking for getnameinfo in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-int
-main ()
-{
-return getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_getnameinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_getnameinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
-$as_echo "$ac_cv_lib_socket_getnameinfo" >&6; }
-if test "x$ac_cv_lib_socket_getnameinfo" = x""yes; then
-      LIBS="$LIBS -lsocket"
-    ac_cv_lib_inet6_getnameinfo=no
-
-else
-      { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
-$as_echo_n "checking whether your system has IPv6 directory... " >&6; }
-    if test "${ipv6_cv_dir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-        for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
-	if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
-	  break
-	fi
-      done
-fi
-    { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
-$as_echo "$ipv6_cv_dir" >&6; }
-    if test $ipv6_cv_dir = no; then
-      ac_cv_lib_inet6_getnameinfo=no
-    else
-      if test x$ipv6_libinet6 = x; then
-	ipv6_libinet6=no
-	SAVELDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
-      fi
-      { $as_echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
-$as_echo_n "checking for getnameinfo in -linet6... " >&6; }
-if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet6  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-int
-main ()
-{
-return getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_inet6_getnameinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_inet6_getnameinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
-$as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; }
-if test "x$ac_cv_lib_inet6_getnameinfo" = x""yes; then
-  	if test $ipv6_libinet6 = no; then
-	  ipv6_libinet6=yes
-	  LIBS="$LIBS -linet6"
-	fi
-fi
-      if test $ipv6_libinet6 = no; then
-	LDFLAGS="$SAVELDFLAGS"
-      fi
-    fi
-fi
-
-fi
-ipv6_cv_getnameinfo=no
-if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
-     -o $ac_cv_lib_inet6_getnameinfo = yes
-then
-  ipv6_cv_getnameinfo=yes
-fi
-if test $ipv6_cv_getnameinfo = no; then
-  if test getnameinfo = getaddrinfo; then
-    for ipv6_cv_pfx in o n; do
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
-  as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
-$as_echo_n "checking for ${ipv6_cv_pfx}getnameinfo... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef ${ipv6_cv_pfx}getnameinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ${ipv6_cv_pfx}getnameinfo ();
-/* 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_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
-choke me
-#endif
-
-int
-main ()
-{
-return ${ipv6_cv_pfx}getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-
-fi
-rm -f conftest*
-
-      if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-        ipv6_cv_getnameinfo=yes
-        break
-      fi
-    done
-  fi
-fi
-if test $ipv6_cv_getnameinfo = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETNAMEINFO /**/
-_ACEOF
-
-else
-  sasl_cv_getnameinfo=yes
-fi
-if test $sasl_cv_getnameinfo = yes; then
-	case " $LIBOBJS " in
-  *" getnameinfo.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS getnameinfo.$ac_objext"
- ;;
-esac
-
-        GETNAMEINFOOBJS="getnameinfo.o"
-        LTGETNAMEINFOOBJS="getnameinfo.lo"
-fi
-
-
-
-LTLIBOBJS=`echo "$LIBOBJS" | sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'`
-
-
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* 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";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 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;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_const=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_c_const=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const /**/
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_inline=$ac_kw
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
-    ;;
-esac
-
-{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
-$as_echo_n "checking for mode_t... " >&6; }
-if test "${ac_cv_type_mode_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_type_mode_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (mode_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((mode_t)))
-	  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_mode_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
-$as_echo "$ac_cv_type_mode_t" >&6; }
-if test "x$ac_cv_type_mode_t" = x""yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
-$as_echo_n "checking for pid_t... " >&6; }
-if test "${ac_cv_type_pid_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_type_pid_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (pid_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((pid_t)))
-	  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_pid_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-$as_echo "$ac_cv_type_pid_t" >&6; }
-if test "x$ac_cv_type_pid_t" = x""yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_signal=int
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_signal=void
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
-{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_time=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_time=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#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))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-
-
-
-
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_search_opendir=$ac_res
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then
-  :
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-else
-  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_search_opendir=$ac_res
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then
-  :
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-
-int
-main ()
-{
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_sys_wait_h=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_sys_wait_h=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-if test $ac_cv_header_sys_wait_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_WAIT_H 1
-_ACEOF
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-{ $as_echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
-$as_echo_n "checking whether you have ss_family in struct sockaddr_storage... " >&6; }
-if test "${ipv6_cv_ss_family+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr_storage ss; int i = ss.ss_family;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ipv6_cv_ss_family=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ipv6_cv_ss_family=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test $ipv6_cv_ss_family = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SS_FAMILY /**/
-_ACEOF
-
-else
-  :
-fi
-{ $as_echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
-$as_echo "$ipv6_cv_ss_family" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
-$as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; }
-if test "${ipv6_cv_sa_len+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr sa; int i = sa.sa_len;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ipv6_cv_sa_len=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ipv6_cv_sa_len=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test $ipv6_cv_sa_len = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKADDR_SA_LEN /**/
-_ACEOF
-
-else
-  :
-fi
-{ $as_echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
-$as_echo "$ipv6_cv_sa_len" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
-$as_echo_n "checking for socklen_t... " >&6; }
-if test "${ipv6_cv_socklen_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-socklen_t len = 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ipv6_cv_socklen_t=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ipv6_cv_socklen_t=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-if test $ipv6_cv_socklen_t = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKLEN_T /**/
-_ACEOF
-
-else
-  :
-fi
-{ $as_echo "$as_me:$LINENO: result: $ipv6_cv_socklen_t" >&5
-$as_echo "$ipv6_cv_socklen_t" >&6; }
-
-#AC_FUNC_MEMCMP
-#AC_FUNC_VPRINTF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in gethostname getdomainname getpwnam getspnam gettimeofday inet_aton memcpy mkdir select socket strchr strdup strerror strspn strstr strtol jrand48 getpassphrase
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-if test $enable_cmulocal = yes; then
-    { $as_echo "$as_me:$LINENO: WARNING: enabling CMU local kludges" >&5
-$as_echo "$as_me: WARNING: enabling CMU local kludges" >&2;}
-
-cat >>confdefs.h <<\_ACEOF
-#define KRB4_IGNORE_IP_ADDRESS /**/
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PREFER_MECH "KERBEROS_V4"
-_ACEOF
-
-fi
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/socket.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "sockaddr_storage" >/dev/null 2>&1; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-
-
-
-
-
-subdirs="$subdirs saslauthd"
-
-
-
-
-
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-ac_config_files="$ac_config_files Makefile libsasl2.pc include/Makefile sasldb/Makefile plugins/Makefile lib/Makefile utils/Makefile doc/Makefile sample/Makefile java/Makefile java/CyrusSasl/Makefile java/Test/Makefile java/javax/Makefile java/javax/security/Makefile java/javax/security/auth/Makefile java/javax/security/auth/callback/Makefile pwcheck/Makefile man/Makefile"
-
-cat >confcache <<\_ACEOF
-# 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, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# 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.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
- if test -n "$EXEEXT"; then
-  am__EXEEXT_TRUE=
-  am__EXEEXT_FALSE='#'
-else
-  am__EXEEXT_TRUE='#'
-  am__EXEEXT_FALSE=
-fi
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${JAVA_TRUE}" && test -z "${JAVA_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"JAVA\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"JAVA\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${SAMPLE_TRUE}" && test -z "${SAMPLE_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"SAMPLE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"SAMPLE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${NO_SASL_DB_MANS_TRUE}" && test -z "${NO_SASL_DB_MANS_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"NO_SASL_DB_MANS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"NO_SASL_DB_MANS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${SASLAUTHD_TRUE}" && test -z "${SASLAUTHD_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"SASLAUTHD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"SASLAUTHD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${PWCHECK_TRUE}" && test -z "${PWCHECK_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"PWCHECK\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"PWCHECK\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${MACOSX_TRUE}" && test -z "${MACOSX_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"MACOSX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"MACOSX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf at gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "libsasl2.pc") CONFIG_FILES="$CONFIG_FILES libsasl2.pc" ;;
-    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
-    "sasldb/Makefile") CONFIG_FILES="$CONFIG_FILES sasldb/Makefile" ;;
-    "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;;
-    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
-    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
-    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-    "sample/Makefile") CONFIG_FILES="$CONFIG_FILES sample/Makefile" ;;
-    "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;;
-    "java/CyrusSasl/Makefile") CONFIG_FILES="$CONFIG_FILES java/CyrusSasl/Makefile" ;;
-    "java/Test/Makefile") CONFIG_FILES="$CONFIG_FILES java/Test/Makefile" ;;
-    "java/javax/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/Makefile" ;;
-    "java/javax/security/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/security/Makefile" ;;
-    "java/javax/security/auth/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/security/auth/Makefile" ;;
-    "java/javax/security/auth/callback/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/security/auth/callback/Makefile" ;;
-    "pwcheck/Makefile") CONFIG_FILES="$CONFIG_FILES pwcheck/Makefile" ;;
-    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr='
'
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #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.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$_am_arg" : 'X\(//\)[^/]' \| \
-	 X"$_am_arg" : 'X\(//\)$' \| \
-	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      { as_dir=$dirpart/$fdir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
-  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
-  # so they do not pile up.
-  ac_sub_configure_args=
-  ac_prev=
-  eval "set x $ac_configure_args"
-  shift
-  for ac_arg
-  do
-    if test -n "$ac_prev"; then
-      ac_prev=
-      continue
-    fi
-    case $ac_arg in
-    -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=*)
-      ;;
-    --config-cache | -C)
-      ;;
-    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-      ac_prev=srcdir ;;
-    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-      ;;
-    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-      ac_prev=prefix ;;
-    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-      ;;
-    --disable-option-checking)
-      ;;
-    *)
-      case $ac_arg in
-      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-      esac
-      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
-    esac
-  done
-
-  # Always prepend --prefix to ensure using the same prefix
-  # in subdir configurations.
-  ac_arg="--prefix=$prefix"
-  case $ac_arg in
-  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
-  # Pass --silent
-  if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
-  fi
-
-  # Always prepend --disable-option-checking to silence warnings, since
-  # different subdirs can have different --enable and --with options.
-  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
-  ac_popdir=`pwd`
-  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    test -d "$srcdir/$ac_dir" || continue
-
-    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-    $as_echo "$as_me:$LINENO: $ac_msg" >&5
-    $as_echo "$ac_msg" >&6
-    { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-    cd "$ac_dir"
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      ac_sub_configure=$ac_srcdir/configure.gnu
-    elif test -f "$ac_srcdir/configure"; then
-      ac_sub_configure=$ac_srcdir/configure
-    elif test -f "$ac_srcdir/configure.in"; then
-      # This should be Cygnus configure.
-      ac_sub_configure=$ac_aux_dir/configure
-    else
-      { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
-      ac_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$ac_sub_configure"; then
-      # Make the cache file name correct relative to the subdirectory.
-      case $cache_file in
-      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
-      *) # Relative name.
-	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
-      esac
-
-      { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
-      # The eval makes quoting arguments work.
-      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-	{ { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
-$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
-    cd "$ac_popdir"
-  done
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-echo Configuration Complete.  Type \'make\' to build.
diff --git a/configure.in b/configure.ac
similarity index 88%
rename from configure.in
rename to configure.ac
index 465a362..d3f38af 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,7 +1,7 @@
-dnl configure.in for the SASL library
+dnl configure.ac for the SASL library
 dnl Rob Siemborski
 dnl Rob Earhart
-dnl $Id: configure.in,v 1.224 2011/09/22 14:44:15 mel Exp $
+dnl $Id: configure.ac,v 1.224 2011/09/22 14:44:15 mel Exp $
 dnl
 dnl Copyright (c) 2001 Carnegie Mellon University.  All rights reserved.
 dnl
@@ -41,8 +41,20 @@ dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
 dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 dnl OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 dnl
-AC_INIT(lib/saslint.h)
-AC_PREREQ([2.54])
+
+AC_PREREQ(2.63.2)
+
+dnl
+dnl REMINDER: When changing the version number here, please also update
+dnl the values in win32/include/config.h and include/sasl.h as well.
+dnl
+AC_INIT([cyrus-sasl],
+        [2.1.26],
+        [https://git.cyrus.foundation/maniphest/],
+        [cyrus-sasl],
+        [https://docs.cyrus.foundation])
+
+AC_CONFIG_MACRO_DIR([m4])
 
 dnl use ./config.cache as the default cache file.
 dnl we require a cache file to successfully configure our build.
@@ -55,15 +67,7 @@ AC_CONFIG_AUX_DIR(config)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
-dnl
-dnl REMINDER: When changing the version number here, please also update
-dnl the values in win32/include/config.h and include/sasl.h as well.
-dnl
-AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.26)
-CMU_INIT_AUTOMAKE
-
-# and include our config dir scripts
-ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config"
+AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability subdir-objects])
 
 DIRS=""
 
@@ -85,11 +89,13 @@ AC_ARG_ENABLE(obsolete_cram_attr,
               enable_obsolete_cram_attr=yes)
 
 AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
 AC_PROG_CPP
 AC_PROG_AWK
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
+AC_USE_SYSTEM_EXTENSIONS
 CMU_C___ATTRIBUTE__
 
 dnl check for -R, etc. switch
@@ -200,19 +206,19 @@ SASL_DB_CHECK()
 # Do we not install the SASL DB man pages?
 AM_CONDITIONAL(NO_SASL_DB_MANS, test "x$SASL_DB_MANS" = "x")
 
-AC_ARG_ENABLE(keep_db_open, [  --enable-keep-db-open   keep handle to Berkeley DB open for improved performance [[no]] ],
+AC_ARG_ENABLE(keep_db_open, [  --enable-keep-db-open   keep handle to DB open for improved performance [[no]] ],
                 keep_db_open=$enableval,
                 keep_db_open=no)
 
-# Disable if Berkeley DB is not used
-if test "$dblib" != berkeley; then
+# Disable if Berkeley DB and LMDB are not used
+if test "$dblib" != berkeley -a "$dblib" != lmdb; then
   keep_db_open=no
 fi
 
 if test "$keep_db_open" = yes; then
-  AC_DEFINE(KEEP_DB_OPEN,[],[Should we keep handle to Berkeley DB open in SASLDB plugin?])
+  AC_DEFINE(KEEP_DB_OPEN,[],[Should we keep handle to DB open in SASLDB plugin?])
 fi
-AC_MSG_CHECKING(if Berkeley DB handle is kept open in SASLDB)
+AC_MSG_CHECKING(if DB handle is kept open in SASLDB)
 AC_MSG_RESULT($keep_db_open)
 
 AC_CHECK_LIB(dl, dlopen, SASL_DL_LIB="-ldl", SASL_DL_LIB="")
@@ -233,8 +239,8 @@ AC_CHECK_PROGS(NM, nm)
 
 AC_MSG_CHECKING(for underscore before symbols)
 AC_CACHE_VAL(sasl_cv_uscore,[
-    echo "main(){int i=1;}
-    foo(){int i=6;}" > conftest.c
+    echo "void main(){int i=1;}
+    void foo(){int i=6;}" > conftest.c
     ${CC} -o a.out conftest.c > /dev/null
     if (${NM} a.out | grep _foo) > /dev/null; then
       sasl_cv_uscore=yes
@@ -252,8 +258,8 @@ if test $sasl_cv_uscore = yes; then
 	AC_CACHE_VAL(sasl_cv_dlsym_adds_uscore,AC_TRY_RUN( [
 #include <dlfcn.h>
 #include <stdio.h>
-foo() { int i=0;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
+void foo() { int i=0;}
+void main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
     if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo");
     if(ptr1 && !ptr2) exit(0); } exit(1); } 
 ], [sasl_cv_dlsym_adds_uscore=yes], sasl_cv_dlsym_adds_uscore=no
@@ -565,10 +571,15 @@ SASL_GSSAPI_CHK
 
 if test "$gssapi" != "no"; then
   AC_DEFINE(STATIC_GSSAPIV2,[],[Link GSSAPI Statically])
+  AC_DEFINE(HAVE_GSSAPI,[],[Include GSSAPI/Kerberos 5 Support])
+
   mutex_default="no"
   if test "$gss_impl" = "mit"; then
      mutex_default="yes"
+  elif test "$gss_impl" = "heimdal"; then
+     AC_DEFINE(KRB5_HEIMDAL,[],[Using Heimdal]) 
   fi
+
   AC_MSG_CHECKING(to use mutexes aroung GSS calls)
   AC_ARG_ENABLE(gss_mutexes, [  --enable-gss_mutexes     use mutexes around calls to the GSS library],
                 use_gss_mutexes=$enableval,
@@ -579,6 +590,68 @@ if test "$gssapi" != "no"; then
   AC_MSG_RESULT($use_gss_mutexes)
 fi
 
+SASL2_CRYPT_CHK
+
+AC_ARG_ENABLE(sia, [  --enable-sia            enable SIA authentication [no] ],
+  sia=$enableval,
+  sia=no)
+LIB_SIA=""
+if test "$sia" != no; then
+  if test -f /etc/sia/matrix.conf; then
+    AC_DEFINE(HAVE_SIA,[],[Include SIA Support])
+    LIB_SIA="-lsecurity -ldb -lm -laud"
+  else
+    AC_ERROR([No support for SIA found])
+  fi
+fi
+AC_SUBST(LIB_SIA)
+
+AC_ARG_ENABLE(auth-sasldb, [  --enable-auth-sasldb    enable experimental SASLdb authentication module [no] ],
+  authsasldb=$enableval,
+  authsasldb=no)
+if test "$authsasldb" != no; then
+  if test ! -d "../sasldb"; then
+     echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
+     exit 0;
+  fi
+  AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
+  SASL_DB_PATH_CHECK()
+  SASL_DB_CHECK()
+  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
+fi
+
+AC_ARG_ENABLE(httpform, [  --enable-httpform       enable HTTP form authentication [[no]] ],
+  httpform=$enableval,
+  httpform=no)
+if test "$httpform" != no; then
+  AC_DEFINE(HAVE_HTTPFORM,[],[Include HTTP form Support])
+fi
+
+AC_ARG_WITH(pam, [  --with-pam=DIR          use PAM (rooted in DIR) [yes] ],
+	with_pam=$withval,
+	with_pam=yes)
+if test "$with_pam" != no; then
+  if test -d $with_pam; then
+    CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
+    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
+  fi
+  cmu_save_LIBS="$LIBS"
+  AC_CHECK_LIB(pam, pam_start, [
+  AC_CHECK_HEADER(security/pam_appl.h,,
+		  with_pam=no)],
+	with_pam=no, $SASL_DL_LIB)
+  LIBS="$cmu_save_LIBS"
+fi
+
+AC_MSG_CHECKING(for PAM support)
+AC_MSG_RESULT($with_pam)
+LIB_PAM=""
+if test "$with_pam" != no; then
+  AC_DEFINE(HAVE_PAM,[],[Support for PAM?])
+  LIB_PAM="-lpam"
+fi
+AC_SUBST(LIB_PAM)
+
 dnl PLAIN
 SASL_PLAIN_CHK
 
@@ -671,9 +744,26 @@ else
 fi
 
 
-# make the option show up so people don't whine that it is only in the
-# saslauthd configure script --help
-AC_ARG_WITH(ldap,   [  --with-ldap=DIR         use LDAP (in DIR) for saslauthd [no] ],,with_ldap=no)
+AC_MSG_CHECKING(to include LDAP support)
+AC_ARG_WITH(ldap, [  --with-ldap=DIR         use LDAP (in DIR) for saslauthd [no] ],
+	with_ldap=$withval,
+	with_ldap=no)
+AC_MSG_RESULT($with_ldap)
+
+if test -d $with_ldap; then
+    CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
+    CMU_ADD_LIBPATH(${with_ldap}/lib)
+fi
+
+LDAP_LIBS=""
+if test "$with_ldap" != no; then
+  AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Support for LDAP?])
+                                        LDAP_LIBS="-lldap -llber"
+					if test "$with_openssl" != "no"; then
+					    LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
+					fi],,-llber)
+fi
+AC_SUBST(LDAP_LIBS)
 
 
 dnl SQL
@@ -729,7 +819,18 @@ LIB_MYSQL=""
 
 case "$with_mysql" in
     no) true;;
-    notfound) AC_WARN([MySQL Library not found]); true;;
+    notfound)
+     save_LDFLAGS=$LDFLAGS
+     LIB_MYSQL=`mysql_config --libs`
+     LIB_MYSQL="-lmysqlclient"
+     LDFLAGS="$LDFLAGS $LIB_MYSQL"
+     # CPPFLAGS="${CPPFLAGS} `mysql_config --include`"
+     AC_CHECK_LIB(mysqlclient, mysql_select_db,
+           AC_DEFINE(HAVE_MYSQL, [], [Do we have mysql support?]),
+           [AC_WARN([MySQL library mysqlclient does not work])
+            with_mysql=no])
+     LDFLAGS=$save_LDFLAGS
+     ;;
     *)
      if test -d ${with_mysql}/lib/mysql; then
 	CMU_ADD_LIBPATH_TO(${with_mysql}/lib/mysql, LIB_MYSQL)
@@ -750,6 +851,8 @@ case "$with_mysql" in
          CPPFLAGS="${CPPFLAGS} -I${with_mysql}/mysql/include"
      elif test -d ${with_mysql}/include; then
          CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include"
+     elif test -d ${prefix}/include/mysql; then
+         CPPFLAGS="${CPPFLAGS} -I${prefix}/include/mysql"
      else
          CPPFLAGS="${CPPFLAGS} -I${with_mysql}"
      fi
@@ -793,7 +896,17 @@ LIB_PGSQL=""
 
 case "$with_pgsql" in
     no) true;;
-    notfound) AC_WARN([PostgreSQL Library not found]); true;;
+    notfound)
+     LIB_PGSQL="-lpq"
+     # CPPFLAGS="${CPPFLAGS} -I`pg_config --includedir`"
+     save_LDFLAGS=$LDFLAGS
+     LDFLAGS="$LDFLAGS $LIB_PGSQL"
+     AC_CHECK_LIB(pq, PQsetdbLogin, AC_DEFINE(HAVE_PGSQL,[],
+         [Do we have Postgres support?]),
+         [AC_WARN([PostgreSQL Library pq does not work])
+          with_pgsql=no])
+     LDFLAGS=$save_LDFLAGS
+     ;;
     *)
      if test -d ${with_pgsql}/lib/pgsql; then
 	CMU_ADD_LIBPATH_TO(${with_pgsql}/lib/pgsql, LIB_PGSQL)
@@ -814,6 +927,8 @@ case "$with_pgsql" in
          CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
      elif test -d ${with_pgsql}/include; then
          CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include"
+     elif test -d ${prefix}/include; then
+         CPPFLAGS="${CPPFLAGS} -I${prefix}/include"
      else
          CPPFLAGS="${CPPFLAGS} -I${with_pgsql}"
      fi
@@ -1035,6 +1150,7 @@ AC_ARG_ENABLE(macos-framework, [  --disable-macos-framework       disable buildi
         ;;
 esac
 AM_CONDITIONAL(MACOSX, test "$building_for_macosx" = yes)
+AM_CONDITIONAL(WINDOWS, test "$host_os" = "mingw32")
 
 dnl dmalloc tests
 AC_MSG_CHECKING(for dmalloc library)
@@ -1195,7 +1311,7 @@ AC_HEADER_TIME
 AC_HEADER_STDC
 AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h)
+AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h)
 
 IPv6_CHECK_SS_FAMILY()
 IPv6_CHECK_SA_LEN()
@@ -1203,7 +1319,7 @@ IPv6_CHECK_SOCKLEN_T()
 
 #AC_FUNC_MEMCMP
 #AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(gethostname getdomainname getpwnam getspnam gettimeofday inet_aton memcpy mkdir select socket strchr strdup strerror strspn strstr strtol jrand48 getpassphrase)
+AC_CHECK_FUNCS(gethostname getdomainname getpwnam getspnam gettimeofday inet_aton memcpy mkdir select socket strchr strdup strerror strspn strstr strtol jrand48 getpassphrase asprintf strlcat strlcpy)
 
 if test $enable_cmulocal = yes; then
     AC_WARN([enabling CMU local kludges])
@@ -1216,8 +1332,6 @@ AC_EGREP_HEADER(sockaddr_storage, sys/socket.h, [
 
 AC_SUBST(DIRS)
 
-AC_CONFIG_SUBDIRS(saslauthd)
-
 AH_TOP([
 /* acconfig.h - autoheader configuration input */
 /* 
@@ -1409,14 +1523,28 @@ inline static unsigned int sleep(unsigned int seconds) {
 }
 #endif
 
+/* handy string manipulation functions */
+#ifndef HAVE_STRLCPY
+extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
+#define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
+#endif
+#ifndef HAVE_STRLCAT
+extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
+#define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
+#endif
+#ifndef HAVE_ASPRINTF
+extern int asprintf(char **str, const char *fmt, ...);
+#endif
+
 #endif /* CONFIG_H */
 ])
 
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
 
 AC_OUTPUT(Makefile
 libsasl2.pc
 include/Makefile
+saslauthd/Makefile
 sasldb/Makefile
 plugins/Makefile
 lib/Makefile
@@ -1433,4 +1561,12 @@ java/javax/security/auth/callback/Makefile
 pwcheck/Makefile
 man/Makefile)
 
-echo Configuration Complete.  Type \'make\' to build.
+AC_MSG_NOTICE([
+
+cyrus-sasl - $VERSION
+
+• Prefix: $prefix
+• Plugins: $SASL_MECHS
+
+Now type 'make' to build $PACKAGE
+])
diff --git a/contrib/README b/contrib/README
new file mode 100644
index 0000000..092aca9
--- /dev/null
+++ b/contrib/README
@@ -0,0 +1,5 @@
+The contents of this directory are unsupported patches to the
+Cyrus SASL library that may or may not be useful to the end user.
+
+They are completely unsupported, and any questions should be directed
+to the authors.
diff --git a/contrib/change-sasldb2-realm.py b/contrib/change-sasldb2-realm.py
new file mode 100644
index 0000000..c6b67a0
--- /dev/null
+++ b/contrib/change-sasldb2-realm.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+#
+# This script changes a SASLDB2 realm to another one.
+#
+# Written by Sander Steffann <sander at steffann.nl>
+# No rights reserved: do with this script as you please.
+#
+# Usage: change-sasldb2-realm.py <orig-realm> <new-realm>
+# where <orig-realm> and <new-realm> are case-sensitive.
+#
+# !WARNING!  This script opens /etc/sasldb2 directly, without going through
+#            the official API. If the file format changes this script breaks.
+#
+# The following file-format for sasldb2 is assumed: a BSD-DB hash-file with a
+# key in the format "<data> \x00 <realm> \x00 <data>". The <data> parts are
+# copied without modification. The values corresponding to the keys are copied
+# without modification too.
+#
+# To be safe, this script opens /etc/sasldb2 read-only and writes the result
+# to a new file: /etc/sasldb2.new. If this file exists this script will
+# overwrite it. Don't overwrite your /etc/sasldb2 file until you are sure the
+# results in /etc/sasldb2.new are what you want.
+#
+# This script uses the bsddb module provided with python. It is assumed that
+# the DB library used by python is the same as the one used by SASL2. If this
+# is not the case the script will abort with an error when opening sasldb2.
+#
+
+import bsddb
+import sys
+
+# Check command-line arguments
+if len(sys.argv) != 3:
+	print "Usage: %s <orig-realm> <new-realm>" % (sys.argv[0],)
+	sys.exit(1)
+
+# Extract the command-line arguments into properly named variables
+orig_realm = sys.argv[1]
+new_realm = sys.argv[2]
+
+# Open the BSD-DB files
+orig_db = bsddb.hashopen('/etc/sasldb2', 'r')
+new_db = bsddb.hashopen('/etc/sasldb2.new', 'n')
+
+# Loop over all the keys in the original sasldb2
+for orig_key in orig_db.keys():
+	# Split the key into the three components
+	elements = orig_key.split('\x00')
+	if len(elements) != 3:
+		raise ValueError, "The structure of /etc/sasldb2 is not as expected!"
+	
+	# Compare the current realm with the realm we want to replace
+	if elements[1] == orig_realm:
+		# Replace the current realm with the new one
+		new_key = '\x00'.join([elements[0], new_realm, elements[2]])
+	else:
+		# Wrong realm: Don't touch the key
+		new_key = orig_key
+
+	# Write the key with the corresponding value in the new DB
+	new_db[new_key] = orig_db[orig_key]
+
+# Close the DB files
+orig_db.close()
+new_db.close()
diff --git a/contrib/cyrus-sasl-1.5.24-ltdl.patches b/contrib/cyrus-sasl-1.5.24-ltdl.patches
new file mode 100644
index 0000000..f340620
--- /dev/null
+++ b/contrib/cyrus-sasl-1.5.24-ltdl.patches
@@ -0,0 +1,340 @@
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/Makefile.am cyrus-sasl-1.5.24.new/Makefile.am
+--- cyrus-sasl-1.5.24.orig/Makefile.am	Fri Apr 28 19:16:11 2000
++++ cyrus-sasl-1.5.24.new/Makefile.am	Tue Jul 17 12:41:06 2001
+@@ -58,7 +58,7 @@
+ JAV =
+ endif
+ 
+-SUBDIRS=include lib plugins utils doc man $(PWC) $(SAM) $(JAV)
++SUBDIRS=include libltdl lib plugins utils doc man $(PWC) $(SAM) $(JAV)
+ EXTRA_DIST=config cmulocal win32 testing.txt
+ 
+ dist-hook:
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/configure.in cyrus-sasl-1.5.24.new/configure.in
+--- cyrus-sasl-1.5.24.orig/configure.in	Fri Jul 21 04:35:01 2000
++++ cyrus-sasl-1.5.24.new/configure.in	Tue Jul 17 13:20:18 2001
+@@ -71,8 +71,14 @@
+ 
+ AM_DISABLE_STATIC
+ 
++AC_LIBLTDL_INSTALLABLE
++AC_SUBST(INCLTDL)
++AC_SUBST(LIBLTDL)
++AC_LIBTOOL_DLOPEN
++
+ CMU_PROG_LIBTOOL
+ 
++
+ if test "$ac_cv_prog_gcc" = yes; then
+   CFLAGS="-Wall -W ${CFLAGS}"
+ fi
+@@ -374,11 +380,11 @@
+   fi
+ fi
+ 
+-
+-
+ if test "$with_des" != no; then
+   AC_DEFINE(WITH_DES)
+-  LIB_DES="-ldes"
++  if test "x$LIB_DES" = x; then
++    LIB_DES="-ldes"
++  fi
+ fi
+ 
+ AC_SUBST(LIB_DES)
+@@ -716,5 +722,7 @@
+ fi
+ 
+ AC_SUBST(DIRS)
++
++AC_CONFIG_SUBDIRS(libltdl)
+ 
+ AC_OUTPUT(Makefile include/Makefile lib/Makefile plugins/Makefile utils/Makefile doc/Makefile sample/Makefile java/Makefile java/CyrusSasl/Makefile pwcheck/Makefile man/Makefile)
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/Makefile.am cyrus-sasl-1.5.24.new/lib/Makefile.am
+--- cyrus-sasl-1.5.24.orig/lib/Makefile.am	Fri Jul 21 04:35:02 2000
++++ cyrus-sasl-1.5.24.new/lib/Makefile.am	Tue Jul 17 12:41:08 2001
+@@ -43,7 +43,10 @@
+ # Library version info - here at the top, for sanity
+ sasl_version = 8:8:1
+ 
+-INCLUDES=-I$(top_srcdir)/include
++INCLTDL= @INCLTDL@
++LIBLTDL= @LIBLTDL@
++
++INCLUDES=-I$(top_srcdir)/include $(INCLTDL)
+ 
+ EXTRA_DIST = saslint.h windlopen.c
+ 
+@@ -53,5 +56,5 @@
+ EXTRA_libsasl_la_SOURCES = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c db_testw32.c
+ libsasl_la_LDFLAGS = -version-info $(sasl_version)
+ libsasl_la_DEPENDENCIES = $(SASL_DB_BACKEND) @LTLIBOBJS@
+-libsasl_la_LIBADD = @LTLIBOBJS@ $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS)
++libsasl_la_LIBADD = @LTLIBOBJS@ $(LIBLTDL) $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS)
+ # PLAIN_LIBS are linked in for sasl_checkpass
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/client.c cyrus-sasl-1.5.24.new/lib/client.c
+--- cyrus-sasl-1.5.24.orig/lib/client.c	Thu Apr  6 16:50:22 2000
++++ cyrus-sasl-1.5.24.new/lib/client.c	Tue Jul 17 12:41:08 2001
+@@ -49,6 +49,7 @@
+ #include <string.h>
+ #include <sasl.h>
+ #include <saslutil.h>
++#include <ltdl.h>
+ #include "saslint.h"
+ 
+ static int
+@@ -218,7 +219,7 @@
+ {
+   int version;
+   const sasl_client_plug_t *plug;
+-  void *library;
++  lt_dlhandle library;
+ 
+   struct cmechanism *next;  
+ } cmechanism_t;
+@@ -370,6 +371,10 @@
+ 
+   cmechlist->mech_list=NULL;
+   cmechlist->mech_length=0;
++
++  /* init libltdl */
++  if (lt_dlinit() != 0)
++    return SASL_FAIL;
+ 
+   add_plugin((void *) &external_client_init, NULL);
+ 
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/common.c cyrus-sasl-1.5.24.new/lib/common.c
+--- cyrus-sasl-1.5.24.orig/lib/common.c	Mon Jul 17 19:21:02 2000
++++ cyrus-sasl-1.5.24.new/lib/common.c	Tue Jul 17 16:26:01 2001
+@@ -117,6 +117,11 @@
+   _sasl_mutex_utils.lock=l;
+   _sasl_mutex_utils.unlock=u;
+   _sasl_mutex_utils.dispose=d;
++  /* XXX seb FIXME: add a call to lt_dlmutex_register() for libltdl.
++     sasl_set_mutex args must surely be modified to add func ptr
++     for libtool's callbacks SETERROR and GETERROR; n/l/u can 
++     certainly be reused for libtool's callbacks LOCK and UNLOCK.
++     see (libtool.info) Thread Saftey in libltdl */
+ }
+ 
+ 
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/dlopen.c cyrus-sasl-1.5.24.new/lib/dlopen.c
+--- cyrus-sasl-1.5.24.orig/lib/dlopen.c	Thu Mar  9 21:53:47 2000
++++ cyrus-sasl-1.5.24.new/lib/dlopen.c	Tue Jul 17 12:45:35 2001
+@@ -50,6 +50,7 @@
+ #include <limits.h>
+ #include <sys/param.h>
+ #include <sasl.h>
++#include <ltdl.h>
+ #include "saslint.h"
+ 
+ #if HAVE_DIRENT_H
+@@ -91,61 +92,7 @@
+ #  define NAME_MAX 8
+ #endif
+ 
+-#ifdef __hpux
+-#include <dl.h>
+-
+-typedef shl_t dll_handle;
+-typedef void * dll_func;
+-
+-dll_handle
+-dlopen(char *fname, int mode)
+-{
+-    shl_t h = shl_load(fname, BIND_DEFERRED, 0L);
+-    shl_t *hp = NULL;
+-    
+-    if (h) {
+-	hp = (shl_t *)malloc(sizeof (shl_t));
+-	if (!hp) {
+-	    shl_unload(h);
+-	} else {
+-	    *hp = h;
+-	}
+-    }
+-
+-    return (dll_handle)hp;
+-}
+-
+-int
+-dlclose(dll_handle h)
+-{
+-    shl_t hp = *((shl_t *)h);
+-    if (hp != NULL) free(hp);
+-    return shl_unload(h);
+-}
+-
+-dll_func
+-dlsym(dll_handle h, char *n)
+-{
+-    dll_func handle;
+-    
+-    if (shl_findsym ((shl_t *)h, n, TYPE_PROCEDURE, &handle))
+-	return NULL;
+-    
+-    return (dll_func)handle;
+-}
+-
+-char *dlerror()
+-{
+-    if (errno != 0) {
+-	return strerror(errno);
+-    }
+-    return "Generic shared library error";
+-}
+-
+-#define SO_SUFFIX	".sl"
+-#else /* __hpux */
+-#define SO_SUFFIX	".so"
+-#endif /* __hpux */
++#define LA_SUFFIX	".la"
+ 
+ 
+ /* gets the list of mechanisms */
+@@ -159,11 +106,6 @@
+    * checks appropriately. */
+   int result;
+   char str[PATH_MAX], tmp[PATH_MAX+2], c, prefix[PATH_MAX+2]; /* 1 for '/' 1 for trailing '\0' */
+-#if __OpenBSD__
+-  char adj_entryname[1024];
+-#else
+-#define adj_entryname entryname
+-#endif
+   int pos;
+   char *path=NULL;
+   int position;
+@@ -180,10 +122,6 @@
+       || ! add_plugin)
+     return SASL_BADPARAM;
+ 
+-#if __OpenBSD__
+-  snprintf(adj_entryname, sizeof adj_entryname, "_%s", entryname);
+-#endif
+-
+   /* get the path to the plugins */
+   result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
+ 						  &path);
+@@ -214,10 +152,9 @@
+       while ((dir=readdir(dp)) != NULL)
+       {
+ 	size_t length;
+-	void *library;
+-	void *entry_point;
++	lt_dlhandle library;
++	lt_ptr entry_point;
+ 	char name[PATH_MAX];
+-	int flag;
+ 
+ 
+ 	length = NAMLEN(dir);
+@@ -225,7 +162,7 @@
+ 
+ 	if (length + pos>=PATH_MAX) continue; /* too big */
+ 
+-	if (strcmp(dir->d_name + (length - 3), SO_SUFFIX)) continue;
++	if (strcmp(dir->d_name + (length - 3), LA_SUFFIX)) continue;
+ 
+ 	memcpy(name,dir->d_name,length);
+ 	name[length]='\0';
+@@ -243,28 +180,23 @@
+ 	
+ 	if (result != SASL_OK) return result;
+ 	
+-#ifdef RTLD_NOW
+-	flag = RTLD_NOW;
+-#else
+-	flag = 0;
+-#endif
+-	if (!(library = dlopen(tmp, flag))) {
++	if (!(library = lt_dlopen(tmp))) {
+ 	    _sasl_log(NULL, SASL_LOG_ERR, NULL, 0, 0,
+-		      "unable to dlopen %s: %s", tmp, dlerror());
++		      "unable to lt_dlopen %s: %s", tmp, lt_dlerror());
+ 	    continue;
+ 	}
+ 	entry_point = NULL;
+-	entry_point = dlsym(library, adj_entryname);
++	entry_point = lt_dlsym(library, entryname);
+ 
+ 	if (entry_point == NULL) {
+ 	  VL(("can't get an entry point\n"));
+-	  dlclose(library);
++	  lt_dlclose(library);
+ 	  continue;
+ 	}
+ 
+ 	if ((*add_plugin)(entry_point, library) != SASL_OK) {
+ 	  VL(("add_plugin to list failed\n"));
+-	  dlclose(library);
++	  lt_dlclose(library);
+ 	  continue;
+ 	}
+ 	VL(("added [%s] successfully\n",dir->d_name));
+@@ -281,12 +213,12 @@
+ }
+ 
+ int
+-_sasl_done_with_plugin(void *plugin)
++_sasl_done_with_plugin(lt_dlhandle plugin)
+ {
+   if (! plugin)
+     return SASL_BADPARAM;
+ 
+-  dlclose(plugin);
++  lt_dlclose(plugin);
+ 
+   return SASL_OK;
+ }
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/saslint.h cyrus-sasl-1.5.24.new/lib/saslint.h
+--- cyrus-sasl-1.5.24.orig/lib/saslint.h	Thu Apr  6 16:50:22 2000
++++ cyrus-sasl-1.5.24.new/lib/saslint.h	Tue Jul 17 12:43:27 2001
+@@ -45,6 +45,7 @@
+ #define SASLINT_H
+ 
+ #include <config.h>
++#include <ltdl.h>
+ #include "sasl.h"
+ #include "saslplug.h"
+ 
+@@ -61,7 +62,7 @@
+ extern const sasl_callback_t *
+ _sasl_find_verifyfile_callback(const sasl_callback_t *callbacks);
+ 
+-extern int _sasl_done_with_plugin(void *plugin);
++extern int _sasl_done_with_plugin(lt_dlhandle plugin);
+ 
+ extern void (*_sasl_client_cleanup_hook)(void);
+ extern void (*_sasl_server_cleanup_hook)(void);
+diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/server.c cyrus-sasl-1.5.24.new/lib/server.c
+--- cyrus-sasl-1.5.24.orig/lib/server.c	Mon Aug 14 04:04:42 2000
++++ cyrus-sasl-1.5.24.new/lib/server.c	Tue Jul 17 12:56:40 2001
+@@ -54,6 +54,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <string.h>
++#include <ltdl.h>
+ 
+ #define DEFAULT_PLAIN_MECHANISM "sasldb"
+ 
+@@ -238,7 +239,7 @@
+   int condition; /* set to SASL_NOUSER if no available users */
+   const sasl_server_plug_t *plug;
+   struct mechanism *next;
+-  void *library; /* this a pointer to shared library returned by dlopen 
++  lt_dlhandle library; /* this a pointer to shared library returned by dlopen 
+ 		    or some similar function on other platforms */
+ } mechanism_t;
+ 
+@@ -668,6 +669,10 @@
+ 
+   /* check db */
+   ret = _sasl_server_check_db(vf);
++
++  /* init libltdl */
++  if (lt_dlinit() != 0)
++    return SASL_FAIL;
+ 
+   /* load plugins */
+   add_plugin((void *)&external_server_init, NULL);
diff --git a/contrib/cyrus-sasl-2.1-upgrade.h b/contrib/cyrus-sasl-2.1-upgrade.h
new file mode 100644
index 0000000..cfdcbc5
--- /dev/null
+++ b/contrib/cyrus-sasl-2.1-upgrade.h
@@ -0,0 +1,254 @@
+/*
+  (C) 2002 Sebastian Hetze <s.hetze at linux-ag.de>
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted under terms and conditions of BSD copyright.
+  
+This gives you an overview of the major api changes from cyrus-sasl version 1.5 to 2.1.
+Certainly not complete, but hopefully a point to start with when you want to upgrade
+your apps.
+Prototypes at the end of this file might be handy.
+ 
+sasl_callbacks		CNONCE, GETSECRET and PUTSECRET are gone,
+				USERDB_CHECKPASS, USERDB_SETPASS and CANON_USER are new
+				sasl_authorize_t (for CB_PROXY_POLICY) has changed completely
+sasl_checkpass		has lost one argument (errstr)
+sasl_client_new		has got two new arguments (iplocalport, ipremoteport)
+				flags type has changed from int to unsigned
+sasl_client_start	has lost one argument (secret)
+				clientout now const
+sasl_client_step	clientout now const
+sasl_decode		output now const
+sasl_encode		output now const
+sasl_getprop		pvalue now const
+sasl_listmech		pcount has changed from unsigned to int
+sasl_server_new		has got two new arguments (iplocalport, ipremoteport)
+				flags type has changed from int to unsigned
+sasl_server_start	has lost one argument (errstr)
+				serverout now const
+sasl_server_step	has lost one argument (errstr)
+				serverout now const
+sasl_user_exists	has got new arg conn
+sasl_setpass		has got new arguments oldpass, oldpasslen
+				lost argument errstr
+				flags changed from int to unsigned
+sasl_set_mutex		4arg sasl_mutex_dispose_t changed to sasl_mutex_free_t
+
+sasl_usererr		is gone
+sasl_client_auth	is gone
+sasl_free_secret	is gone
+sasl_cred_install	is gone
+sasl_cred_uninstall	is gone
+
+sasl_client_init	interface not changed
+sasl_done		interface not changed
+sasl_errstring		interface not changed
+sasl_server_init	interface not changed
+sasl_setprop		interface not changed
+sasl_set_alloc		interface not changed
+sasl_dispose		interface not changed
+sasl_errstring		interface not changed
+sasl_idle		interface not changed
+*/
+
+
+static sasl_callback_t callbacks[] = {
+	{SASL_CB_GETOPT, (sasl_getopt_t)&getopt_func, NULL },
+	{SASL_CB_LOG, (sasl_log_t)&log_func, NULL },
+	{SASL_CB_GETPATH, (sasl_getpath_t)&getpath_func , NULL },
+	{SASL_CB_VERIFYFILE, (sasl_verifyfile_t)&verifyfile_func , NULL },
+	{SASL_CB_USER, (sasl_getsimple_t)&uname_func , NULL },
+	{SASL_CB_AUTHNAME, (sasl_getsimple_t)&authname_func , NULL },
+	{SASL_CB_LANGUAGE, (sasl_getsimple_t)&language_func , NULL },
+#if SASL_VERSION_MAJOR < 2
+	{SASL_CB_CNONCE, (sasl_getsimple_t)&cnonce_func , NULL },
+#endif
+	{SASL_CB_PASS, (sasl_getsecret_t)&getsecret_func , NULL },
+	{SASL_CB_ECHOPROMPT, (sasl_chalprompt_t)&challenge_func , NULL },
+	{SASL_CB_NOECHOPROMPT, (sasl_chalprompt_t)&challenge_func , NULL },
+	{SASL_CB_GETREALM, (sasl_getrealm_t)&getrealm_func , NULL },
+#if SASL_VERSION_MAJOR < 2
+	/* sasl_authorize_t version 1 has almost nothing in common with v2 */
+	{SASL_CB_PROXY_POLICY, (sasl_authorize_t)&authorize1_func, NULL },
+	{SASL_CB_SERVER_GETSECRET, (sasl_server_getsecret_t)&srvgetsecret_func , NULL },
+	{SASL_CB_SERVER_PUTSECRET, (sasl_server_putsecret_t)&srvputsecret_func, NULL },
+#else
+	{SASL_CB_PROXY_POLICY, (sasl_authorize_t)&authorize2_func, NULL },
+	{SASL_CB_SERVER_USERDB_CHECKPASS, (sasl_server_userdb_checkpass_t)&sudbcp_func, NULL },
+	{SASL_CB_SERVER_USERDB_SETPASS, (sasl_server_userdb_setpass_t)&sudbsp_func, NULL },
+	{SASL_CB_CANON_USER, (sasl_canon_user_t)&canon_func , NULL },
+#endif
+	{SASL_CB_LIST_END, NULL, NULL },
+};
+
+
+int sasl_checkpass(sasl_conn_t *conn,
+		const char *user,
+		unsigned userlen,
+		const char *pass,
+		unsigned passlen
+#if SASL_VERSION_MAJOR < 2
+		, const char **errstr
+#endif
+		);	
+
+int sasl_client_new(const char *service,
+		const char *serverFQDN,
+#if SASL_VERSION_MAJOR > 1
+		const char *iplocalport,
+		const char *ipremoteport,
+#endif
+		const sasl_callback_t *prompt_supp,
+#if SASL_VERSION_MAJOR < 2
+		int secflags,
+#else
+		unsigned secflags,
+#endif
+		sasl_conn_t ** pconn);
+
+int sasl_client_start(sasl_conn_t *conn,
+		const char *mechlist,
+#if SASL_VERSION_MAJOR < 2
+		sasl_secret_t *secret,
+#endif
+		sasl_interact_t **prompt_need,
+#if SASL_VERSION_MAJOR < 2
+		char **clientout,
+#else
+		const char **clientout,
+#endif
+		unsigned *clientoutlen,
+		const char **mech);
+
+int sasl_client_step(sasl_conn_t *conn,
+		const char *serverin,
+		unsigned serverinlen,
+		sasl_interact_t **prompt_need,
+#if SASL_VERSION_MAJOR < 2
+		char **clientout,
+#else
+		const char **clientout,
+#endif
+		unsigned *clientoutlen);
+
+int sasl_decode(sasl_conn_t *conn,
+		const char *input,
+		unsigned inputlen,
+#if SASL_VERSION_MAJOR < 2
+		char **output,
+#else
+		const char **output,
+#endif
+		unsigned *outputlen);
+
+int sasl_encode(sasl_conn_t *conn,
+		const char *input,
+		unsigned inputlen,
+#if SASL_VERSION_MAJOR < 2
+		char **output,
+#else
+		const char **output,
+#endif
+		unsigned *outputlen);
+
+sasl_getprop(sasl_conn_t *conn, int propnum,
+#if SASL_VERSION_MAJOR < 2
+		void **pvalue);
+#else
+		const void **pvalue);
+#endif
+
+int sasl_listmech(sasl_conn_t *conn,
+		const char *user,
+		const char *prefix,
+		const char *sep,
+		const char *suffix,
+		const char **result,
+		unsigned *plen,
+#if SASL_VERSION_MAJOR < 2
+		unsigned *pcount);
+#else
+		int *pcount);
+#endif
+
+int sasl_server_new(const char *service,
+		const char *serverFQDN,
+		const char *user_realm,
+#if SASL_VERSION_MAJOR > 1
+		const char *iplocalport,
+		const char *ipremoteport,
+#endif
+		const sasl_callback_t *callbacks,
+#if SASL_VERSION_MAJOR < 2
+		int secflags,
+#else
+		unsigned flags,
+#endif
+		sasl_conn_t **pconn);
+
+
+int sasl_server_start(sasl_conn_t *conn,
+		const char *mech,
+		const char *clientin,
+		unsigned clientinlen,
+#if SASL_VERSION_MAJOR < 2
+		char **serverout,
+#else
+		const char **serverout,
+#endif
+		unsigned *serveroutlen
+#if SASL_VERSION_MAJOR < 2
+		,const char **errstr
+#endif
+		);
+
+int sasl_server_step(sasl_conn_t *conn,
+		const char *clientin,
+		unsigned clientinlen,
+#if SASL_VERSION_MAJOR < 2
+		char **serverout,
+#else
+		const char **serverout,
+#endif
+		unsigned *serveroutlen
+#if SASL_VERSION_MAJOR < 2
+		,const char **errstr
+#endif
+		);
+		
+
+int sasl_user_exists(
+#if SASL_VERSION_MAJOR > 1
+		sasl_conn_t *conn,
+#endif
+		const char *service,
+		const char *user_realm,
+		const char *user);
+
+int sasl_setpass(sasl_conn_t *conn,
+		const char *user,
+		const char *pass,
+		unsigned passlen,
+#if SASL_VERSION_MAJOR > 1
+		const char *oldpass,
+		unsigned oldpasslen,
+		unsigned flags);
+#else
+		int flags,
+		const char **errstr);
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contrib/cyrus-sasl-libltdl b/contrib/cyrus-sasl-libltdl
new file mode 100644
index 0000000..a6aa7cb
--- /dev/null
+++ b/contrib/cyrus-sasl-libltdl
@@ -0,0 +1,69 @@
+From Stoned.Elipot at script.jussieu.fr Thu Jul 19 12:42:33 2001
+Date: Wed, 18 Jul 2001 00:30:00 +0200
+From: Stoned Elipot <Stoned.Elipot at script.jussieu.fr>
+To: cyrus-bugs at andrew.cmu.edu
+Subject: Re: question/suggestion regarding libtool usage in cyrus-sasl lib 
+
+On Mon, 16 Jul 2001 12:33:17 -0400 (EDT)  Rob Siemborski wrote:
+> On Mon, 16 Jul 2001, Stoned Elipot wrote:
+> 
+> > handling of `_' in symbol names. I had made crude patches on cyrus-sasl-1.5
+.24
+> > which use the libtool installed .la files to get the right shared object to
+> > dlopen() and I'm considering using LTDL API to get extra portability withou
+t
+> > too much trouble. Would you be interested in theses ?
+> 
+> I would be interested in seeing them, and possibly include (similar)
+> patches in/with SASLv2.
+
+Hi,
+I had made a couple of patches to implement the usage of GNU libltdl in
+cyrus-sasl-1.5.24. They can be found at :
+ftp://ftp.pbox.org/pub/cyrus-sasl-1.5.24-ltdl.patches.gz
+
+These patches bring :
+
+- libtool linking of libsasl.* with libtldl
+
+- Enabling or not the use of the included libtldl with --enable-ltdl-install
+argument to configure (that's standard libtool integration, see libtool's 
+manual)
+
+- lib/dlopen.c simplification and portability improvement (IMHO) by using
+ltdl API (no more hack for `_' symbols prefixing, let libtool figure out
+the shared lib naming convention)
+
+*Not* included in these patches :
+
+- (new) subdirectory 'libltdl' which should contains the GNU libltdl in
+case the target system does not already have libtool installed. This
+directory can be created by libtoolize --ltdl and then the
+required and missing files for autoconf in there should be added (install-sh
+and all; I didn't find a way to use those in ../config :( ).
+See 'Distributing libltdl' in libtool's manual.
+
+- config/<libtool scripts,support files> : I found myself updating libtool 
+scripts in config/ and so new files add to be added there for supporting latest
+version of it.
+
+- update of config/config.{guess,sub} : during testing on old netbsd systems I
+came across the need to use more uptodate (how strange) version of these files.
+I grabbed those available at ftp.gnu.org/pub/gnu/config
+
+- Makefile.in, aclocal.m4 and configure which of course have to be rebuild
+as my patches touch some of their sources files
+
+(So theses previous point regards files that can be generated/added/updated by
+auto* tools so I didn't put them in the above mentionned patches)
+
+- the thread-safe issue is not resolved: I'm not a thread expert, please see
+the comments I added in the patched lib/common.c:sasl_set_mutex()
+
+Anyway, this allowed me to compile and test (just by cheking that saslpasswd
+is picking the plugins shared libs and produce good result as far as I can see)
+the whole thing on Solaris8/sparc, HPUX11, HPUX10.20 and NetBSD/sparc 1.2.1 
+(a.out) and 1.5.1 (elf). So I guess
+I had the opportunity to test various shared libs handling/convention/...
+
+Hoping this can help. Best regards, Stoned.
diff --git a/contrib/pwcheck-pam.patch b/contrib/pwcheck-pam.patch
new file mode 100644
index 0000000..d45c62a
--- /dev/null
+++ b/contrib/pwcheck-pam.patch
@@ -0,0 +1,317 @@
+X-Added: With Flames (bblib $Revision: 1.1 $)
+Return-path: <m.taylor at rbgkew.org.uk>
+X-Andrew-Authenticated-as: 0;andrew.cmu.edu;Network-Mail
+Received: from po5.andrew.cmu.edu via trymail for cyrus-bugs+ at andrew.cmu.edu (->acs+asg.project.mail.cyrus-bugs)
+          ID </afs/andrew.cmu.edu/data/spool/ams/acs/Mailbox/4thxRwO00Udd1huk40>;
+          Thu,  7 Sep 2000 13:59:24 -0400 (EDT)
+Received: from lion.rbgkew.org.uk (lion.rbgkew.org.uk [193.128.240.22])
+	by po5.andrew.cmu.edu (8.9.3/8.9.3) with ESMTP id NAA28106
+	for <cyrus-bugs+ at andrew.cmu.edu>; Thu, 7 Sep 2000 13:59:08 -0400 (EDT)
+Received: from ns.rbgkew.org.uk
+	([193.128.240.7] helo=unicorn.rbgkew.org.uk ident=mta)
+	by lion.rbgkew.org.uk with esmtp (Exim 3.16 #1)
+	id 13X5wt-0006Mp-00
+	for cyrus-bugs+ at andrew.cmu.edu; Thu, 07 Sep 2000 18:58:55 +0100
+Received: from matts-pc.rbgkew.org.uk
+	([193.128.240.137] helo=rbgkew.org.uk ident=mt00kg)
+	by unicorn.rbgkew.org.uk with esmtp (Exim 3.16 #1)
+	id 13X5c6-000226-00
+	for cyrus-bugs+ at andrew.cmu.edu; Thu, 07 Sep 2000 18:37:26 +0100
+Sender: M.Taylor at rbgkew.org.uk
+Message-ID: <39B7D254.767CD1DC at rbgkew.org.uk>
+Date: Thu, 07 Sep 2000 18:37:24 +0100
+From: Matthew Taylor <m.taylor at rbgkew.org.uk>
+Organization: Royal Botanic Gardens,Kew
+X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686)
+X-Accept-Language: en
+MIME-Version: 1.0
+To: cyrus-bugs+ at andrew.cmu.edu
+Subject: patch to add pam support to pwcheck
+Content-Type: multipart/mixed;
+ boundary="------------5D5A22F6F4E5731441F886DF"
+
+This is a multi-part message in MIME format.
+--------------5D5A22F6F4E5731441F886DF
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+Here is a patch to add pam support to pwcheck. This was to over come a
+problems we had with some pam modules not working correctly when not run
+as root.  It also makes pwcheck fork for each connection as some pam
+modules take a while to return.
+
+--
+*Matthew Taylor:Computer section  email: M.Taylor at rbgkew.org.uk *
+* The Royal Botanic Gardens, Kew, Tel : +44 (0)181 332 5714      *
+* Richmond, Surrey, TW9 3AB, UK   Fax : +44 (0)181 332 5736      *
+
+
+
+--------------5D5A22F6F4E5731441F886DF
+Content-Type: text/plain; charset=us-ascii;
+ name="pwcheck_pam.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="pwcheck_pam.patch"
+
+diff --new-file -r -u cyrus-sasl-1.5.24/configure.in cyrus-sasl-1.5.24.new/configure.in
+--- cyrus-sasl-1.5.24/configure.in	Fri Jul 21 03:35:01 2000
++++ cyrus-sasl-1.5.24.new/configure.in	Thu Sep  7 17:45:53 2000
+@@ -306,6 +306,10 @@
+    AC_DEFINE(HAVE_PWCHECK)
+    AC_DEFINE_UNQUOTED(PWCHECKDIR, "$with_pwcheck")
+    AC_CHECK_FUNC(getspnam,PWCHECKMETH="getspnam",PWCHECKMETH="getpwnam")
++
++   if test "$with_pam" != no; then
++	PWCHECKMETH="pam"
++   fi
+    AC_SUBST(PWCHECKMETH)
+ fi
+ AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no)
+
+diff --new-file -r -u cyrus-sasl-1.5.24/pwcheck/Makefile.in cyrus-sasl-1.5.24.new/pwcheck/Makefile.in
+--- cyrus-sasl-1.5.24/pwcheck/Makefile.in	Fri Jul 21 03:36:07 2000
++++ cyrus-sasl-1.5.24.new/pwcheck/Makefile.in	Thu Sep  7 17:45:53 2000
+@@ -129,9 +129,9 @@
+ sbin_PROGRAMS = pwcheck
+ 
+ pwcheck_SOURCES = pwcheck.c
+-EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c
++EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c pwcheck_pam.c
+ pwcheck_DEPENDECIES = pwcheck_ at PWCHECKMETH@.lo
+-pwcheck_LDADD = pwcheck_ at PWCHECKMETH@.lo @LIB_CRYPT@ @LIB_SOCKET@
++pwcheck_LDADD = pwcheck_ at PWCHECKMETH@.lo @LIB_CRYPT@ @LIB_SOCKET@ @LIB_PAM@
+ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+ CONFIG_HEADER = ../config.h
+ CONFIG_CLEAN_FILES = 
+diff --new-file -r -u cyrus-sasl-1.5.24/pwcheck/pwcheck.c cyrus-sasl-1.5.24.new/pwcheck/pwcheck.c
+--- cyrus-sasl-1.5.24/pwcheck/pwcheck.c	Tue Jul 18 02:05:37 2000
++++ cyrus-sasl-1.5.24.new/pwcheck/pwcheck.c	Thu Sep  7 17:45:53 2000
+@@ -52,6 +52,28 @@
+ void newclient(int);
+ int retry_write(int, const char *, unsigned int);
+ 
++#ifdef HAVE_PAM
++#include <sys/wait.h>
++#include <signal.h>
++
++static void sigchld_handler(int sig)
++{
++  int status;
++  signal(SIGCHLD,sigchld_handler);
++  sig = sig;    /* Keep picky compilers happy */
++  wait(&status);
++  waitpid(-1,&status,WNOHANG);
++}
++
++
++
++
++
++#endif 
++
++
++
++
+ /*
+  * Unix pwcheck daemon-authenticated login (shadow password)
+  */
+@@ -68,6 +90,9 @@
+     struct sockaddr_un clientaddr;
+     int r;
+     int len;
++#ifdef HAVE_PAM
++    pid_t cpid;
++#endif
+     mode_t oldumask;
+     char *pid_file = _PATH_PWCHECKPID;
+     FILE *fp = NULL;
+@@ -177,6 +202,11 @@
+ 	exit(1);
+     }
+ 
++#ifdef HAVE_PAM
++    signal(SIGCHLD,sigchld_handler);
++#endif
++
++
+     for (;;) {
+ 	len = sizeof(clientaddr);
+ 	c = accept(s, (struct sockaddr *)&clientaddr, &len);
+@@ -184,8 +214,20 @@
+ 	    syslog(LOG_WARNING, "accept: %m");
+ 	    continue;
+ 	}
++#ifdef HAVE_PAM
++	if((cpid=fork())==0) {
++	  newclient(c);
++	  exit(0);
++	}
++	if(cpid == -1) {
++	   perror("fork");
++	}
++	close(c);
++	
++#else
+ 
+ 	newclient(c);
++#endif
+     }
+ }
+ 
+
+diff --new-file -r -u cyrus-sasl-1.5.24/pwcheck/pwcheck_pam.c cyrus-sasl-1.5.24.new/pwcheck/pwcheck_pam.c
+--- cyrus-sasl-1.5.24/pwcheck/pwcheck_pam.c	Thu Jan  1 01:00:00 1970
++++ cyrus-sasl-1.5.24.new/pwcheck/pwcheck_pam.c	Thu Sep  7 17:48:26 2000
+@@ -0,0 +1,148 @@
++/* pwcheck_pam.c -- check passwords using getpwname()
++   $Id: pwcheck-pam.patch,v 1.1 2000/09/07 18:48:55 leg Exp $
++
++Copyright 1998, 1999 Carnegie Mellon University
++
++                      All Rights Reserved
++
++Permission to use, copy, modify, and distribute this software and its
++documentation for any purpose and without fee is hereby granted,
++provided that the above copyright notice appear in all copies and that
++both that copyright notice and this permission notice appear in
++supporting documentation, and that the name of Carnegie Mellon
++University not be used in advertising or publicity pertaining to
++distribution of the software without specific, written prior
++permission.
++
++CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
++THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
++FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
++ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
++OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++******************************************************************/
++
++
++#include <stdlib.h>
++
++#include <security/pam_appl.h>
++#define SASL_OK 1
++#define SASL_NOMEM 0
++
++
++
++int _sasl_strdup(const char *in, char **out, int *outlen);
++
++struct sasl_pam_data {
++    const char *userid;
++    const char *password;
++    int pam_error;
++};
++
++static int sasl_pam_conv(int num_msg, const struct pam_message **msg,
++			 struct pam_response **resp, void *appdata_ptr)
++{
++    struct pam_response *reply = NULL;
++    struct sasl_pam_data *pd = (struct sasl_pam_data *) appdata_ptr;
++    int i;
++    int ret;
++
++    if (pd == NULL) {
++	/* solaris bug? */
++	return PAM_CONV_ERR;
++    }
++
++    reply = (struct pam_response *) malloc(sizeof(struct pam_response) * 
++					   num_msg); 
++      
++
++
++    
++
++    if (reply == NULL)
++	return PAM_CONV_ERR;
++
++    for (i = 0; i < num_msg; i++) {
++	switch (msg[i]->msg_style) {
++	    /* making the blatant assumption that echo on means user,
++	       echo off means password */
++	case PAM_PROMPT_ECHO_ON:
++	    reply[i].resp_retcode = PAM_SUCCESS;
++	    ret = _sasl_strdup(pd->userid, &reply[i].resp, NULL);
++	    if (ret != SASL_OK)
++		return PAM_CONV_ERR;
++	    break;
++	case PAM_PROMPT_ECHO_OFF:
++	    reply[i].resp_retcode = PAM_SUCCESS;
++	    ret = _sasl_strdup(pd->password, &reply[i].resp, NULL);
++	    if (ret != SASL_OK)
++		return PAM_CONV_ERR;
++	    break;
++	case PAM_TEXT_INFO:
++	case PAM_ERROR_MSG:
++	    /* ignore it, but pam still wants a NULL response... */
++	    reply[i].resp_retcode = PAM_SUCCESS;
++	    reply[i].resp = NULL;
++	    break;
++	default:		/* error! */
++	    free(reply);
++	    pd->pam_error = 1;
++	    return PAM_CONV_ERR;
++	}
++    }
++    *resp = reply;
++    return PAM_SUCCESS;
++}
++
++static struct pam_conv my_conv = {
++    &sasl_pam_conv,		/* int (*conv) */
++    NULL			/* appdata_ptr */
++};
++
++
++char *pwcheck(userid, password)
++     char *userid;
++     char *password;
++{
++  pam_handle_t *pamh;
++  struct sasl_pam_data pd;
++  int pam_error;
++
++ 
++ 
++
++  my_conv.appdata_ptr = &pd;
++
++  pd.userid = userid;
++  pd.password = password;
++  pd.pam_error = 0;
++
++  pam_error = pam_start("pwcheck", userid, &my_conv, &pamh);
++  if (pam_error != PAM_SUCCESS) {
++    return (char*)pam_strerror(pamh,pam_error);
++    
++  }
++  pam_error = pam_authenticate(pamh, PAM_SILENT);
++  if (pam_error != PAM_SUCCESS) {
++    return (char*)pam_strerror(pamh,pam_error); 
++   
++  }
++  pam_end(pamh, PAM_SUCCESS);
++
++  return "OK";    
++
++
++ 
++}
++
++/* copy a string to malloced memory */
++int _sasl_strdup(const char *in, char **out, int *outlen)
++{
++  size_t len = strlen(in);
++  if (outlen) *outlen = len;
++  *out=malloc(len + 1);
++  if (! *out) return SASL_NOMEM;
++  strcpy((char *) *out, in);
++  return SASL_OK;
++}
+
+--------------5D5A22F6F4E5731441F886DF--
+
diff --git a/contrib/saslauthd-unix.pl b/contrib/saslauthd-unix.pl
new file mode 100755
index 0000000..8f642df
--- /dev/null
+++ b/contrib/saslauthd-unix.pl
@@ -0,0 +1,63 @@
+#!/usr/local/bin/perl
+
+# $Id: saslauthd-unix.pl,v 1.2 2003/04/28 20:15:10 rjs3 Exp $
+
+# This is a sample perl script for communicating with saslauthd running
+# on a unix socket.  Simply call the function with 4 parameters and you're
+# set (userid, password, service, realm or undef)
+
+use Socket;
+use strict;
+
+sub saslauthd_verify_password {
+	my $SASLAUTHD_PATH = "/var/run/saslauthd/mux";
+
+	my $userid = shift || die "no userid";
+	my $passwd = shift || die "no password";
+	my $service = shift || die "no service";
+	my $realm = shift;
+
+	my $u_len = length $userid;
+	my $p_len = length $passwd;
+	my $s_len = length $service;
+	my $r_len = (defined($realm) ? length $realm : 0);
+
+	if($u_len + $p_len + $s_len + $r_len + 30 > 8192) {
+	    warn "request too long in saslauthd_verify_password";
+	    return undef;
+	}
+
+	my $request = pack "na".$u_len."na".$p_len."na".$s_len."na".$r_len,
+		   $u_len, $userid, $p_len, $passwd, $s_len, $service,
+		   $r_len, (defined($realm) ? $realm : "");
+
+	socket(SOCK, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!";
+	connect(SOCK, sockaddr_un($SASLAUTHD_PATH)) || die "connect: $!";
+	
+	my $len = length $request;
+	my $offset = 0;
+	while($len) {
+	    my $written = syswrite SOCK, $request, $len, $offset;
+	    die "System write error: $!\n" unless defined $written;
+	    $len -= $written;
+	    $offset += $written;
+	}
+
+	# Read back reply
+	my $buf;
+	$len = sysread SOCK, $buf, 8192;
+	die "System read error: $!\n" unless defined $len;
+
+	my $response;
+	my $size = unpack("n", $buf);
+
+	die "Bad saslauthd response" unless defined $size;
+	($size, $response) = unpack("na".$size, $buf);
+
+	if($response =~ /^OK/) {
+	    return 1;
+	} else {
+	    return 0;
+	}	
+}
+
diff --git a/contrib/securid.patches b/contrib/securid.patches
new file mode 100644
index 0000000..e331c0f
--- /dev/null
+++ b/contrib/securid.patches
@@ -0,0 +1,151 @@
+Index: configure.in
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/sasl/configure.in,v
+retrieving revision 1.125
+diff -c -r1.125 configure.in
+*** configure.in	2002/02/11 15:43:34	1.125
+--- configure.in	2002/03/07 14:38:31
+***************
+*** 449,454 ****
+--- 449,504 ----
+    AC_MSG_RESULT(disabled)
+  fi
+  
++ dnl
++ dnl SECURID
++ dnl
++ 
++ dnl Test for ACE (required for SecurID)
++ AC_ARG_WITH(with-ace,[  --with-ace=PATH         use ACE from PATH],
++ 	with_ace="${withval}")
++ 
++ case "$with_ace" in
++ 	""|yes) 
++ 		AC_CHECK_LIB(sdiclient, sd_init,
++ 			AC_CHECK_HEADER(sdi_defs.h, with_ace="yes",
++ 					with_ace="no"),
++ 			with_ace="no")
++ 		;;
++ 	*)
++ 		if test -d $with_ace; then
++ 		  CPPFLAGS="${CPPFLAGS} -I${with_ace}"
++ 		  LDFLAGS="${LDFLAGS} -L${with_ace}"
++ 		else
++ 		  with_ace="no"
++ 		fi
++ 		;;
++ esac
++ 
++ AC_MSG_CHECKING(for ACE)
++ AC_MSG_RESULT($with_ace)
++ 
++ AC_ARG_ENABLE(securid, [  --enable-securid        enable SECURID authentication [no] ],
++   securid=$enableval,
++   securid=no)
++ 
++ if test "$with_ace" = no; then
++   AC_WARN([ACE not found -- SecurID will be disabled])
++   securid=no
++ fi
++ 
++ AC_MSG_CHECKING(SECURID)
++ if test "$securid" != no; then
++   AC_MSG_RESULT(enabled)
++   SECURID_LIBS="-lsdiclient"
++ 
++   SASL_MECHS="$SASL_MECHS libsecurid.la"
++   SASL_STATIC_OBJS="$SASL_STATIC_OBJS ../plugins/securid.o"
++   AC_DEFINE(STATIC_SECURID)
++   AC_SUBST(SECURID_LIBS)
++ else
++   AC_MSG_RESULT(disabled)
++ fi
++ 
+  SASL_KERBEROS_V4_CHK
+  SASL_GSSAPI_CHK
+  SASL_PLAIN_CHK
+Index: plugins/Makefile.am
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/sasl/plugins/Makefile.am,v
+retrieving revision 1.45
+diff -c -r1.45 Makefile.am
+*** Makefile.am	2002/02/05 00:25:53	1.45
+--- Makefile.am	2002/03/07 14:38:37
+***************
+*** 56,61 ****
+--- 56,62 ----
+  sasldb_version = 2:1:0
+  srp_version = 2:1:0
+  otp_version = 2:1:0
++ securid_version = 2:1:0
+  
+  INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib
+  LDFLAGS = @LDFLAGS@ -module -export-dynamic -rpath $(plugindir)
+***************
+*** 73,79 ****
+  sasl_LTLIBRARIES = @SASL_MECHS@
+  EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
+  	libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
+! 	libsasldb.la
+  
+  libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
+  libplain_la_LDFLAGS = -version-info $(plain_version)
+--- 74,80 ----
+  sasl_LTLIBRARIES = @SASL_MECHS@
+  EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
+  	libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
+! 	libsecurid.la libsasldb.la
+  
+  libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
+  libplain_la_LDFLAGS = -version-info $(plain_version)
+***************
+*** 120,125 ****
+--- 121,131 ----
+  libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
+  libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
+  
++ libsecurid_la_SOURCES = securid.c securid_init.c securid.h $(common_sources)
++ libsecurid_la_LDFLAGS = -version-info $(securid_version)
++ libsecurid_la_DEPENDENCIES = $(COMPAT_OBJS)
++ libsecurid_la_LIBADD = $(SECURID_LIBS) $(COMPAT_OBJS)
++ 
+  # Auxprop Plugins
+  libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
+  libsasldb_la_LDFLAGS = -version-info $(sasldb_version)
+***************
+*** 129,135 ****
+  # Instructions for making the _init files
+  
+  init_src=anonymous_init.c crammd5_init.c digestmd5_init.c gssapiv2_init.c \
+! kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c sasldb_init.c
+  
+  CLEANFILES=$(init_src)
+  
+--- 135,142 ----
+  # Instructions for making the _init files
+  
+  init_src=anonymous_init.c crammd5_init.c digestmd5_init.c gssapiv2_init.c \
+! kerberos4_init.c login_init.c plain_init.c srp_init.c srp_otp.c \
+! securid_init.c sasldb_init.c
+  
+  CLEANFILES=$(init_src)
+  
+Index: plugins/makeinit.sh
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/sasl/plugins/makeinit.sh,v
+retrieving revision 1.2
+diff -c -r1.2 makeinit.sh
+*** makeinit.sh	2001/12/04 02:06:48	1.2
+--- makeinit.sh	2002/03/07 14:38:37
+***************
+*** 1,4 ****
+! for mech in anonymous crammd5 digestmd5 gssapiv2 kerberos4 login plain srp otp; do
+  
+  echo "
+  #include <string.h>
+--- 1,5 ----
+! for mech in anonymous crammd5 digestmd5 gssapiv2 kerberos4 login plain \
+!     srp otp securid; do
+  
+  echo "
+  #include <string.h>
diff --git a/contrib/stripplus_canonuser.patch b/contrib/stripplus_canonuser.patch
new file mode 100644
index 0000000..a3bc9f4
--- /dev/null
+++ b/contrib/stripplus_canonuser.patch
@@ -0,0 +1,315 @@
+Index: configure.in
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/sasl/configure.in,v
+retrieving revision 1.192
+diff -u -r1.192 configure.in
+--- configure.in	16 Mar 2004 21:52:01 -0000	1.192
++++ configure.in	7 May 2004 17:17:03 -0000
+@@ -713,6 +713,23 @@
+ 	AC_DEFINE(DO_DLOPEN,[],[Should we build a shared plugin (via dlopen) library?])
+ fi
+ 
++dnl STRIPPLUS
++AC_ARG_ENABLE(stripplus, [  --enable-stripplus      enable STRIPPLUS user canonification [[no]] ],
++  stripplus=$enableval,
++  stripplus=no)
++
++AC_MSG_CHECKING(STRIPPLUS)
++if test "$stripplus" != no; then
++  AC_MSG_RESULT(enabled)
++  SASL_MECHS="$SASL_MECHS libstripplus.la"
++  if test "$enable_static" = yes; then
++    SASL_STATIC_OBJS="$SASL_STATIC_OBJS ../plugins/stripplus.o"
++    AC_DEFINE(STATIC_STRIPPLUS, [], [Link STRIPPLUS Staticly])
++  fi
++else
++  AC_MSG_RESULT(disabled)
++fi
++
+ AC_SUBST(SASL_MECHS)
+ AC_SUBST(SASL_STATIC_OBJS)
+ AC_SUBST(SASL_STATIC_LIBS)
+Index: plugins/Makefile.am
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/sasl/plugins/Makefile.am,v
+retrieving revision 1.70
+diff -u -r1.70 Makefile.am
+--- plugins/Makefile.am	9 Mar 2004 16:54:18 -0000	1.70
++++ plugins/Makefile.am	7 May 2004 17:17:10 -0000
+@@ -58,6 +58,7 @@
+ otp_version = 2:18:0
+ sql_version = 2:18:0
+ srp_version = 2:18:0
++stripplus_version = 2:18:0
+ 
+ INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
+ AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir)
+@@ -77,7 +78,7 @@
+ sasl_LTLIBRARIES = @SASL_MECHS@
+ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
+ 	libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
+-	libntlm.la libsasldb.la libsql.la
++	libntlm.la libsasldb.la libsql.la libstripplus.la
+ 
+ libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
+ libplain_la_LDFLAGS = -version-info $(plain_version)
+@@ -140,12 +141,18 @@
+ libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
+ libsql_la_LIBADD = $(COMPAT_OBJS)
+ 
++# Canonuser Plugins
++libstripplus_la_SOURCES = stripplus.c stripplus_init.c $(common_sources)
++libstripplus_la_LDFLAGS = -version-info $(stripplus_version)
++libstripplus_la_DEPENDENCIES = $(COMPAT_OBJS)
++libstripplus_la_LIBADD = $(COMPAT_OBJS)
++
+ 
+ # Instructions for making the _init files
+ 
+ init_src=anonymous_init.c crammd5_init.c digestmd5_init.c gssapiv2_init.c \
+ kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
+-sasldb_init.c sql_init.c
++sasldb_init.c sql_init.c stripplus_init.c
+ 
+ 
+ CLEANFILES=$(init_src)
+Index: plugins/makeinit.sh
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/sasl/plugins/makeinit.sh,v
+retrieving revision 1.8
+diff -u -r1.8 makeinit.sh
+--- plugins/makeinit.sh	15 Jul 2003 17:38:59 -0000	1.8
++++ plugins/makeinit.sh	7 May 2004 17:17:10 -0000
+@@ -87,3 +87,46 @@
+ " > ${mech}_init.c
+ done
+ 
++
++for mech in stripplus ; do
++
++echo "
++#include <config.h>
++
++#include <string.h>
++#include <stdlib.h>
++#include <stdio.h>
++#ifndef macintosh
++#include <sys/stat.h>
++#endif
++#include <fcntl.h>
++#include <assert.h>
++
++#include <sasl.h>
++#include <saslplug.h>
++#include <saslutil.h>
++
++#include \"plugin_common.h\"
++
++#ifdef WIN32
++BOOL APIENTRY DllMain( HANDLE hModule, 
++                       DWORD  ul_reason_for_call, 
++                       LPVOID lpReserved
++					 )
++{
++    switch (ul_reason_for_call)
++	{
++		case DLL_PROCESS_ATTACH:
++		case DLL_THREAD_ATTACH:
++		case DLL_THREAD_DETACH:
++		case DLL_PROCESS_DETACH:
++			break;
++    }
++    return TRUE;
++}
++#endif
++
++SASL_CANONUSER_PLUG_INIT( $mech )
++" > ${mech}_init.c
++done
++
+Index: plugins/stripplus.c
+===================================================================
+RCS file: plugins/stripplus.c
+diff -N plugins/stripplus.c
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ plugins/stripplus.c	7 May 2004 17:17:10 -0000
+@@ -0,0 +1,179 @@
++/* stripplus.c - user canonicalization plugin which strips any plus content
++ * Ken Murchison
++ * $Id: stripplus_canonuser.patch,v 1.1 2004/05/07 17:26:57 ken3 Exp $
++ */
++/* 
++ * Copyright (c) 1998-2004 Carnegie Mellon University.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer. 
++ *
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in
++ *    the documentation and/or other materials provided with the
++ *    distribution.
++ *
++ * 3. The name "Carnegie Mellon University" must not be used to
++ *    endorse or promote products derived from this software without
++ *    prior written permission. For permission or any other legal
++ *    details, please contact  
++ *      Office of Technology Transfer
++ *      Carnegie Mellon University
++ *      5000 Forbes Avenue
++ *      Pittsburgh, PA  15213-3890
++ *      (412) 268-4387, fax: (412) 268-7395
++ *      tech-transfer at andrew.cmu.edu
++ *
++ * 4. Redistributions of any form whatsoever must retain the following
++ *    acknowledgment:
++ *    "This product includes software developed by Computing Services
++ *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
++ *
++ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
++ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include <config.h>
++#include <string.h>
++#include <ctype.h>
++#include <stdio.h>
++
++#include <sasl.h>
++#include <saslplug.h>
++
++#ifdef MIN
++#undef MIN
++#endif
++#define MIN(a,b) (((a) < (b))? (a):(b))
++
++/*
++ * This plugin is a straight port of the INTERNAL canonuser plugin.
++ * It functions identical to to INTERNAL, but also strips any +detail
++ * in the auth[z]id.
++ */
++static int _canonuser_stripplus(const sasl_utils_t *utils,
++				const char *user, unsigned ulen,
++				const char *user_realm,
++				unsigned flags __attribute__((unused)),
++				char *out_user,
++				unsigned out_umax, unsigned *out_ulen) 
++{
++    unsigned i;
++    char *in_buf, *userin, *p;
++    const char *begin_u;
++    size_t u_apprealm = 0;
++
++    if(!utils || !user) return SASL_BADPARAM;
++
++    in_buf = utils->malloc((ulen + 2) * sizeof(char));
++    if(!in_buf) return SASL_NOMEM;
++
++    userin = in_buf;
++
++    memcpy(userin, user, ulen);
++    userin[ulen] = '\0';
++    
++    /* Strip User ID */
++    for(i=0;isspace((int)userin[i]) && i<ulen;i++);
++    begin_u = &(userin[i]);
++    if(i>0) ulen -= i;
++
++    for(;ulen > 0 && isspace((int)begin_u[ulen-1]); ulen--);
++    if(begin_u == &(userin[ulen])) {
++	utils->free(in_buf);
++	utils->seterror(utils->conn, 0, "All-whitespace username.");
++	return SASL_FAIL;
++    }
++
++    /* Need to append realm if necessary (see sasl.h) */
++    if(user_realm && !strchr(user, '@')) {
++	u_apprealm = strlen(user_realm) + 1;
++    }
++
++    /* Now Copy */
++    memcpy(out_user, begin_u, MIN(ulen, out_umax));
++    if(u_apprealm) {
++	if(ulen >= out_umax) return SASL_BUFOVER;
++	out_user[ulen] = '@';
++	memcpy(&(out_user[ulen+1]), user_realm,
++	       MIN(u_apprealm-1, out_umax-ulen-1));
++    }
++    out_user[MIN(ulen + u_apprealm,out_umax)] = '\0';
++
++    /* Strip any plus content */
++    if ((p = strchr(out_user, '+'))) {
++	size_t n = strcspn(p, "@");
++	memmove(p, p+n, strlen(p+n)+1);
++	ulen -= n;
++    }
++
++    if(ulen + u_apprealm > out_umax) return SASL_BUFOVER;
++
++    if(out_ulen) *out_ulen = MIN(ulen + u_apprealm,out_umax);
++    
++    utils->free(in_buf);
++    return SASL_OK;
++}
++
++static int _cu_stripplus_server(void *glob_context __attribute__((unused)),
++				sasl_server_params_t *sparams,
++				const char *user, unsigned ulen,
++				unsigned flags,
++				char *out_user,
++				unsigned out_umax, unsigned *out_ulen) 
++{
++    return _canonuser_stripplus(sparams->utils,
++				user, ulen, sparams->user_realm,
++				flags, out_user, out_umax, out_ulen);
++}
++
++static int _cu_stripplus_client(void *glob_context __attribute__((unused)),
++				sasl_client_params_t *cparams,
++				const char *user, unsigned ulen,
++				unsigned flags,
++				char *out_user,
++				unsigned out_umax, unsigned *out_ulen) 
++{
++    return _canonuser_stripplus(cparams->utils,
++				user, ulen, NULL,
++				flags, out_user, out_umax, out_ulen);
++}
++
++static sasl_canonuser_plug_t canonuser_stripplus_plugin = {
++        0, /* features */
++	0, /* spare */
++	NULL, /* glob_context */
++	"STRIPPLUS", /* name */
++	NULL, /* canon_user_free */
++	_cu_stripplus_server,
++	_cu_stripplus_client,
++	NULL,
++	NULL,
++	NULL
++};
++
++int stripplus_canonuser_plug_init(const sasl_utils_t *utils __attribute__((unused)),
++				  int max_version,
++				  int *out_version,
++				  sasl_canonuser_plug_t **plug,
++				  const char *plugname __attribute__((unused))) 
++{
++    if(!out_version || !plug) return SASL_BADPARAM;
++
++    if(max_version < SASL_CANONUSER_PLUG_VERSION) return SASL_BADVERS;
++    
++    *out_version = SASL_CANONUSER_PLUG_VERSION;
++
++    *plug = &canonuser_stripplus_plugin;
++
++    return SASL_OK;
++}
diff --git a/contrib/tclsasl/README b/contrib/tclsasl/README
new file mode 100644
index 0000000..e115dea
--- /dev/null
+++ b/contrib/tclsasl/README
@@ -0,0 +1,7 @@
+This is the TCL SASL extentions, contributed by Marshall Rose
+<mrose at dbc.mtview.ca.us>
+
+For the most up to date version please see:
+
+http://beepcore-tcl.sourceforge.net/tclsasl.html
+
diff --git a/contrib/tclsasl/doc/tclsasl.html b/contrib/tclsasl/doc/tclsasl.html
new file mode 100644
index 0000000..dbda79e
--- /dev/null
+++ b/contrib/tclsasl/doc/tclsasl.html
@@ -0,0 +1,1576 @@
+<html><head><title>Tcl SASL</title>
+<meta http-equiv="Expires" content="Sun, 20 Jan 2002 23:35:28 +0000">
+<STYLE type='text/css'>
+    .title { color: #990000; font-size: 22px; line-height: 22px; font-weight: bold; text-align: right;
+             font-family: helvetica, arial, sans-serif }
+    .filename { color: #666666; font-size: 18px; line-height: 28px; font-weight: bold; text-align: right;
+                  font-family: helvetica, arial, sans-serif }
+    p.copyright { color: #000000; font-size: 10px;
+                  font-family: verdana, charcoal, helvetica, arial, sans-serif }
+    p { margin-left: 2em; margin-right: 2em; }
+    li { margin-left: 3em;  }
+    ol { margin-left: 2em; margin-right: 2em; }
+    ul.text { margin-left: 2em; margin-right: 2em; }
+    pre { margin-left: 3em; color: #333333 }
+    ul.toc { color: #000000; line-height: 16px;
+             font-family: verdana, charcoal, helvetica, arial, sans-serif }
+    H3 { color: #333333; font-size: 16px; line-height: 16px; font-family: helvetica, arial, sans-serif }
+    H4 { color: #000000; font-size: 14px; font-family: helvetica, arial, sans-serif }
+    TD.header { color: #ffffff; font-size: 10px; font-family: arial, helvetica, san-serif; valign: top }
+    TD.author-text { color: #000000; font-size: 10px;
+                     font-family: verdana, charcoal, helvetica, arial, sans-serif }
+    TD.author { color: #000000; font-weight: bold; margin-left: 4em; font-size: 10px; font-family: verdana, charcoal, helvetica, arial, sans-serif }
+    A:link { color: #990000; font-size: 10px; text-transform: uppercase; font-weight: bold;
+             font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
+    A:visited { color: #333333; font-weight: bold; font-size: 10px; text-transform: uppercase;
+                font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
+    A:name { color: #333333; font-weight: bold; font-size: 10px; text-transform: uppercase;
+             font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
+    .link2 { color:#ffffff; font-weight: bold; text-decoration: none;
+             font-family: monaco, charcoal, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
+             font-size: 9px }
+    .RFC { color:#666666; font-weight: bold; text-decoration: none;
+           font-family: monaco, charcoal, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
+           font-size: 9px }
+    .hotText { color:#ffffff; font-weight: normal; text-decoration: none;
+               font-family: charcoal, monaco, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
+               font-size: 9px }
+</style>
+</head>
+<body bgcolor="#ffffff" text="#000000" alink="#000000" vlink="#666666" link="#990000">
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<table width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table width="100%" border="0" cellpadding="2" cellspacing="1">
+<tr valign="top"><td width="33%" bgcolor="#666666" class="header"> </td><td width="33%" bgcolor="#666666" class="header">M. Rose</td></tr>
+<tr valign="top"><td width="33%" bgcolor="#666666" class="header"> </td><td width="33%" bgcolor="#666666" class="header">Dover Beach Consulting, Inc.</td></tr>
+<tr valign="top"><td width="33%" bgcolor="#666666" class="header"> </td><td width="33%" bgcolor="#666666" class="header">January 20, 2002</td></tr>
+</table></td></tr></table>
+<div align="right"><font face="monaco, MS Sans Serif" color="#990000" size="+3"><b><br><span class="title">Tcl SASL</span></b></font></div>
+<font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<h3>Abstract</h3>
+
+<p>
+Tcl SASL provides a Tcl interface to the Cyrus SASLv2
+library.
+</p>
+<a name="toc"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>Table of Contents</h3>
+<ul compact class="toc">
+<b><a href="#anchor1">1.</a> 
+SYNOPSIS<br></b>
+<b><a href="#anchor2">1.1</a> 
+Installation<br></b>
+<b><a href="#anchor3">2.</a> 
+CONVENTIONS<br></b>
+<b><a href="#anchor4">2.1</a> 
+Return Codes<br></b>
+<b><a href="#anchor5">2.2</a> 
+Data Types<br></b>
+<b><a href="#anchor6">2.3</a> 
+Interactions<br></b>
+<b><a href="#anchor7">2.4</a> 
+Callbacks<br></b>
+<b><a href="#anchor8">2.4.1</a> 
+Client/Server callbacks<br></b>
+<b><a href="#anchor9">2.4.2</a> 
+Client-only callbacks<br></b>
+<b><a href="#anchor10">2.4.3</a> 
+Server-only callbacks<br></b>
+<b><a href="#anchor11">3.</a> 
+PROCEDURES<br></b>
+<b><a href="#anchor12">3.1</a> 
+Server-only calls<br></b>
+<b><a href="#anchor13">3.2</a> 
+Client-only calls<br></b>
+<b><a href="#anchor14">3.3</a> 
+Client/Server calls<br></b>
+<b><a href="#anchor15">3.4</a> 
+Miscellaneous calls<br></b>
+<b><a href="#anchor16">4.</a> 
+EXAMPLES<br></b>
+<b><a href="#anchor17">4.1</a> 
+Server<br></b>
+<b><a href="#anchor18">4.2</a> 
+Client<br></b>
+<b><a href="#rfc.references1">§</a> 
+References<br></b>
+<b><a href="#rfc.authors">§</a> 
+Author's Address<br></b>
+<b><a href="#anchor19">A.</a> 
+TODO List<br></b>
+<b><a href="#anchor20">B.</a> 
+Copyrights<br></b>
+<b><a href="#rfc.index">§</a> 
+Index<br></b>
+</ul>
+<br clear="all">
+
+<a name="anchor1"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>1. SYNOPSIS</h3>
+</font><pre>
+    package provide sasl 2.0
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Tcl SASL provides a Tcl interface to the
+<a href="http://asg.web.cmu.edu/sasl/">Cyrus SASLv2 library</a>.
+</p>
+
+<p>
+This document won't tell you what 
+<a href="#RFC2222">SASL</a>[1] is.
+What it will tell you,
+the Tcl programmer,
+is how you can access the Cyrus SASLv2 library from your Tcl script.
+</p>
+
+<h4><a name="anchor2">1.1</a> Installation</h4>
+
+<p>
+First,
+you'll need to have 
+<a href="http://www.scriptics.com/software/tcltk/downloadnow83.tml">Tcl 8.3</a>
+(or later) already installed.
+</p>
+</font><pre>
+    ./configure ... --with-tcl=...
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<a name="anchor3"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>2. CONVENTIONS</h3>
+
+<h4><a name="anchor4">2.1</a> Return Codes</h4>
+
+<p>
+If an exception occurs in a Cyrus SASL library function,
+an error is thrown and the <b>errorCode</b> global is set to a list
+containing four elements:
+
+<ul class="text">
+
+<li>
+the literal string <b>"SASL"</b>;
+</li>
+
+<li>
+a string naming the Cyrus SASL library function that failed;
+</li>
+
+<li>
+an integer identifying the Cyrus SASL result code that was returned;
+and,
+</li>
+
+<li>
+a string containing the associated diagnostic.
+</li>
+
+</ul>
+<p>
+
+</p>
+
+<p>
+In addition to the usual "normal" return,
+four routines
+(<a href="#server_start">sasl::server_start</a>,
+<a href="#server_step">sasl::server_step</a>,
+<a href="#client_start">sasl::client_start</a>, and
+<a href="#client_step">sasl::client_step</a>)
+may also use the "continue" return.
+This occurs when the corresponding Cyrus SASL library function returns
+<b>SASL_CONTINUE</b>.
+</p>
+
+<h4><a name="anchor5">2.2</a> Data Types</h4>
+
+<p>
+A serialized array is a list that contains an series of keywords
+and values.
+</p>
+
+<p>
+A serialized array can be traversed using <b>foreach</b>,
+e.g.,
+</p>
+</font><pre>
+    foreach {k v} $aList {
+        puts stdout "$k has value $v"
+    }
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Alternatively,
+an array can be initialized and accessed,
+e.g.,
+</p>
+</font><pre>
+    array set data $aList
+    if {[info exists data(plugin)]} {
+        puts stdout "plugin entry is present"
+    }
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Several routines accept serialized arrays as arguments.
+In particular,
+the Cyrus SASL security properties is expressed as a serialized array
+with these elements:
+
+<ul class="text">
+
+<li>
+min_ssf
+</li>
+
+<li>
+max_ssf
+</li>
+
+<li>
+max_bufsize
+</li>
+
+<li>
+flags
+</li>
+
+</ul>
+<p>
+
+With the exception of <b>flags</b>,
+each of these takes an integer value.
+The <b>flags</b> entry takes a list value.
+To find out what flags are known,
+try <b>sasl::info sec_flags</b>.
+</p>
+
+<h4><a name="anchor6">2.3</a> Interactions</h4>
+
+<p>
+Two routines
+(<a href="#client_start">sasl::client_start</a> and
+<a href="#client_step">sasl::client_step</a>)
+have an optional <b>-interact</b> switch that takes a script argument.
+</p>
+
+<p>
+When evaluated,
+the script is given one argument,
+a serialized array.
+At a minimum,
+the <b>id</b> element is present in the serialized array.
+Optionally,
+three other elements
+(<b>challenge</b>, <b>prompt</b>, and <b>default</b>)
+may also be present.
+</p>
+
+<p>
+If the script makes a normal return,
+the return value is supplied to the Cyrus SASL library.
+</p>
+
+<h4><a name="anchor7">2.4</a> Callbacks</h4>
+
+<p>
+Four routines
+(<a href="#server_init">sasl::server_init</a>,
+<a href="#server_new">sasl::server_new</a>,
+<a href="#client_init">sasl::client_init</a>, and
+<a href="#client_new">sasl::client_new</a>)
+have a <b>-callbacks</b> switch that takes a list argument.
+Each element of the list is either:
+
+<ul class="text">
+
+<li>
+the name of a callback; or,
+</li>
+
+<li>
+a list containing two elements,
+the name of a callback and a script.
+</li>
+
+</ul>
+<p>
+
+The former case is used by clients to tell the Cyrus SASL library
+what information may be determined using an interaction.
+Otherwise,
+the supplied script is evaluated to get the indicated information.
+</p>
+
+<p>
+In this latter case,
+the script is given one argument,
+a serialized array containing callback-specific elements.
+</p>
+
+<h4><a name="anchor8">2.4.1</a> Client/Server callbacks</h4>
+
+<p>
+
+<blockquote class="text"><dl>
+
+<dt>getopt:</dt>
+<dd>
+<a name="anchor21"></a>
+Returns a string.
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+?plugin?
+</li>
+
+<li>
+option
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+<dt>log:</dt>
+<dd>
+<a name="anchor22"></a>
+Elements:
+
+<ul class="text">
+
+<li>
+level
+</li>
+
+<li>
+message
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+<dt>getpath:</dt>
+<dd>
+<a name="anchor23"></a>
+Returns a string.
+<br>
+
+Elements: none.
+<br>
+<br>
+
+</dd>
+
+<dt>verifyfile:</dt>
+<dd>
+<a name="anchor24"></a>
+Returns an integer (a SASL result code),
+either 0 (<b>SASL_OK</b>), 1 (<b>SASL_CONTINUE</b>), or -1 (<b>SASL_FAIL</b>).
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+file
+</li>
+
+<li>
+type
+</li>
+
+</ul>
+<p>
+
+To find out what types are known,
+try <b>sasl::info verify_types</b>.
+</dd>
+
+</dl></blockquote>
+<p>
+
+</p>
+
+<h4><a name="anchor9">2.4.2</a> Client-only callbacks</h4>
+
+<p>
+
+<blockquote class="text"><dl>
+
+<dt>user:</dt>
+<dd>
+<a name="anchor25"></a>
+Returns a string.
+<br>
+
+Elements: id
+<br>
+<br>
+
+</dd>
+
+<dt>authname:</dt>
+<dd>
+<a name="anchor26"></a>
+Returns a string.
+<br>
+
+Elements: id
+<br>
+<br>
+
+</dd>
+
+<dt>language:</dt>
+<dd>
+<a name="anchor27"></a>
+Returns a string.
+<br>
+
+Elements: id
+<br>
+<br>
+
+</dd>
+
+<dt>cnonce:</dt>
+<dd>
+<a name="anchor28"></a>
+Returns a string.
+<br>
+
+Elements: id
+<br>
+<br>
+
+</dd>
+
+<dt>pass:</dt>
+<dd>
+<a name="anchor29"></a>
+Returns a string.
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+token (a client token)
+</li>
+
+<li>
+id
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+<dt>?no?echoprompt:</dt>
+<dd>
+<a name="anchor30"></a><a name="anchor31"></a>
+Returns a string.
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+id
+</li>
+
+<li>
+challenge
+</li>
+
+<li>
+prompt
+</li>
+
+<li>
+default
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+<dt>getrealm:</dt>
+<dd>
+<a name="anchor32"></a>
+Returns a string.
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+id
+</li>
+
+<li>
+?available? (a list of possible choices)
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+</dl></blockquote>
+<p>
+
+</p>
+
+<h4><a name="anchor10">2.4.3</a> Server-only callbacks</h4>
+
+<p>
+
+<blockquote class="text"><dl>
+
+<dt>proxy:</dt>
+<dd>
+<a name="anchor33"></a>
+Returns an integer (a SASL result code),
+usually either 0 (<b>SASL_OK</b>), or -14 (<b>SASL_NOAUTHZ</b>).
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+token (a server token)
+</li>
+
+<li>
+target
+</li>
+
+<li>
+user
+</li>
+
+<li>
+?realm?
+</li>
+
+<li>
+?propctx? (a propctx token)
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+<dt>checkpass:</dt>
+<dd>
+<a name="anchor34"></a>
+Returns an integer (a SASL result code).
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+token (a server token)
+</li>
+
+<li>
+user
+</li>
+
+<li>
+pass
+</li>
+
+<li>
+?propctx? (a propctx token)
+</li>
+
+</ul>
+<p>
+
+</dd>
+
+<dt>setpass:</dt>
+<dd>
+<a name="anchor35"></a>
+Returns an integer (a SASL result code).
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+token (a server token)
+</li>
+
+<li>
+user
+</li>
+
+<li>
+pass
+</li>
+
+<li>
+flags
+</li>
+
+<li>
+?propctx? (a propctx token)
+</li>
+
+</ul>
+<p>
+
+To find out what flags are known,
+try <b>sasl::info setpass_flags</b>.
+<br>
+<br>
+
+</dd>
+
+<dt>canonuser:</dt>
+<dd>
+<a name="anchor36"></a>
+Returns a string.
+<br>
+
+Elements:
+
+<ul class="text">
+
+<li>
+token (a server token)
+</li>
+
+<li>
+in
+</li>
+
+<li>
+?realm?
+</li>
+
+<li>
+outmax
+</li>
+
+<li>
+flags
+</li>
+
+</ul>
+<p>
+
+To find out what flags are known,
+try <b>sasl::info canon_flags</b>.
+</dd>
+
+</dl></blockquote>
+<p>
+
+</p>
+
+<a name="anchor11"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>3. PROCEDURES</h3>
+
+<h4><a name="anchor12">3.1</a> Server-only calls</h4>
+
+<p>
+The calling sequence is:
+
+<ol class="text">
+
+<li>
+Invoke <a href="#server_init">sasl::server_init</a> to load
+plugins.
+</li>
+
+<li>
+On each incoming connection,
+invoke <a href="#server_new">sasl::server_new</a> to get a
+server token.
+</li>
+
+<li>
+Invoke <a href="#setprop">$token -operation setprop</a> to
+set the security properties for the connection.
+</li>
+
+<li>
+Invoke <a href="#server_list">$token -operation list</a> to
+get the list of mechanisms to send to the client.
+</li>
+
+<li>
+When client selects a mechanism,
+invoke <a href="#server_start">$token -operation start</a>,
+and go to Step 7.
+</li>
+
+<li>
+Invoke <a href="#server_step">$token -operation step</a>.
+</li>
+
+<li>
+Look at the result:
+
+<blockquote class="text"><dl>
+
+<dt>normal return:</dt>
+<dd>
+Tell the client it's successful and goto
+Step 8.
+</dd>
+
+<dt>continue return:</dt>
+<dd>
+Send the result to the client,
+wait for more input,
+and goto Step 6.
+</dd>
+
+<dt>error return:</dt>
+<dd>
+Tell the client it loses and abort.
+</dd>
+
+</dl></blockquote>
+<p>
+
+</li>
+
+<li>
+Invoke <a href="#getprop">$token -operation getprop</a> to
+get the new security properties for the connection.
+</li>
+
+</ol>
+<p>
+
+Now, let's look at the actual procedures.
+</p>
+<a name="server_init"></a>
+
+<p>
+<a name="anchor37"></a>
+</p>
+</font><pre>sasl::server_init     \
+    -callbacks list   \
+   ?-appname   string?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Initialize server-side code,
+supplying default <b>-callbacks</b> and an <b>-appname</b> for logging.
+</p>
+<a name="server_new"></a>
+
+<p>
+<a name="anchor38"></a>
+</p>
+</font><pre>sasl::server_new          \
+    -service      string  \
+   ?-serverFQDN   string? \
+   ?-realm        string? \
+   ?-iplocalport  string? \
+   ?-ipremoteport string? \
+   ?-callbacks    script? \
+   ?-flags        list?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a "server token" for a single SASL connection,
+supplying the registered name of the <b>-service</b>.
+To find out what flags are known,
+try <b>sasl::info servernew_flags</b>.
+
+</p>
+<a name="server_list"></a>
+
+<p>
+<a name="anchor39"></a>
+</p>
+</font><pre>$token -operation list    \
+      ?-user      string?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a list of mechanisms available to the server.
+</p>
+<a name="server_start"></a>
+
+<p>
+<a name="anchor40"></a>
+</p>
+</font><pre>$token -operation start   \
+       -mechanism string  \
+       ?-input    string?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Start a <b>-mechanism</b>
+(optionally, with an <b>-input</b> string from the client),
+returning an output string for the client.
+</p>
+<a name="server_step"></a>
+
+<p>
+<a name="anchor41"></a>
+</p>
+</font><pre>$token -operation step   \
+       -input     string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Perform another exchange,
+taking an <b>input</b> string from the client,
+returning an output string for the client.
+</p>
+
+<p>
+<a name="anchor42"></a>
+</p>
+</font><pre>$token -operation checkpass \
+       -user      string    \
+       -pass      string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Determine if a plaintext password is valid;
+if not, throw an error.
+</p>
+
+<p>
+<a name="anchor43"></a>
+</p>
+</font><pre>$token -operation userexists \
+       -server    string     \
+      ?-realm     string?    \
+       -user      string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Determine if a user exists;
+it not, throw an error.
+</p>
+
+<p>
+<a name="anchor44"></a>
+</p>
+</font><pre>$token -operation setpass \
+       -user      string  \
+      ?-newpass   string? \
+      ?-oldpass   string? \
+      ?-flags     list?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Set the password for a user;
+on failure, throw an error.
+To find out what flags are known,
+try <b>sasl::info setpass_flags</b>.
+</p>
+
+<p>
+<a name="anchor45"></a>
+</p>
+</font><pre>$token -operation   auxprop_request \
+       ?-properties list?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Request a set of auxiliary <b>-properties</b>
+(or reset the list if this switch is absent);
+on failure,
+throw an error.
+</p>
+
+<p>
+<a name="anchor46"></a>
+</p>
+</font><pre>$token -operation auxprop_getctx
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a "propctx token" containing the current auxiliary
+properties.
+</p>
+
+<h4><a name="anchor13">3.2</a> Client-only calls</h4>
+
+<p>
+The calling sequence is:
+
+<ol class="text">
+
+<li>
+Invoke <a href="#client_init">sasl::client_init</a> to load
+plugins.
+</li>
+
+<li>
+On each outgoing connection,
+invoke <a href="#client_new">sasl::client_new</a> to get a
+client token.
+</li>
+
+<li>
+Invoke <a href="#setprop">$token -operation setprop</a> to
+set the security properties for the connection.
+</li>
+
+<li>
+When the server indicates which mechanisms are available
+invoke <a href="#client_start">$token -operation start</a>,
+and go to Step 6.
+</li>
+
+<li>
+Invoke <a href="#client_step">$token -operation step</a>.
+</li>
+
+<li>
+Look at the result:
+
+<blockquote class="text"><dl>
+
+<dt>normal return:</dt>
+<dd>
+If the result is empty, goto Step 8;
+otherwise, send the result to the server and goto Step 7
+</dd>
+
+<dt>continue return:</dt>
+<dd>
+Send the result to the server,
+wait for more input,
+and goto Step 5.
+</dd>
+
+<dt>error return:</dt>
+<dd>
+You lose, abort.
+</dd>
+
+</dl></blockquote>
+<p>
+
+(If you're familiar with the Cyrus SASL library API,
+you'll notice there is no "interaction" return —
+Tcl SASL handles this through a callback for you.)
+</li>
+
+<li>
+Wait for the server's confirmation.
+</li>
+
+<li>
+Invoke <a href="#getprop">$token -operation getprop</a> to
+get the new security properties for the connection.
+</li>
+
+</ol>
+<p>
+
+Now, let's look at the actual procedures.
+</p>
+<a name="client_init"></a>
+
+<p>
+<a name="anchor47"></a>
+</p>
+</font><pre>sasl::client_init   \
+    -callbacks list
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Initialize client-side code,
+supplying default <b>-callbacks</b>.
+</p>
+<a name="client_new"></a>
+
+<p>
+<a name="anchor48"></a>
+</p>
+</font><pre>sasl::client_new          \
+    -service      string  \
+    -serverFQDN   string  \
+   ?-iplocalport  string? \
+   ?-ipremoteport string? \
+   ?-callbacks    script? \
+   ?-flags        list?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a "client token" for a single SASL connection,
+supplying the registered name of the <b>-service</b>,
+and the <b>-serverFQDN</b> of the server.
+To find out what flags are known,
+try <b>sasl::info clientnew_flags</b>.
+</p>
+<a name="client_start"></a>
+
+<p>
+<a name="anchor49"></a>
+</p>
+</font><pre>$token -operation  start \
+       -mechanisms list  \
+      ?-interact   script?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Select one of the given <b>-mechanisms</b>,
+and return a serialized array containing two elements:
+the <b>mechanism</b> to use,
+and,
+an <b>output</b> string for the server.
+</p>
+<a name="client_step"></a>
+
+<p>
+<a name="anchor50"></a>
+</p>
+</font><pre>$token -operation step   \
+       -input     string \
+      ?-interact  script?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+
+<p>
+Perform another exchange,
+taking an <b>input</b> string from the server,
+returning an output string for the server.
+</p>
+
+</p>
+
+<h4><a name="anchor14">3.3</a> Client/Server calls</h4>
+
+<p>
+<a name="anchor51"></a>
+</p>
+</font><pre>$token -operation info
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a list of known operations for the token.
+</p>
+<a name="getprop"></a>
+
+<p>
+<a name="anchor52"></a>
+</p>
+</font><pre>$token -operation getprop \
+       -property  string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a string corresponding to the value of the 
+given <b>-property</b>.
+To find out what properties are known,
+try <b>sasl::info getprops</b>.
+</p>
+<a name="setprop"></a>
+
+<p>
+<a name="anchor53"></a>
+</p>
+</font><pre>$token -operation setprop \
+       -property  string  \
+       -value     string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Set the <b>-value</b> of the given <b>-property</b>.
+To find out what properties are known,
+try <b>sasl::info setprops</b>.
+</p>
+
+<p>
+<a name="anchor54"></a>
+</p>
+</font><pre>$token -operation errdetail
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+
+Return the detail for the last error encountered for the token.
+</p>
+
+<p>
+<a name="anchor55"></a>
+</p>
+</font><pre>$token -operation decode \
+       -input     string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+
+Take an <b>-input</b> string and decipher/verify it
+(using the previously-negotiated security layer),
+and return a plaintext string.
+</p>
+
+<p>
+<a name="anchor56"></a>
+</p>
+</font><pre>$token -operation encode \
+       -input     string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Take an <b>-output</b> string and encipher/sign it
+(using the previously-negotiated security layer),
+and return a string to be sent over the network.
+</p>
+
+<h4><a name="anchor15">3.4</a> Miscellaneous calls</h4>
+
+<p>
+<a name="anchor57"></a>
+</p>
+</font><pre>sasl::decode64 string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a string decoded from base64.
+</p>
+
+<p>
+<a name="anchor58"></a>
+</p>
+</font><pre>sasl::done
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Release all resources associated with this package.
+</p>
+
+<p>
+<a name="anchor59"></a>
+</p>
+</font><pre>sasl::encode64 string
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a string encoded to base64.
+</p>
+
+<p>
+<a name="anchor60"></a>
+</p>
+</font><pre>sasl::errstring
+    -code      number  \
+   ?-languages string?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Take a SASL result <b>-code</b> and
+a list of <b>-languages</b> (e.g., "en-US"),
+and return a serialized array containing two elements:
+the corresponding <b>diagnostic</b> string,
+and,
+optionally,
+the <b>language</b> used to localize the diagnostic.
+</p>
+
+<p>
+<a name="anchor61"></a>
+</p>
+</font><pre>sasl::info ?option?
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a list of known options,
+or a list of known choices for a given <b>option</b>.
+</p>
+
+<p>
+<a name="anchor62"></a>
+</p>
+</font><pre>sasl::mechanisms
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<p>
+Return a list of all known mechanisms.
+</p>
+
+<a name="anchor16"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>4. EXAMPLES</h3>
+
+<h4><a name="anchor17">4.1</a> Server</h4>
+</font><pre>
+proc sasl_log {data} {
+    array set params $data
+
+# look at data(level) and data(message)
+}
+
+
+proc server_callback {id data} {
+    array set params $data
+
+# look at data(level) and data(message)
+    global server
+
+    array set params $data
+
+    switch -- $id {
+        getopt {
+            if {![info exists params(plugin)]} {
+                set params(plugin) ""
+            }
+            switch -- $params(plugin)/$params(option) {
+                /auto_transition
+                    -
+                /canon_user_plugin
+                    -
+                /mech_list
+                    -
+                /sasldb_path
+                    -
+                OTP/opiekeys 
+                    -
+                default {
+# if value isn't set, an error is thrown below
+# that's okay, the Cyrus SASL library will use a default value
+                }
+            }
+        }
+
+        verifyfile {
+# set value...
+        }
+
+        proxy {
+# set value...
+        }
+
+        checkpass {
+# set value...
+        }
+    }
+
+    return $value
+}
+
+
+sasl::server_init -callbacks [list [list log sasl_log]]
+
+
+set callbacks {}
+foreach id [list getopt verifyfile proxy checkpass] {
+    lappend callbacks [list $id "server_callback $id"]
+}
+
+set token [sasl::server_new -service    $service   \
+                            -callbacks  $callbacks \
+                            -flags      [list success_data]]
+
+
+if {$ssf > 0} {
+    $token -operation setprop ssf_external $ssf
+}
+
+if {[string length $clientID] > 0} {
+    $token -operation setprop auth_external $clientID
+}
+
+$token -operation setprop sec_props \
+       [list min_ssf     $min    \
+             max_ssf     $max    \
+             max_bufsize $bufsiz \
+             flags       $flags]
+
+set mechlist [$token -operation list]
+
+
+# send $mechlist to client
+# recv mechanism and input from client
+
+set code 4
+for {set operation start} {$code == 4} {set operation step} {
+    set cmd [list $token -operation $operation \
+                         -input     $input] 
+    if {![string compare $operation start]} {
+        lappend cmd -mechanism $mechanism
+    }
+
+    switch -- [set code [catch { eval $cmd } output]] {
+        0 {
+# send success to client
+
+            set ssf [$token -operation getprop ssf]
+          }
+
+    4 {
+# send continue to client with output
+# recv input from client
+    }
+
+    default {
+# send error to client
+    }
+}
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<h4><a name="anchor18">4.2</a> Client</h4>
+</font><pre>
+proc client_callback {data} {
+    global client
+
+    array set params $data
+
+    switch -- $params(id) {
+        pass
+            -
+        echoprompt
+            -
+        noechoprompt {
+# ask the user...
+        }
+
+        getrealm {
+            if {[info exists params(available)]} {
+# ask the user to pick one from the list...
+            } else {
+# ask the user to supply one...
+            }
+        }
+    }
+
+    return $value
+}
+
+proc client_interact {data} {
+    global client
+
+    array set params $data
+    set id $params(id)
+
+    catch { set value $params(default) }
+
+# ask the user to enter the $id using $params(prompt)...
+
+    return $value
+}
+
+
+sasl::client_init -callbacks [list [list log sasl_log]]
+
+
+# interact script will supply these
+set callbacks [list authname cnonce language user]
+
+# callback script will supply these
+foreach id [list pass echoprompt noechoprompt] {
+    lappend callbacks [list $id client_callback]
+}
+
+set token [sasl::client_new -service    $service   \
+                            -serverFQDN $fqdn      \
+                            -callbacks  $callbacks \
+                            -flags      [list success_data]]
+
+
+if {$ssf > 0} {
+    $token -operation setprop ssf_external $ssf
+}
+
+if {[string length $serverID] > 0} {
+    $token -operation setprop auth_external $serverID
+}
+
+$token -operation setprop sec_props \
+       [list min_ssf     $min    \
+             max_ssf     $max    \
+             max_bufsize $bufsiz \
+             flags       $flags]
+
+
+# recv mechlist from server
+
+switch -- [set code [catch { $token -operation  start     \
+                                    -mechanisms $mechlist \
+                                    -interact   client_interact } result]] {
+    0 - 4 {
+        array set data $result
+# send data(mechanism) and optionally data(output) to server
+# recv input from server
+        set code 4
+    }
+
+    default {
+# error!
+    }
+}
+
+while {$code == 4} {
+    switch -- [set code [catch { $token -operation step   \
+                                        -input     $input \
+                                        -interact  client_interact
+                               } output]] {
+        0 {
+            if {![string compare $output ""]} {
+                break
+            }
+          }
+
+        4 {
+        }
+
+        default {
+# error!
+        }
+
+# make sure that server response says to continue...
+
+# send output to server
+# recv input from server
+    }
+    
+# make sure that server's last response says complete...
+}
+</pre><font face="verdana, helvetica, arial, sans-serif" size="2">
+
+<a name="rfc.references1"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>References</h3>
+<table width="99%" border="0">
+<tr><td class="author-text" valign="top"><b><a name="RFC2222">[1]</a></b></td>
+<td class="author-text"><a href="mailto:jgmyers at netscape.com">Myers, J.</a>, "<a href="ftp://ftp.isi.edu/in-notes/rfc2222.txt">Simple Authentication and Security Layer (SASL)</a>", RFC 2222, October 1997.</td></tr>
+</table>
+
+<a name="rfc.authors"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>Author's Address</h3>
+<table width="99%" border="0" cellpadding="0" cellspacing="0">
+<tr><td class="author-text"> </td>
+<td class="author-text">Marshall T. Rose</td></tr>
+<tr><td class="author-text"> </td>
+<td class="author-text">Dover Beach Consulting, Inc.</td></tr>
+<tr><td class="author-text"> </td>
+<td class="author-text">POB 255268</td></tr>
+<tr><td class="author-text"> </td>
+<td class="author-text">Sacramento, CA  95865-5268</td></tr>
+<tr><td class="author-text"> </td>
+<td class="author-text">US</td></tr>
+<tr><td class="author" align="right">Phone: </td>
+<td class="author-text">+1 916 483 8878</td></tr>
+<tr><td class="author" align="right">Fax: </td>
+<td class="author-text">+1 916 483 8848</td></tr>
+<tr><td class="author" align="right">EMail: </td>
+<td class="author-text"><a href="mailto:mrose at dbc.mtview.ca.us">mrose at dbc.mtview.ca.us</a></td></tr>
+</table>
+
+<a name="anchor19"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>Appendix A. TODO List</h3>
+
+<p>
+
+<ul class="text">
+
+<li>
+Add routines for propctx tokens.
+</li>
+
+<li>
+Handle <b>property_names</b> and  <b>property_values</b> in security properties.
+</li>
+
+</ul>
+<p>
+
+</p>
+
+<a name="anchor20"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>Appendix B. Copyrights</h3>
+
+<p>
+(c) 2002 Marshall T. Rose
+</p>
+
+<p>
+Hold harmless the author, and any lawful use is allowed.
+</p>
+<a name="rfc.index"><br><hr size="1" shade="0"></a>
+<table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b> TOC </b></font></a><br></td></tr></table>
+<h3>Index</h3>
+<table>
+<tr><td><b>C</b></td><td> </td></tr>
+<tr><td> </td><td>callbacks</td></tr>
+<tr><td> </td><td>  <a href="#anchor26">authname</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor36">canonuser</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor34">checkpass</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor28">cnonce</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor30">echoprompt</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor21">getopt</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor23">getpath</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor32">getrealm</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor27">language</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor22">log</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor31">noechoprompt</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor29">pass</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor33">proxy</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor35">setpass</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor25">user</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor24">verifyfile</a></td></tr>
+<tr><td><b>P</b></td><td> </td></tr>
+<tr><td> </td><td>procedures</td></tr>
+<tr><td> </td><td>  <a href="#anchor49">client -operation start</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor50">client -operation step</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor47">sasl::client_init</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor48">sasl::client_new</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor57">sasl::decode64</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor58">sasl::done</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor59">sasl::encode64</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor60">sasl::errstring</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor61">sasl::info</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor62">sasl::mechanisms</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor37">sasl::server_init</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor38">sasl::server_new</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor46">server -operation auxprop_getctx</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor45">server -operation auxprop_request</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor42">server -operation checkpass</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor39">server -operation list</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor44">server -operation setpass</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor40">server -operation start</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor41">server -operation step</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor43">server -operation userexists</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor55">token -operation decode</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor56">token -operation encode</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor54">token -operation errdetail</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor52">token -operation getprop</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor51">token -operation info</a></td></tr>
+<tr><td> </td><td>  <a href="#anchor53">token -operation setprop</a></td></tr>
+</table>
+</font></body></html>
diff --git a/contrib/tclsasl/doc/tclsasl.xml b/contrib/tclsasl/doc/tclsasl.xml
new file mode 100644
index 0000000..994290f
--- /dev/null
+++ b/contrib/tclsasl/doc/tclsasl.xml
@@ -0,0 +1,1003 @@
+<?xml version='1.0'?>
+<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
+
+<?rfc compact='no'?>
+<?rfc emoticonic='yes'?>
+<?rfc toc='yes'?>
+<?rfc private=' '?>
+
+<rfc>
+<front>
+<title>Tcl SASL</title>
+
+<author initials='M.T.' surname='Rose' fullname='Marshall T. Rose'>
+<organization>Dover Beach Consulting, Inc.</organization>
+<address>
+<postal>
+<street>POB 255268</street>
+<city>Sacramento</city> <region>CA</region> <code>95865-5268</code>
+<country>US</country>
+</postal>
+<phone>+1 916 483 8878</phone>
+<facsimile>+1 916 483 8848</facsimile>
+<email>mrose at dbc.mtview.ca.us</email>
+</address>
+</author>
+
+<date month='January' year='2002' />
+
+<abstract><t>Tcl SASL provides a Tcl interface to the Cyrus SASLv2
+library.</t></abstract> 
+</front>
+
+<middle>
+
+<section title='SYNOPSIS'>
+<figure><artwork><![CDATA[
+    package provide sasl 2.0
+]]></artwork></figure>
+
+<t>Tcl SASL provides a Tcl interface to the
+<eref target='http://asg.web.cmu.edu/sasl/'>Cyrus SASLv2 library</eref>.</t>
+
+<t>This document won't tell you what 
+<xref target='RFC2222'>SASL</xref> is.
+What it will tell you,
+the Tcl programmer,
+is how you can access the Cyrus SASLv2 library from your Tcl script.</t>
+
+<vspace blankLines='1000' />
+
+<section title='Installation'>
+<t>First,
+you'll need to have 
+<eref target='http://www.scriptics.com/software/tcltk/downloadnow83.tml'>Tcl 8.3</eref>
+(or later) already installed.</t>
+
+<figure>
+<preface>Then, when configuring the Cyrus SASLv2 library,
+use the |"--with-tcl| switch, e.g.,</preface>
+<artwork><![CDATA[
+    ./configure ... --with-tcl=...
+]]></artwork>
+</figure>
+</section>
+</section>
+
+
+<section title='CONVENTIONS'>
+<section title='Return Codes'>
+<t>If an exception occurs in a Cyrus SASL library function,
+an error is thrown and the |"errorCode| global is set to a list
+containing four elements:
+<list style='symbols'>
+<t>the literal string |""SASL"|;</t>
+
+<t>a string naming the Cyrus SASL library function that failed;</t>
+
+<t>an integer identifying the Cyrus SASL result code that was returned;
+and,</t>
+
+<t>a string containing the associated diagnostic.</t>
+</list></t>
+
+<t>In addition to the usual "normal" return,
+four routines
+(<xref target='server_start'>sasl::server_start</xref>,
+<xref target='server_step'>sasl::server_step</xref>,
+<xref target='client_start'>sasl::client_start</xref>, and
+<xref target='client_step'>sasl::client_step</xref>)
+may also use the "continue" return.
+This occurs when the corresponding Cyrus SASL library function returns
+|"SASL_CONTINUE|.</t>
+</section>
+
+<section title='Data Types'>
+<t>A serialized array is a list that contains an series of keywords
+and values.</t>
+
+<figure>
+<preamble>A serialized array can be traversed using |"foreach|,
+e.g.,</preamble> 
+<artwork><![CDATA[
+    foreach {k v} $aList {
+        puts stdout "$k has value $v"
+    }
+]]></artwork>
+</figure>
+
+<figure>
+<preamble>Alternatively,
+an array can be initialized and accessed,
+e.g.,</preamble> 
+<artwork><![CDATA[
+    array set data $aList
+    if {[info exists data(plugin)]} {
+        puts stdout "plugin entry is present"
+    }
+]]></artwork>
+</figure>
+
+<t>Several routines accept serialized arrays as arguments.
+In particular,
+the Cyrus SASL security properties is expressed as a serialized array
+with these elements:
+<list style='symbols'>
+<t>min_ssf</t>
+
+<t>max_ssf</t>
+
+<t>max_bufsize</t>
+
+<t>flags</t>
+</list>
+With the exception of |"flags|,
+each of these takes an integer value.
+The |"flags| entry takes a list value.
+To find out what flags are known,
+try |"sasl::info sec_flags|.</t>
+</section>
+
+<section title='Interactions'>
+<t>Two routines
+(<xref target='client_start'>sasl::client_start</xref> and
+<xref target='client_step'>sasl::client_step</xref>)
+have an optional |"-interact| switch that takes a script argument.</t>
+
+<t>When evaluated,
+the script is given one argument,
+a serialized array.
+At a minimum,
+the |"id| element is present in the serialized array.
+Optionally,
+three other elements
+(|"challenge|, |"prompt|, and |"default|)
+may also be present.</t>
+
+<t>If the script makes a normal return,
+the return value is supplied to the Cyrus SASL library.</t>
+</section>
+
+<section title='Callbacks'>
+<t>Four routines
+(<xref target='server_init'>sasl::server_init</xref>,
+<xref target='server_new'>sasl::server_new</xref>,
+<xref target='client_init'>sasl::client_init</xref>, and
+<xref target='client_new'>sasl::client_new</xref>)
+have a |"-callbacks| switch that takes a list argument.
+Each element of the list is either:
+<list style='symbols'>
+<t>the name of a callback; or,</t>
+
+<t>a list containing two elements,
+the name of a callback and a script.</t>
+</list>
+The former case is used by clients to tell the Cyrus SASL library
+what information may be determined using an interaction.
+Otherwise,
+the supplied script is evaluated to get the indicated information.</t>
+
+<t>In this latter case,
+the script is given one argument,
+a serialized array containing callback-specific elements.</t>
+
+<section title='Client/Server callbacks'>
+<t><list style='hanging'>
+<t hangText='getopt:'><iref item='callbacks' subitem='getopt' />
+Returns a string.
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>?plugin?</t>
+<t>option</t>
+</list></t>
+
+<t hangText='log:'><iref item='callbacks' subitem='log' />
+Elements:
+<list style='symbols'>
+<t>level</t>
+<t>message</t>
+</list></t>
+
+<t hangText='getpath:'><iref item='callbacks' subitem='getpath' />
+Returns a string.
+<vspace blankLines='1' />
+Elements: none.
+<vspace blankLines='1' /></t>
+
+<t hangText='verifyfile:'><iref item='callbacks' subitem='verifyfile' />
+Returns an integer (a SASL result code),
+either 0 (|"SASL_OK|), 1 (|"SASL_CONTINUE|), or -1 (|"SASL_FAIL|).
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>file</t>
+<t>type</t>
+</list>
+To find out what types are known,
+try |"sasl::info verify_types|.</t>
+</list></t>
+</section>
+
+<section title='Client-only callbacks'>
+<t><list style='hanging'>
+<t hangText='user:'><iref item='callbacks' subitem='user' />
+Returns a string.
+<vspace blankLines='1' />
+Elements: id
+<vspace blankLines='1' /></t>
+
+<t hangText='authname:'><iref item='callbacks' subitem='authname' />
+Returns a string.
+<vspace blankLines='1' />
+Elements: id
+<vspace blankLines='1' /></t>
+
+<t hangText='language:'><iref item='callbacks' subitem='language' />
+Returns a string.
+<vspace blankLines='1' />
+Elements: id
+<vspace blankLines='1' /></t>
+
+<t hangText='cnonce:'><iref item='callbacks' subitem='cnonce' />
+Returns a string.
+<vspace blankLines='1' />
+Elements: id
+<vspace blankLines='1' /></t>
+
+<t hangText='pass:'><iref item='callbacks' subitem='pass' />
+Returns a string.
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>token (a client token)</t>
+<t>id</t>
+</list></t>
+
+<t hangText='?no?echoprompt:'><iref item='callbacks' subitem='echoprompt' />
+<iref item='callbacks' subitem='noechoprompt' />
+Returns a string.
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>id</t>
+<t>challenge</t>
+<t>prompt</t>
+<t>default</t>
+</list></t>
+
+<t hangText='getrealm:'><iref item='callbacks' subitem='getrealm' />
+Returns a string.
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>id</t>
+<t>?available? (a list of possible choices)</t>
+</list></t>
+</list></t>
+</section>
+
+<section title='Server-only callbacks'>
+<t><list style='hanging'>
+<t hangText='proxy:'><iref item='callbacks' subitem='proxy' />
+Returns an integer (a SASL result code),
+usually either 0 (|"SASL_OK|), or -14 (|"SASL_NOAUTHZ|).
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>token (a server token)</t>
+<t>target</t>
+<t>user</t>
+<t>?realm?</t>
+<t>?propctx? (a propctx token)</t>
+</list></t>
+
+<t hangText='checkpass:'><iref item='callbacks' subitem='checkpass' />
+Returns an integer (a SASL result code).
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>token (a server token)</t>
+<t>user</t>
+<t>pass</t>
+<t>?propctx? (a propctx token)</t>
+</list></t>
+
+<t hangText='setpass:'><iref item='callbacks' subitem='setpass' />
+Returns an integer (a SASL result code).
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>token (a server token)</t>
+<t>user</t>
+<t>pass</t>
+<t>flags</t>
+<t>?propctx? (a propctx token)</t>
+</list>
+To find out what flags are known,
+try |"sasl::info setpass_flags|.
+<vspace blankLines='1' /></t>
+
+<t hangText='canonuser:'><iref item='callbacks' subitem='canonuser' />
+Returns a string.
+<vspace blankLines='1' />
+Elements:
+<list style='symbols'>
+<t>token (a server token)</t>
+<t>in</t>
+<t>?realm?</t>
+<t>outmax</t>
+<t>flags</t>
+</list>
+To find out what flags are known,
+try |"sasl::info canon_flags|.</t>
+</list></t>
+</section>
+</section>
+</section>
+
+<section title='PROCEDURES'>
+<section title='Server-only calls'>
+<t>The calling sequence is:
+<list style='numbers'>
+<t>Invoke <xref target='server_init'>sasl::server_init</xref> to load
+plugins.</t>
+
+<t>On each incoming connection,
+invoke <xref target='server_new'>sasl::server_new</xref> to get a
+server token.</t>
+
+<t>Invoke <xref target='setprop'>$token -operation setprop</xref> to
+set the security properties for the connection.</t>
+
+<t>Invoke <xref target='server_list'>$token -operation list</xref> to
+get the list of mechanisms to send to the client.</t>
+
+<t>When client selects a mechanism,
+invoke <xref target='server_start'>$token -operation start</xref>,
+and go to Step 7.</t>
+
+<t>Invoke <xref target='server_step'>$token -operation step</xref>.</t>
+
+<t>Look at the result:
+<list style='hanging'>
+<t hangText='normal return:'>Tell the client it's successful and goto
+Step 8.</t>
+
+<t hangText='continue return:'>Send the result to the client,
+wait for more input,
+and goto Step 6.</t>
+
+<t hangText='error return:'>Tell the client it loses and abort.</t>
+</list></t>
+
+<t>Invoke <xref target='getprop'>$token -operation getprop</xref> to
+get the new security properties for the connection.</t>
+</list>
+Now, let's look at the actual procedures.</t>
+
+
+<figure anchor='server_init'>
+<preamble><iref item='procedures' subitem='sasl::server_init' /></preamble>
+<artwork><![CDATA[sasl::server_init     \
+    -callbacks list   \
+   ?-appname   string?
+]]></artwork>
+<postamble>Initialize server-side code,
+supplying default |"-callbacks| and an |"-appname| for logging.</postamble>
+</figure>
+
+<figure anchor='server_new'>
+<preamble><iref item='procedures' subitem='sasl::server_new' /></preamble>
+<artwork><![CDATA[sasl::server_new          \
+    -service      string  \
+   ?-serverFQDN   string? \
+   ?-realm        string? \
+   ?-iplocalport  string? \
+   ?-ipremoteport string? \
+   ?-callbacks    script? \
+   ?-flags        list?
+]]></artwork>
+<postamble>Return a "server token" for a single SASL connection,
+supplying the registered name of the |"-service|.
+To find out what flags are known,
+try |"sasl::info servernew_flags|.
+</postamble>
+</figure>
+
+<figure anchor='server_list'>
+<preamble><iref item='procedures' subitem='server -operation list' /></preamble>
+<artwork><![CDATA[$token -operation list    \
+      ?-user      string?
+]]></artwork>
+<postamble>Return a list of mechanisms available to the server.</postamble>
+</figure>
+
+
+<figure anchor='server_start'>
+<preamble><iref item='procedures' subitem='server -operation start' /></preamble>
+<artwork><![CDATA[$token -operation start   \
+       -mechanism string  \
+       ?-input    string?
+]]></artwork>
+<postamble>Start a |"-mechanism|
+(optionally, with an |"-input| string from the client),
+returning an output string for the client.</postamble>
+</figure>
+
+
+<figure anchor='server_step'>
+<preamble><iref item='procedures' subitem='server -operation step' /></preamble>
+<artwork><![CDATA[$token -operation step   \
+       -input     string
+]]></artwork>
+<postamble>Perform another exchange,
+taking an |"input| string from the client,
+returning an output string for the client.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='server -operation checkpass' /></preamble>
+<artwork><![CDATA[$token -operation checkpass \
+       -user      string    \
+       -pass      string
+]]></artwork>
+<postamble>Determine if a plaintext password is valid;
+if not, throw an error.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='server -operation userexists' /></preamble>
+<artwork><![CDATA[$token -operation userexists \
+       -server    string     \
+      ?-realm     string?    \
+       -user      string
+]]></artwork>
+<postamble>Determine if a user exists;
+it not, throw an error.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='server -operation setpass' /></preamble>
+<artwork><![CDATA[$token -operation setpass \
+       -user      string  \
+      ?-newpass   string? \
+      ?-oldpass   string? \
+      ?-flags     list?
+]]></artwork>
+<postamble>Set the password for a user;
+on failure, throw an error.
+To find out what flags are known,
+try |"sasl::info setpass_flags|.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='server -operation auxprop_request' /></preamble>
+<artwork><![CDATA[$token -operation   auxprop_request \
+       ?-properties list?
+]]></artwork>
+<postamble>Request a set of auxiliary |"-properties|
+(or reset the list if this switch is absent);
+on failure,
+throw an error.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='server -operation auxprop_getctx' /></preamble>
+<artwork><![CDATA[$token -operation auxprop_getctx
+]]></artwork>
+<postamble>Return a "propctx token" containing the current auxiliary
+properties.</postamble>
+</figure>
+</section>
+
+<section title='Client-only calls'>
+<t>The calling sequence is:
+<list style='numbers'>
+<t>Invoke <xref target='client_init'>sasl::client_init</xref> to load
+plugins.</t>
+
+<t>On each outgoing connection,
+invoke <xref target='client_new'>sasl::client_new</xref> to get a
+client token.</t>
+
+<t>Invoke <xref target='setprop'>$token -operation setprop</xref> to
+set the security properties for the connection.</t>
+
+<t>When the server indicates which mechanisms are available
+invoke <xref target='client_start'>$token -operation start</xref>,
+and go to Step 6.</t>
+
+<t>Invoke <xref target='client_step'>$token -operation step</xref>.</t>
+
+<t>Look at the result:
+<list style='hanging'>
+<t hangText='normal return:'>If the result is empty, goto Step 8;
+otherwise, send the result to the server and goto Step 7</t>
+
+<t hangText='continue return:'>Send the result to the server,
+wait for more input,
+and goto Step 5.</t>
+
+<t hangText='error return:'>You lose, abort.</t>
+</list>
+(If you're familiar with the Cyrus SASL library API,
+you'll notice there is no "interaction" return —
+Tcl SASL handles this through a callback for you.)</t>
+
+<t>Wait for the server's confirmation.</t>
+
+<t>Invoke <xref target='getprop'>$token -operation getprop</xref> to
+get the new security properties for the connection.</t>
+</list>
+Now, let's look at the actual procedures.</t>
+
+<figure anchor='client_init'>
+<preamble><iref item='procedures' subitem='sasl::client_init' /></preamble>
+<artwork><![CDATA[sasl::client_init   \
+    -callbacks list
+]]></artwork>
+<postamble>Initialize client-side code,
+supplying default |"-callbacks|.</postamble>
+</figure>
+
+<figure anchor='client_new'>
+<preamble><iref item='procedures' subitem='sasl::client_new' /></preamble>
+<artwork><![CDATA[sasl::client_new          \
+    -service      string  \
+    -serverFQDN   string  \
+   ?-iplocalport  string? \
+   ?-ipremoteport string? \
+   ?-callbacks    script? \
+   ?-flags        list?
+]]></artwork>
+<postamble>Return a "client token" for a single SASL connection,
+supplying the registered name of the |"-service|,
+and the |"-serverFQDN| of the server.
+To find out what flags are known,
+try |"sasl::info clientnew_flags|.</postamble>
+</figure>
+
+<figure anchor='client_start'>
+<preamble><iref item='procedures' subitem='client -operation start' /></preamble>
+<artwork><![CDATA[$token -operation  start \
+       -mechanisms list  \
+      ?-interact   script?
+]]></artwork>
+<postamble>Select one of the given |"-mechanisms|,
+and return a serialized array containing two elements:
+the |"mechanism| to use,
+and,
+an |"output| string for the server.</postamble>
+</figure>
+
+
+<figure anchor='client_step'>
+<preamble><iref item='procedures' subitem='client -operation step' /></preamble>
+<artwork><![CDATA[$token -operation step   \
+       -input     string \
+      ?-interact  script?
+]]></artwork>
+<postamble>
+<postamble>Perform another exchange,
+taking an |"input| string from the server,
+returning an output string for the server.</postamble>
+</postamble>
+</figure>
+</section>
+
+<section title='Client/Server calls'>
+<figure>
+<preamble><iref item='procedures' subitem='token -operation info' /></preamble>
+<artwork><![CDATA[$token -operation info
+]]></artwork>
+<postamble>Return a list of known operations for the token.</postamble>
+</figure>
+
+
+<figure anchor='getprop'>
+<preamble><iref item='procedures' subitem='token -operation getprop' /></preamble>
+<artwork><![CDATA[$token -operation getprop \
+       -property  string
+]]></artwork>
+<postamble>Return a string corresponding to the value of the 
+given |"-property|.
+To find out what properties are known,
+try |"sasl::info getprops|.</postamble>
+</figure>
+
+
+<figure anchor='setprop'>
+<preamble><iref item='procedures' subitem='token -operation setprop' /></preamble>
+<artwork><![CDATA[$token -operation setprop \
+       -property  string  \
+       -value     string
+]]></artwork>
+<postamble>Set the |"-value| of the given |"-property|.
+To find out what properties are known,
+try |"sasl::info setprops|.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='token -operation errdetail' /></preamble>
+<artwork><![CDATA[$token -operation errdetail
+]]></artwork>
+<postamble>
+Return the detail for the last error encountered for the token.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='token -operation decode' /></preamble>
+<artwork><![CDATA[$token -operation decode \
+       -input     string
+]]></artwork>
+<postamble>
+Take an |"-input| string and decipher/verify it
+(using the previously-negotiated security layer),
+and return a plaintext string.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='token -operation encode' /></preamble>
+<artwork><![CDATA[$token -operation encode \
+       -input     string
+]]></artwork>
+<postamble>Take an |"-output| string and encipher/sign it
+(using the previously-negotiated security layer),
+and return a string to be sent over the network.</postamble>
+</figure>
+</section>
+
+<section title='Miscellaneous calls'>
+<figure>
+<preamble><iref item='procedures' subitem='sasl::decode64' /></preamble>
+<artwork><![CDATA[sasl::decode64 string
+]]></artwork>
+<postamble>Return a string decoded from base64.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='sasl::done' /></preamble>
+<artwork><![CDATA[sasl::done
+]]></artwork>
+<postamble>Release all resources associated with this package.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='sasl::encode64' /></preamble>
+<artwork><![CDATA[sasl::encode64 string
+]]></artwork>
+<postamble>Return a string encoded to base64.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='sasl::errstring' /></preamble>
+<artwork><![CDATA[sasl::errstring
+    -code      number  \
+   ?-languages string?
+]]></artwork>
+<postamble>Take a SASL result |"-code| and
+a list of |"-languages| (e.g., "en-US"),
+and return a serialized array containing two elements:
+the corresponding |"diagnostic| string,
+and,
+optionally,
+the |"language| used to localize the diagnostic.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='sasl::info' /></preamble>
+<artwork><![CDATA[sasl::info ?option?
+]]></artwork>
+<postamble>Return a list of known options,
+or a list of known choices for a given |"option|.</postamble>
+</figure>
+
+
+<figure>
+<preamble><iref item='procedures' subitem='sasl::mechanisms' /></preamble>
+<artwork><![CDATA[sasl::mechanisms
+]]></artwork>
+<postamble>Return a list of all known mechanisms.</postamble>
+</figure>
+</section>
+</section>
+
+
+<section title='EXAMPLES'>
+<section title='Server'>
+<figure>
+<artwork><![CDATA[
+proc sasl_log {data} {
+    array set params $data
+
+# look at data(level) and data(message)
+}
+
+
+proc server_callback {id data} {
+    array set params $data
+
+# look at data(level) and data(message)
+    global server
+
+    array set params $data
+
+    switch -- $id {
+        getopt {
+            if {![info exists params(plugin)]} {
+                set params(plugin) ""
+            }
+            switch -- $params(plugin)/$params(option) {
+                /auto_transition
+                    -
+                /canon_user_plugin
+                    -
+                /mech_list
+                    -
+                /sasldb_path
+                    -
+                OTP/opiekeys 
+                    -
+                default {
+# if value isn't set, an error is thrown below
+# that's okay, the Cyrus SASL library will use a default value
+                }
+            }
+        }
+
+        verifyfile {
+# set value...
+        }
+
+        proxy {
+# set value...
+        }
+
+        checkpass {
+# set value...
+        }
+    }
+
+    return $value
+}
+
+
+sasl::server_init -callbacks [list [list log sasl_log]]
+
+
+set callbacks {}
+foreach id [list getopt verifyfile proxy checkpass] {
+    lappend callbacks [list $id "server_callback $id"]
+}
+
+set token [sasl::server_new -service    $service   \
+                            -callbacks  $callbacks \
+                            -flags      [list success_data]]
+
+
+if {$ssf > 0} {
+    $token -operation setprop ssf_external $ssf
+}
+
+if {[string length $clientID] > 0} {
+    $token -operation setprop auth_external $clientID
+}
+
+$token -operation setprop sec_props \
+       [list min_ssf     $min    \
+             max_ssf     $max    \
+             max_bufsize $bufsiz \
+             flags       $flags]
+
+set mechlist [$token -operation list]
+
+
+# send $mechlist to client
+# recv mechanism and input from client
+
+set code 4
+for {set operation start} {$code == 4} {set operation step} {
+    set cmd [list $token -operation $operation \
+                         -input     $input] 
+    if {![string compare $operation start]} {
+        lappend cmd -mechanism $mechanism
+    }
+
+    switch -- [set code [catch { eval $cmd } output]] {
+        0 {
+# send success to client
+
+            set ssf [$token -operation getprop ssf]
+          }
+
+    4 {
+# send continue to client with output
+# recv input from client
+    }
+
+    default {
+# send error to client
+    }
+}
+]]></artwork>
+</figure>
+</section>
+
+<section title='Client'>
+<figure>
+<artwork><![CDATA[
+proc client_callback {data} {
+    global client
+
+    array set params $data
+
+    switch -- $params(id) {
+        pass
+            -
+        echoprompt
+            -
+        noechoprompt {
+# ask the user...
+        }
+
+        getrealm {
+            if {[info exists params(available)]} {
+# ask the user to pick one from the list...
+            } else {
+# ask the user to supply one...
+            }
+        }
+    }
+
+    return $value
+}
+
+proc client_interact {data} {
+    global client
+
+    array set params $data
+    set id $params(id)
+
+    catch { set value $params(default) }
+
+# ask the user to enter the $id using $params(prompt)...
+
+    return $value
+}
+
+
+sasl::client_init -callbacks [list [list log sasl_log]]
+
+
+# interact script will supply these
+set callbacks [list authname cnonce language user]
+
+# callback script will supply these
+foreach id [list pass echoprompt noechoprompt] {
+    lappend callbacks [list $id client_callback]
+}
+
+set token [sasl::client_new -service    $service   \
+                            -serverFQDN $fqdn      \
+                            -callbacks  $callbacks \
+                            -flags      [list success_data]]
+
+
+if {$ssf > 0} {
+    $token -operation setprop ssf_external $ssf
+}
+
+if {[string length $serverID] > 0} {
+    $token -operation setprop auth_external $serverID
+}
+
+$token -operation setprop sec_props \
+       [list min_ssf     $min    \
+             max_ssf     $max    \
+             max_bufsize $bufsiz \
+             flags       $flags]
+
+
+# recv mechlist from server
+
+switch -- [set code [catch { $token -operation  start     \
+                                    -mechanisms $mechlist \
+                                    -interact   client_interact } result]] {
+    0 - 4 {
+        array set data $result
+# send data(mechanism) and optionally data(output) to server
+# recv input from server
+        set code 4
+    }
+
+    default {
+# error!
+    }
+}
+
+while {$code == 4} {
+    switch -- [set code [catch { $token -operation step   \
+                                        -input     $input \
+                                        -interact  client_interact
+                               } output]] {
+        0 {
+            if {![string compare $output ""]} {
+                break
+            }
+          }
+
+        4 {
+        }
+
+        default {
+# error!
+        }
+
+# make sure that server response says to continue...
+
+# send output to server
+# recv input from server
+    }
+    
+# make sure that server's last response says complete...
+}
+]]></artwork>
+</figure>
+</section>
+</section>
+
+</middle>
+
+<back>
+<references>
+
+<reference anchor='RFC2222'>
+<front>
+<title abbrev='SASL'>Simple Authentication and Security Layer (SASL)</title>
+<author initials='J.G.' surname='Myers' fullname='John G. Myers'>
+<organization>Netscape Communications</organization>
+<address>
+<postal>
+<street>501 E. Middlefield Road</street>
+<street>Mail Stop MV-029</street>
+<street>Mountain View</street>
+<street>CA 94043-4042</street></postal>
+<email>jgmyers at netscape.com</email></address></author>
+<date month='October' year='1997'></date>
+<area>Security</area>
+<keyword>authentication</keyword>
+<keyword>security</keyword></front>
+<seriesInfo name='RFC' value='2222' />
+</reference>
+
+</references>
+
+<section title='TODO List'>
+<t><list style='symbols'>
+<t>Add routines for propctx tokens.</t>
+
+<t>Handle |"property_names| and  |"property_values| in security properties.</t>
+</list></t>
+</section>
+
+
+<section title='Copyrights'>
+<t>(c) 2002 Marshall T. Rose</t>
+
+<t>Hold harmless the author, and any lawful use is allowed.</t>
+</section>
+</back>
+</rfc>
diff --git a/sasldb/Makefile.am b/contrib/tclsasl/tcl/Makefile.am
similarity index 69%
copy from sasldb/Makefile.am
copy to contrib/tclsasl/tcl/Makefile.am
index 067477c..c387e1f 100644
--- a/sasldb/Makefile.am
+++ b/contrib/tclsasl/tcl/Makefile.am
@@ -1,6 +1,6 @@
-# Makefile.am for the SASLdb library
-# Rob Siemborski
-# $Id: Makefile.am,v 1.33 2011/09/05 14:18:10 murch Exp $
+# Makefile.am for the Tcl SASL library
+# 
+# $Id: Makefile.am,v 1.1 2002/02/05 23:28:26 rjs3 Exp $
 # Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -41,28 +41,27 @@
 #
 
 # Library version info - here at the top, for sanity
-# Note that this doesn't necessaraly follow the libsasl2 verison info
-sasl_version = 1:25:0
+tclsasl_version = 2:0:0
 
-INCLUDES=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
+INCLUDES=-I$(top_srcdir)/include
 
-extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c
+common_sources = tclsasl.c
 
-EXTRA_DIST = NTMakefile
+lib_LTLIBRARIES = libtclsasl.la
 
-noinst_LTLIBRARIES = libsasldb.la
-noinst_LIBRARIES = libsasldb.a
-
-libsasldb_la_SOURCES = allockey.c sasldb.h
-EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
-libsasldb_la_LIBADD = $(SASL_DB_BACKEND) 
-
-# Prevent make dist stupidity
-libsasldb_a_SOURCES =
-EXTRA_libsasldb_a_SOURCES =
-
-libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
-	$(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
+libtclsasl_la_SOURCES = $(common_sources)
+libtclsasl_la_LDFLAGS = -version-info $(tclsasl_version)
+libtclsasl_la_DEPENDENCIES = @LTLIBOBJS@
+libtclsasl_la_LIBADD = $(LIB_TCL) ../lib/libsasl2.la $(LIB_SOCKET)
 
+install-exec-hook: @INSTALL_TCLSASL@
 
+install-tclsasl:
+	$(mkinstalldirs) @PKG_TCL@
+	echo	"package ifneeded sasl"					   \
+		`echo $(VERSION) | awk -F. '{ printf "%s.%s", $$1, $$2 }'` \
+		"[list load $(DESTDIR)$(libdir)/libtclsasl.so]"		   \
+	    > @PKG_TCL@/pkgIndex.tcl
+	sed -e 's%load .libs/libtclsasl.so%package require sasl%' \
+	    < test.tcl      					     \
+	    > @PKG_TCL@/test.tcl
diff --git a/contrib/tclsasl/tcl/tclsasl.c b/contrib/tclsasl/tcl/tclsasl.c
new file mode 100644
index 0000000..0865791
--- /dev/null
+++ b/contrib/tclsasl/tcl/tclsasl.c
@@ -0,0 +1,3011 @@
+/* tclsasl.c - tcl interface to Cyrus SASLv2 */
+
+/*
+ * TBD:
+ *
+ * - add propctx calls from "sasl/prop.h"
+ *
+ * - handle property_{names,values} in security properties
+ *
+ */
+
+#include <config.h>
+
+#ifdef  TCLSASL
+
+#define unused  dummy __attribute__ ((unused))
+
+#include <tcl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "sasl.h"
+#include "saslutil.h"
+
+
+/* common datastructures */
+
+
+struct kv_pair {
+  char    *p_key;
+  unsigned p_value;
+};
+
+typedef struct kv_pair kv_pair_t;
+
+
+struct oc_pair {
+    char           *p_key;
+    Tcl_ObjCmdProc *p_proc;
+};
+
+typedef struct oc_pair oc_pair_t;
+
+
+struct sasl_data {
+    Tcl_Interp      *sd_interp;
+    Tcl_Command      sd_token;
+
+    oc_pair_t       *sd_dispatch; 
+    sasl_conn_t     *sd_conn;
+    sasl_callback_t *sd_cb;
+};
+
+typedef struct sasl_data sasl_data_t;
+
+
+/* static variables */
+
+static
+Tcl_HashTable   allocTable;     /* char*        -> refcnt               */
+
+static
+Tcl_HashTable   connTable;      /* sasl_conn_t* -> sasl_data_t*         */
+
+static
+Tcl_HashTable   p2tTable;       /* propctx_t*   -> Tcl_Obj*             */
+static
+Tcl_HashTable   t2pTable;       /* Tcl_Obj*     -> propctx_t*           */
+
+
+/* args management */
+
+#define Tcl_Obj2String(o)       (((o) != NULL) ? Tcl_GetString (o) : NULL)
+
+
+/* avoid a bug in Tcl's index caching code... */
+
+static int
+tcl_GetIndexFromObjStruct (Tcl_Interp *interp,
+                           Tcl_Obj    *objPtr,
+                           char      **tablePtr,
+                           int         offset,
+                           char       *msg,
+                           int         flags,
+                           int        *indexPtr) {
+    Tcl_GetCharLength (objPtr);
+
+    return Tcl_GetIndexFromObjStruct (interp, objPtr, tablePtr, offset, msg,
+                                      flags, indexPtr);
+}
+
+
+static int
+crack_args (Tcl_Interp *interp,
+            int          objc,
+            Tcl_Obj     *CONST objv[],
+            kv_pair_t   *switches,
+            int          optional,
+            Tcl_Obj     *args[]) {
+    int     i,
+            result;
+
+    Tcl_ResetResult (interp);
+    for (objc--, objv++; objc > 0; objc -= 2, objv += 2) {
+        int        offset;
+        kv_pair_t *p;
+
+        if ((result = tcl_GetIndexFromObjStruct (interp, objv[0],
+                                                 (char **) switches,
+                                                 sizeof *switches, "switch",
+                                                 0, &offset)) != TCL_OK)
+            return result;
+        p = switches + offset;
+
+        if (objc < 2) {
+            Tcl_AppendResult (interp, "missing argument to \"",
+                              Tcl_GetString (objv[0]), "\"", NULL);
+            return TCL_ERROR;
+        }
+        args[p -> p_value] = objv[1];   
+    }
+
+    for (i = 0; i < optional; i++)
+        if (!args[i]) {
+            Tcl_AppendResult (interp, switches[i].p_key,
+                              " switch must be provided", NULL);
+            return TCL_ERROR;
+        }
+
+    return TCL_OK;
+}
+
+static int
+t2c_usage (Tcl_Interp *interp,
+           Tcl_Obj    *objPtr,
+           kv_pair_t   pairs[],
+           unsigned    optional,
+           char       *operation,
+           kv_pair_t   flags[]) {
+    kv_pair_t *p;
+
+    Tcl_ResetResult (interp);
+    Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objPtr), NULL);
+    for (p = pairs; p -> p_key; p++) {
+        char     buffer[BUFSIZ],
+                  *cp,
+                  *v;
+        kv_pair_t *f;
+
+        if (((v = operation) != NULL)
+                && Tcl_StringCaseMatch ("-operation", p -> p_key, 0)) {}
+        else if ((flags != NULL)
+                     && Tcl_StringCaseMatch ("-flags", p -> p_key, 0)) {
+            cp = buffer;
+            for (f = flags, v = "{"; f -> p_key; f++, v = " ") {
+                sprintf (cp, "%s%s", v, f -> p_key);
+                cp += strlen (cp);
+            }
+            strcpy (cp, "}");
+            v = buffer;
+        } else
+            v = "...";
+        
+        Tcl_AppendResult (interp, p -> p_value >= optional ? " ?" : " ",
+                          p -> p_key, " ", v,
+                          p -> p_value >= optional ? "?" : "", NULL);
+    }
+
+    return TCL_ERROR;
+}
+
+
+static int
+t2c_flags (Tcl_Interp *interp,
+           Tcl_Obj    *objPtr,
+           kv_pair_t   pairs[],
+           unsigned   *flags) {
+    int      i,
+             nelem,
+             result;
+
+    *flags = 0;
+    if (!objPtr)
+        return TCL_OK;
+
+    if ((result = Tcl_ListObjLength (interp, objPtr, &nelem)) != TCL_OK)
+        return result;
+
+    for (i = 0; i < nelem; i++) {
+        int        offset;
+        kv_pair_t *p;
+        Tcl_Obj   *elemPtr;
+
+        if ((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
+                != TCL_OK)
+            return result;
+
+        if ((result = tcl_GetIndexFromObjStruct (interp, elemPtr,
+                                                 (char **) pairs,
+                                                 sizeof *pairs,
+                                                 "flag", 0, &offset))
+                != TCL_OK)
+            return result;
+        p = pairs + offset;
+
+        *flags |= p -> p_value;
+    }
+
+    return TCL_OK;
+}
+
+
+/* result management */
+
+static int
+c2t_result (Tcl_Interp *interp,
+            char       *fnx,
+            int         result) {
+    char   *cp,
+            buffer[BUFSIZ];
+
+    Tcl_ResetResult (interp);
+    if (result == SASL_OK)
+        return TCL_OK;
+
+    Tcl_SetResult (interp, cp = (char *) sasl_errstring (result, NULL, NULL),
+                   TCL_VOLATILE);
+
+    sprintf (buffer, "%d", result);
+    Tcl_SetErrorCode (interp, "SASL", fnx, buffer, cp, NULL);
+
+    return TCL_ERROR;
+}
+
+
+/* propctx management */
+
+typedef struct propctx propctx_t;
+
+static Tcl_Obj *
+c2t_propctx (propctx_t *propctx) {
+    int            result;      
+    char           buffer[BUFSIZ];
+    Tcl_HashEntry *entryPtr;
+    Tcl_Obj       *resultPtr;
+    static int     nprop = 0;
+
+    if ((entryPtr = Tcl_FindHashEntry (&p2tTable, (char *) propctx)) != NULL)
+        return ((Tcl_Obj *) Tcl_GetHashValue (entryPtr));
+
+    sprintf (buffer, "::sasl::propctx_%d", nprop++);
+    resultPtr = Tcl_NewStringObj (buffer, -1);
+
+    entryPtr = Tcl_CreateHashEntry (&p2tTable, (char *) propctx, &result);
+    Tcl_SetHashValue (entryPtr, (ClientData) resultPtr);
+    Tcl_IncrRefCount (resultPtr);
+
+    entryPtr = Tcl_CreateHashEntry (&t2pTable, (char *) resultPtr, &result);
+    Tcl_SetHashValue (entryPtr, (ClientData) propctx);
+
+    return resultPtr;
+}
+
+#if     0
+static propctx_t *
+t2c_propctx (Tcl_Interp *interp,
+             Tcl_Obj    *propctx) {
+    Tcl_HashEntry *entryPtr;
+
+    if ((entryPtr = Tcl_FindHashEntry (&t2pTable, (char *) propctx)) != NULL)
+        return ((propctx_t *) Tcl_GetHashValue (entryPtr));
+
+    Tcl_ResetResult (interp);
+    Tcl_AppendResult (interp, "unknown propctx token: \"",
+                      Tcl_GetString (propctx), "\"", NULL);
+
+    return NULL;
+}
+#endif
+
+
+/* callback management */
+
+struct cb_context {
+    Tcl_Interp *ctx_interp;
+    int         ctx_id;
+    Tcl_Obj    *ctx_cmdPtr;
+};
+
+typedef struct cb_context cb_context_t;
+
+
+static kv_pair_t cb_pairs[] = {
+  { "authname",                 SASL_CB_AUTHNAME                },
+  { "canonuser",                SASL_CB_CANON_USER              },
+  { "cnonce",                   SASL_CB_CNONCE                  },
+  { "echoprompt",               SASL_CB_ECHOPROMPT              },
+  { "getopt",                   SASL_CB_GETOPT                  },
+  { "getpath",                  SASL_CB_GETPATH                 },
+  { "getrealm",                 SASL_CB_GETREALM                },
+  { "language",                 SASL_CB_LANGUAGE                },
+  { "log",                      SASL_CB_LOG                     },
+  { "noechoprompt",             SASL_CB_NOECHOPROMPT            },
+  { "pass",                     SASL_CB_PASS                    },
+  { "proxy_policy",             SASL_CB_PROXY_POLICY            },
+  { "checkpass",                SASL_CB_SERVER_USERDB_CHECKPASS },
+  { "setpass",                  SASL_CB_SERVER_USERDB_SETPASS   },
+  { "user",                     SASL_CB_USER                    },
+  { "verifyfile",               SASL_CB_VERIFYFILE              },
+
+  { NULL,                       SASL_CB_LIST_END                }
+};
+
+
+static char *
+allocate (Tcl_Interp *interp,
+          int        *intPtr) {
+    int            len;
+    char          *cp,
+                  *dp;
+    Tcl_HashEntry *entryPtr;
+
+    cp = Tcl_GetByteArrayFromObj (Tcl_GetObjResult (interp), &len);
+    memcpy (dp = Tcl_Alloc (len + 1), cp, len);
+    dp[len] = '\0';
+    if (intPtr)
+        *intPtr = len;
+
+    entryPtr = Tcl_CreateHashEntry (&allocTable, dp, &len);
+    Tcl_SetHashValue (entryPtr, (ClientData) 0);
+
+    return dp;
+}
+
+
+static Tcl_Obj *
+sd2Obj (sasl_data_t *sd) {
+    char        *cp = Tcl_GetCommandName (sd -> sd_interp, sd -> sd_token);
+    Tcl_Obj *resultPtr = Tcl_NewObj ();
+
+    if (*cp != ':')
+        Tcl_AppendToObj (resultPtr, "::sasl::", -1);
+    Tcl_AppendToObj (resultPtr, cp, -1);
+
+    return resultPtr;
+}
+
+
+static int
+cb_getopt (void *context,
+           char *CONST plugin_name,
+           char *CONST option,
+           char **CONST value,
+           unsigned *len) {
+    cb_context_t *cb = (cb_context_t *) context;
+    Tcl_Interp   *interp = cb -> ctx_interp;
+    Tcl_Obj      *argPtr,
+                 *cmdPtr;
+
+    argPtr = Tcl_NewObj ();
+
+    if (plugin_name) {
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("plugin", -1));
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj (plugin_name, -1));
+    }
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("option", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (option, -1));
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
+        return SASL_FAIL;
+
+    *value = allocate (interp, len);
+
+    return SASL_OK;
+}
+
+static int
+cb_log (void *context,
+        int   level,
+        char *CONST message) {
+    cb_context_t *cb = (cb_context_t *) context;
+    Tcl_Interp   *interp = cb -> ctx_interp;
+    Tcl_Obj      *argPtr,
+                 *cmdPtr;
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("level", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewIntObj (level));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("message", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (message, -1));
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
+        return SASL_FAIL;
+
+    return SASL_OK;
+}
+
+static int
+cb_getpath (void *context,
+            char **CONST value) {
+    cb_context_t *cb = (cb_context_t *) context;
+    Tcl_Interp   *interp = cb -> ctx_interp;
+
+    if (Tcl_EvalObjEx (interp, cb -> ctx_cmdPtr, 0) != TCL_OK)
+        return SASL_FAIL;
+
+    *value = allocate (interp, NULL);
+
+    return SASL_OK;
+}
+
+static kv_pair_t vf_pairs[] = {
+                                /* SASL_VRFY_OTHER must be first */
+  { "other",                    SASL_VRFY_OTHER                 },
+  { "conf",                     SASL_VRFY_CONF                  },
+  { "passwd",                   SASL_VRFY_PASSWD                },
+  { "plugin",                   SASL_VRFY_PLUGIN                },
+
+  { NULL,                       0                               }
+};
+
+static int
+cb_verifyfile (void *context,
+               char *CONST file,
+               sasl_verify_type_t type) {
+    int           intValue;
+    cb_context_t *cb = (cb_context_t *) context;
+    kv_pair_t    *p;
+    Tcl_Interp   *interp = cb -> ctx_interp;
+    Tcl_Obj      *argPtr,
+                 *cmdPtr;
+
+    for (p = vf_pairs; p -> p_key; p++)
+        if (p -> p_value == type)
+            break;
+    if (!p -> p_key)
+        p = vf_pairs;
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("file", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (file, -1));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("type", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (p -> p_key, -1));
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
+            || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
+                                   &intValue) != TCL_OK))
+        return SASL_FAIL;
+
+    return intValue;
+}
+
+static int
+cb_getsimple (void     *context,
+              unsigned  id,
+              char    **CONST value,
+              unsigned *len) {
+    cb_context_t *cb = (cb_context_t *) context;
+    kv_pair_t    *p;
+    Tcl_Interp   *interp = cb -> ctx_interp;
+    Tcl_Obj      *argPtr,
+                 *cmdPtr;
+
+    for (p = cb_pairs; p -> p_key; p++)
+        if (p -> p_value == id)
+            break;
+    if (!p -> p_key)
+        return SASL_BADPARAM;
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (p -> p_key, -1));
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
+        return SASL_FAIL;
+
+    *value = allocate (interp, len);
+
+    return SASL_OK;
+}
+
+static int
+cb_getsecret (sasl_conn_t    *conn,
+              void           *context,
+              unsigned        id,
+              sasl_secret_t **value) {
+    int            len;
+    char          *cp,
+                  *dp;
+    cb_context_t  *cb = (cb_context_t *) context;
+    kv_pair_t     *p;
+    sasl_data_t   *sd;
+    sasl_secret_t *ss;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr;
+
+    if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
+        return SASL_BADPARAM;
+    sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
+
+    for (p = cb_pairs; p -> p_key; p++)
+        if (p -> p_value == id)
+            break;
+    if (!p -> p_key)
+        return SASL_BADPARAM;
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (p -> p_key, -1));
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)) {
+        *value = NULL;
+        return SASL_FAIL;
+    }
+
+    cp = Tcl_GetByteArrayFromObj (Tcl_GetObjResult (interp), &len);
+    dp = Tcl_Alloc (sizeof *ss + len);
+
+    ss = (sasl_secret_t *) dp;
+    ss -> len = len;
+    memcpy (ss -> data, cp, len);
+    ss -> data[len] = '\0';
+    
+#if     0       /* looks like the library frees this... */
+    entryPtr = Tcl_CreateHashEntry (&allocTable, dp, &len);
+    Tcl_SetHashValue (entryPtr, (ClientData) 1);
+#endif
+
+    *value = ss;
+
+    return SASL_OK;
+}
+
+static int
+cb_chalprompt (void      *context,
+               unsigned  id,
+               char     *CONST challenge,
+               char     *CONST prompt,
+               char     *CONST defresult,
+               char    **CONST value,
+               unsigned *len) {
+    cb_context_t  *cb = (cb_context_t *) context;
+    kv_pair_t     *p;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr;
+
+    for (p = cb_pairs; p -> p_key; p++)
+        if (p -> p_value == id)
+            break;
+    if (!p -> p_key)
+        return SASL_BADPARAM;
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (p -> p_key, -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("challenge", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (challenge, -1));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("prompt", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (prompt, -1));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("default", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj (defresult, -1));
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
+        return SASL_FAIL;
+
+    *value = allocate (interp, len);
+
+    return SASL_OK;
+}
+
+static int
+cb_getrealm (void      *context,
+              unsigned   id,
+              char     **CONST availrealms,
+              char     **CONST value) {
+    cb_context_t  *cb = (cb_context_t *) context;
+    kv_pair_t     *p;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr;
+
+    for (p = cb_pairs; p -> p_key; p++)
+        if (p -> p_value == id)
+            break;
+    if (!p -> p_key)
+        return SASL_BADPARAM;
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (p -> p_key,
+                                                                -1));
+
+    if (availrealms) {
+        char    **ap;
+        Tcl_Obj  *elemPtr;
+
+        elemPtr = Tcl_NewObj ();
+        for (ap = availrealms; *ap; ap++) {
+            Tcl_ListObjAppendElement (interp, elemPtr,
+                                      Tcl_NewStringObj (*ap, -1));
+        }
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("available", -1));
+        Tcl_ListObjAppendElement (interp, argPtr, elemPtr);
+    }
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
+        return SASL_FAIL;
+
+    *value = allocate (interp, NULL);
+
+    return SASL_OK;
+}
+
+static int
+cb_authorize (sasl_conn_t *conn,
+              void        *context,
+              char        *CONST requested_user,
+              int          rlen,
+              char        *CONST auth_identity,
+              int          alen,
+              char        *CONST def_realm,
+              int          urlen,
+              propctx_t   *propctx) {
+    int            intValue;
+    cb_context_t  *cb = (cb_context_t *) context;
+    sasl_data_t   *sd;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr;
+
+    if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
+        return SASL_BADPARAM;
+    sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("target", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewByteArrayObj (requested_user, rlen));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("user", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewByteArrayObj (auth_identity, alen));
+
+    if (def_realm) {
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("realm", -1));
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewByteArrayObj (def_realm, urlen));
+    }
+
+    if (propctx) {
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("propctx", -1));
+        Tcl_ListObjAppendElement (interp, argPtr, c2t_propctx (propctx));
+    }
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
+            || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
+                                   &intValue) != TCL_OK))
+        return SASL_FAIL;
+
+    return intValue;
+}
+
+static int
+cb_userdb_checkpass (sasl_conn_t *conn,
+                     void        *context,
+                     char        *CONST user,
+                     char        *CONST pass,
+                     unsigned     passlen,
+                     propctx_t   *propctx) {
+    int            intValue;
+    cb_context_t  *cb = (cb_context_t *) context;
+    sasl_data_t   *sd;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr;
+
+    if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
+        return SASL_BADPARAM;
+    sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("user", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (user, -1));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("pass", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewByteArrayObj (pass,
+                                                                   passlen));
+
+    if (propctx) {
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("propctx", -1));
+        Tcl_ListObjAppendElement (interp, argPtr, c2t_propctx (propctx));
+    }
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
+            || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
+                                   &intValue) != TCL_OK))
+        return SASL_FAIL;
+
+    return intValue;
+}
+
+static kv_pair_t setpass_flags[] = {
+  { "create",           SASL_SET_CREATE                         },
+  { "disable",          SASL_SET_DISABLE                        },
+
+  { NULL,                       0                               }
+};
+
+static int
+cb_userdb_setpass (sasl_conn_t *conn,
+                   void        *context,
+                   char        *CONST user,
+                   char        *CONST pass,
+                   unsigned     passlen,
+                   propctx_t   *propctx,
+                   unsigned     flags) {
+    int            intValue;
+    cb_context_t  *cb = (cb_context_t *) context;
+    kv_pair_t     *p;
+    sasl_data_t   *sd;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr,
+                  *elemPtr;
+
+    if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
+        return SASL_BADPARAM;
+    sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("user", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (user, -1));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("pass", -1));
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewByteArrayObj (pass, passlen));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("flags", -1));
+    elemPtr = Tcl_NewObj ();
+    for (p = setpass_flags; p -> p_key; p++)
+        if (flags & p -> p_value) {
+            Tcl_ListObjAppendElement (interp, elemPtr,
+                                      Tcl_NewStringObj (p -> p_key, -1));
+            flags &= ~p -> p_value;
+        }
+    if (flags) {
+        char    buffer[BUFSIZ];
+
+        sprintf (buffer, "%u", flags);
+        Tcl_ListObjAppendElement (interp, elemPtr,
+                                  Tcl_NewStringObj (buffer, -1));
+    }
+    Tcl_ListObjAppendElement (interp, argPtr, elemPtr);
+
+    if (propctx) {
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("propctx", -1));
+        Tcl_ListObjAppendElement (interp, argPtr, c2t_propctx (propctx));
+    }
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
+            || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
+                                   &intValue) != TCL_OK))
+        return SASL_FAIL;
+
+    return intValue;
+}
+
+static kv_pair_t canon_flags[] = {
+  { "authid",           SASL_CU_AUTHID                          },
+  { "authzid",          SASL_CU_AUTHZID                         },
+
+  { NULL,                       0                               }
+};
+
+static int
+cb_canonuser (sasl_conn_t *conn,
+               void        *context,
+               char        *CONST iptr,
+               unsigned     ilen,
+               unsigned     flags,
+               char        *CONST realm,
+               char        *optr,
+               unsigned     omax,
+               unsigned    *olen) {
+    int            intValue;
+    char          *cp;
+    cb_context_t  *cb = (cb_context_t *) context;
+    kv_pair_t     *p;
+    sasl_data_t   *sd;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Interp    *interp = cb -> ctx_interp;
+    Tcl_Obj       *argPtr,
+                  *cmdPtr,
+                  *elemPtr;
+
+    if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
+        return SASL_BADPARAM;
+    sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
+
+    argPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("in", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewByteArrayObj (iptr,
+                                                                   ilen));
+
+    if (realm) {
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("realm", -1));
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj (realm, -1));
+    }
+
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("outmax", -1));
+    Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewIntObj (omax));
+
+    Tcl_ListObjAppendElement (interp, argPtr,
+                              Tcl_NewStringObj ("flags", -1));
+    elemPtr = Tcl_NewObj ();
+    for (p = canon_flags; p -> p_key; p++)
+        if (flags & p -> p_value) {
+            Tcl_ListObjAppendElement (interp, elemPtr,
+                                      Tcl_NewStringObj (p -> p_key, -1));
+            flags &= ~p -> p_value;
+        }
+    if (flags) {
+        char    buffer[BUFSIZ];
+
+        sprintf (buffer, "%u", flags);
+        Tcl_ListObjAppendElement (interp, elemPtr,
+                                  Tcl_NewStringObj (buffer, -1));
+    }
+    Tcl_ListObjAppendElement (interp, argPtr, elemPtr);
+
+    cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
+    if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
+            || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
+        return SASL_FAIL;
+
+    cp = Tcl_GetByteArrayFromObj (Tcl_GetObjResult (interp), &intValue);
+    if (intValue > ((int) omax))
+        intValue = omax;
+    memcpy (optr, cp, intValue);
+    *olen = (unsigned) intValue;
+
+    return SASL_OK;
+}
+
+
+static sasl_callback_t *
+t2c_sasl_callback (Tcl_Interp *interp,
+                   Tcl_Obj    *objPtr) {
+    int              i,
+                     nctx,
+                     nelem,
+                     result,
+                     size;
+    char            *mp;
+    cb_context_t    *cb; 
+    sasl_callback_t *pp,
+                    *qp;
+    Tcl_HashEntry   *entryPtr;
+    Tcl_Obj         *elemPtr,
+                    *fieldPtr;
+
+    if ((result = Tcl_ListObjLength (interp, objPtr, &nelem)) != TCL_OK)
+        return NULL;
+
+    size = (nelem + 1) * sizeof *pp;
+
+    nctx = 0;
+    for (i = 0; i < nelem; i++) {
+        int     nfield;
+
+        if (((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
+                        != TCL_OK)
+                || ((result = Tcl_ListObjLength (interp, elemPtr, &nfield))
+                        != TCL_OK))
+            return NULL;
+        if ((nfield < 1) || (nfield > 2)) {
+            Tcl_SetResult (interp,
+                           "each callback should be list with 1 or 2 elements",
+                           TCL_STATIC);
+            return NULL;
+        }
+        if ((result = Tcl_ListObjIndex (interp, elemPtr, 1, &fieldPtr))
+                != TCL_OK)
+            return NULL;
+
+        if (fieldPtr != NULL)
+            size += sizeof *cb, nctx++;
+    }
+
+    mp = Tcl_Alloc (size);
+    memset (mp, 0, size);
+
+    pp = (sasl_callback_t *) mp, mp += (nelem + 1) * sizeof *pp;
+    cb = (cb_context_t *) mp, mp += nctx * sizeof *cb;
+
+    for (qp = pp, i = 0; i < nelem; qp++, i++) {
+        int        offset;
+
+        if (((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
+                        != TCL_OK)
+                || ((result = Tcl_ListObjIndex (interp, elemPtr, 0, &fieldPtr))
+                        != TCL_OK))
+            goto out;
+
+        if ((result = tcl_GetIndexFromObjStruct (interp, fieldPtr,
+                                                 (char **) cb_pairs,
+                                                 sizeof *cb_pairs, "callback",
+                                                 0, &offset)) != TCL_OK)
+            goto out;
+        qp -> id = cb_pairs[offset]. p_value;
+
+        if ((result = Tcl_ListObjIndex (interp, elemPtr, 1, &fieldPtr))
+                != TCL_OK)
+            goto out;
+
+        if (fieldPtr != NULL) {
+            switch (qp -> id) {
+                case SASL_CB_GETOPT:
+                    qp -> proc = cb_getopt;
+                    break;
+
+                case SASL_CB_LOG:
+                    qp -> proc = cb_log;
+                    break;
+
+                case SASL_CB_GETPATH:
+                    qp -> proc = cb_getpath;
+                    break;
+
+                case SASL_CB_VERIFYFILE:
+                    qp -> proc = cb_verifyfile;
+                    break;
+
+                case SASL_CB_USER:
+                case SASL_CB_AUTHNAME:
+                case SASL_CB_LANGUAGE:
+                case SASL_CB_CNONCE:
+                    qp -> proc = cb_getsimple;
+                    break;
+
+                case SASL_CB_PASS:
+                    qp -> proc = cb_getsecret;
+                    break;
+
+                case SASL_CB_ECHOPROMPT:
+                case SASL_CB_NOECHOPROMPT:
+                    qp -> proc = cb_chalprompt;
+                    break;
+
+                case SASL_CB_GETREALM:
+                    qp -> proc = cb_getrealm;
+                    break;
+
+                case SASL_CB_PROXY_POLICY:
+                    qp -> proc = cb_authorize;
+                    break;
+
+                case SASL_CB_SERVER_USERDB_CHECKPASS:
+                    qp -> proc = cb_userdb_checkpass;
+                    break;
+
+                case SASL_CB_SERVER_USERDB_SETPASS:
+                    qp -> proc = cb_userdb_setpass;
+                    break;
+
+                case SASL_CB_CANON_USER:
+                    qp -> proc = cb_canonuser;
+                    break;
+
+                default:
+                    Tcl_SetResult (interp,
+                                   "internal error, missing known case",
+                                   TCL_STATIC);
+                    goto out;
+            }
+            qp -> context = cb;
+
+            cb -> ctx_interp = interp;
+            cb -> ctx_id = qp -> id;
+            cb -> ctx_cmdPtr = fieldPtr;
+            Tcl_IncrRefCount (cb -> ctx_cmdPtr);
+            cb++;
+        }
+    }
+    qp -> id = SASL_CB_LIST_END;
+
+    entryPtr = Tcl_CreateHashEntry (&allocTable, (char *) pp, &result);
+    Tcl_SetHashValue (entryPtr, (ClientData) 1);
+
+    return pp;
+
+out: ;
+    Tcl_Free ((char *) pp);
+
+    return NULL;
+}
+
+
+/* common routines */
+
+static int
+sasl_aux_proc (ClientData  data,
+               Tcl_Interp *interp,
+               int         objc,
+               Tcl_Obj    *CONST objv[]) {
+    int            argc,
+                   offset,
+                   result;
+    char          *cp;
+    oc_pair_t     *pp;
+    sasl_data_t   *sd = (sasl_data_t *) data;
+    Tcl_Obj      *CONST *argv;
+
+    Tcl_ResetResult (interp);
+    argc = objc, argv = objv;
+    for (argc--, argv++; argc > 0; argc -= 2, argv += 2)
+        if (Tcl_StringCaseMatch (Tcl_GetString (*argv), "-operation", 0))
+            break;
+    if (argc <= 0) {
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
+                          " -operation", NULL);
+        for (pp = sd -> sd_dispatch, cp = " "; pp -> p_key; pp++, cp = "|")
+            Tcl_AppendResult (interp, cp, pp -> p_key, NULL);
+        Tcl_AppendResult (interp, " ?args...?", NULL);
+        return TCL_ERROR;
+    }
+
+    argc--, argv++;
+    if (!*argv) {
+        Tcl_AppendResult (interp, "missing argument to: \"-operation\"", NULL);
+        return TCL_ERROR;
+    }
+    if ((result = tcl_GetIndexFromObjStruct (interp, *argv,
+                                             (char **) sd -> sd_dispatch,
+                                             sizeof *sd -> sd_dispatch,
+                                             "operation", 0, &offset))
+             != TCL_OK)
+        return result;
+    pp = sd -> sd_dispatch + offset;
+
+    return ((*(pp -> p_proc)) (data, interp, objc, objv));
+};
+
+
+static void
+sasl_aux_free (ClientData data) {
+    sasl_data_t   *sd = (sasl_data_t *) data;
+    Tcl_HashEntry *entryPtr;
+
+    if (sd -> sd_cb) {
+        if ((entryPtr = Tcl_FindHashEntry (&allocTable, (char *) sd -> sd_cb))
+                != NULL)
+            Tcl_DeleteHashEntry (entryPtr);
+        Tcl_Free ((char *) sd -> sd_cb);
+    }
+
+    if ((entryPtr = Tcl_FindHashEntry (&connTable, (char *) sd -> sd_conn))
+            != NULL)
+        Tcl_DeleteHashEntry (entryPtr);
+    sasl_dispose (&sd -> sd_conn);
+
+    Tcl_Free ((char *) data);
+}
+
+
+static int
+sasl_aux_codec (Tcl_Interp  *interp,
+                sasl_data_t *sd,
+                char        *codep,
+                int        (*codec) (),
+                Tcl_Obj     *string) {
+    int              result;
+    unsigned         ilen,
+                     olen;
+    CONST char      *iptr,
+                    *optr;
+
+    iptr = Tcl_GetByteArrayFromObj (string, &ilen);
+
+    if ((result = (*codec) (sd -> sd_conn, iptr, ilen, &optr, &olen))
+            != SASL_OK)
+        return c2t_result (interp, codep, result);
+
+    Tcl_SetObjResult (interp, Tcl_NewByteArrayObj ((unsigned char *) optr,
+                                                   olen));
+    return TCL_OK;
+}
+
+
+#define DECODE_OPERATION        0
+#define DECODE_INPUT            1
+
+#define DECODE_MAXARGS          2
+#define DECODE_OPTIONAL         DECODE_MAXARGS
+
+static kv_pair_t decode_args[] = {
+  { "-operation",               DECODE_OPERATION                },
+  { "-input",                   DECODE_INPUT                    },
+
+  { NULL,                       0                               }
+};
+
+static int
+sasl_aux_decode (ClientData  data,
+                 Tcl_Interp *interp,
+                 int         objc,
+                 Tcl_Obj    *CONST objv[]) {
+    int              result;
+    sasl_data_t     *sd = (sasl_data_t *) data;    
+    Tcl_Obj         *args[DECODE_MAXARGS];
+
+    memset (args, 0, sizeof *args * DECODE_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, decode_args,
+                              DECODE_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    return sasl_aux_codec (interp, sd, "sasl_decode", sasl_decode,
+                           args[DECODE_INPUT]);
+}
+
+
+#define ENCODE_OPERATION        0
+#define ENCODE_OUTPUT           1
+
+#define ENCODE_MAXARGS          2
+#define ENCODE_OPTIONAL         ENCODE_MAXARGS
+
+static kv_pair_t encode_args[] = {
+  { "-operation",               ENCODE_OPERATION                },
+  { "-output",                  ENCODE_OUTPUT                   },
+
+  { NULL,                       0                               }
+};
+
+static int
+sasl_aux_encode (ClientData  data,
+                 Tcl_Interp *interp,
+                 int         objc,
+                 Tcl_Obj    *CONST objv[]) {
+    int              result;
+    sasl_data_t     *sd = (sasl_data_t *) data;    
+    Tcl_Obj         *args[ENCODE_MAXARGS];
+
+    memset (args, 0, sizeof *args * ENCODE_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, encode_args,
+                              ENCODE_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    return sasl_aux_codec (interp, sd, "sasl_encode", sasl_encode,
+                           args[ENCODE_OUTPUT]);
+}
+
+
+#define GETPROP_OPERATION       0
+#define GETPROP_PROPERTY        1
+
+#define GETPROP_MAXARGS         2
+#define GETPROP_OPTIONAL        GETPROP_MAXARGS
+
+static kv_pair_t getprop_args[] = {
+  { "-operation",               GETPROP_OPERATION               },
+  { "-property",                GETPROP_PROPERTY                },
+
+  { NULL,                       0                               }
+};
+
+static kv_pair_t getprop_pairs[] = {
+  { "auth_external",            SASL_AUTH_EXTERNAL              },
+  { "authsource",               SASL_AUTHSOURCE                 },
+  { "callbacks",                SASL_CALLBACK                   },
+  { "defrealm",                 SASL_DEFUSERREALM               },
+  { "getoptctx",                SASL_GETOPTCTX                  },
+  { "iplocalport",              SASL_IPLOCALPORT                },
+  { "ipremoteport",             SASL_IPREMOTEPORT               },
+  { "maxoutbuf",                SASL_MAXOUTBUF                  },
+  { "mechname",                 SASL_MECHNAME                   },
+  { "plugerr",                  SASL_PLUGERR                    },
+  { "sec_props",                SASL_SEC_PROPS                  },
+  { "serverfqdn",               SASL_SERVERFQDN                 },
+  { "service",                  SASL_SERVICE                    },
+  { "ssf",                      SASL_SSF                        },
+  { "ssf_external",             SASL_SSF_EXTERNAL               },
+  { "username",                 SASL_USERNAME                   },
+
+  { NULL,                       0                               }
+};
+
+static kv_pair_t secprops_flags[] = {
+  { "forward_secrecy",          SASL_SEC_FORWARD_SECRECY        },
+  { "noactive",                 SASL_SEC_NOACTIVE               },
+  { "noanonymous",              SASL_SEC_NOANONYMOUS            },
+  { "nodictionary",             SASL_SEC_NODICTIONARY           },
+  { "noplaintext",              SASL_SEC_NOPLAINTEXT            },
+  { "pass_credentials",         SASL_SEC_PASS_CREDENTIALS       },
+
+  { NULL,                       0                               }
+};
+
+
+static int
+sasl_aux_getprop (ClientData  data,
+                  Tcl_Interp *interp,
+                  int          objc,
+                  Tcl_Obj     *CONST objv[]) {
+    CONST void      *pvalue;
+    int              offset,
+                     result;
+    kv_pair_t       *p;
+    sasl_data_t     *sd = (sasl_data_t *) data;    
+    Tcl_Obj         *elemPtr,
+                    *resultPtr,
+                    *args[GETPROP_MAXARGS];
+
+    memset (args, 0, sizeof *args * GETPROP_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, getprop_args,
+                              GETPROP_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    if ((result = tcl_GetIndexFromObjStruct (interp, args[GETPROP_PROPERTY],
+                                             (char **) getprop_pairs,
+                                             sizeof *getprop_pairs, "property",
+                                             0, &offset)) != TCL_OK)
+        return result;
+    p = getprop_pairs + offset;
+
+    if ((offset = p -> p_value) == SASL_GETOPTCTX)
+        offset = SASL_CALLBACK;
+    if ((result = sasl_getprop (sd -> sd_conn, offset, &pvalue)) != SASL_OK)
+        return c2t_result (interp, "sasl_getprop", result);
+
+    resultPtr = NULL;
+    switch (p -> p_value) {
+        case SASL_USERNAME:
+        case SASL_DEFUSERREALM:
+        case SASL_IPLOCALPORT:
+        case SASL_IPREMOTEPORT:
+        case SASL_SERVICE:
+        case SASL_SERVERFQDN:
+        case SASL_AUTHSOURCE:
+        case SASL_MECHNAME:
+        case SASL_PLUGERR:
+        case SASL_AUTH_EXTERNAL:
+            if (pvalue != NULL)
+                resultPtr = Tcl_NewStringObj ((char *) pvalue, -1);
+            break;
+
+        case SASL_SSF:
+        case SASL_SSF_EXTERNAL:
+        case SASL_MAXOUTBUF:
+            resultPtr = Tcl_NewLongObj (*((unsigned *) pvalue));
+            break;
+        
+        case SASL_SEC_PROPS:
+        {
+            sasl_security_properties_t *sp =
+                        (sasl_security_properties_t *) pvalue;
+
+            resultPtr = Tcl_NewObj ();
+
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewStringObj ("min_ssf", -1));
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewLongObj (sp -> min_ssf));
+
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewStringObj ("max_ssf", -1));
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewLongObj (sp -> max_ssf));
+
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewStringObj ("max_bufsize", -1));
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewLongObj (sp -> maxbufsize));
+
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                     Tcl_NewStringObj ("flags", -1));
+            elemPtr = Tcl_NewObj ();
+            for (p = secprops_flags; p -> p_key; p++)
+                if (sp -> security_flags & p -> p_value) {
+                    Tcl_ListObjAppendElement (interp, elemPtr,
+                                              Tcl_NewStringObj (p -> p_key,
+                                                                -1));
+                    sp -> security_flags &= ~p -> p_value;
+                }
+            if (sp -> security_flags) {
+                char    buffer[BUFSIZ];
+
+                sprintf (buffer, "%u", sp -> security_flags);
+                Tcl_ListObjAppendElement (interp, elemPtr,
+                                          Tcl_NewStringObj (buffer, -1));
+            }
+            Tcl_ListObjAppendElement (interp, resultPtr, elemPtr);
+
+            break;
+        }
+
+        case SASL_GETOPTCTX:
+            offset = SASL_GETOPTCTX;
+        /* and fall... */
+
+        case SASL_CALLBACK:
+        {
+            cb_context_t    *cb;
+            sasl_callback_t *pp,
+                            *qp;
+
+            if (!(pp = (sasl_callback_t *) pvalue))
+                break;
+
+            if (offset == SASL_CALLBACK)
+                resultPtr = Tcl_NewObj ();
+            for (qp = pp; qp -> id != SASL_CB_LIST_END; qp++) {
+                if (offset == SASL_GETOPTCTX) {
+                    if (qp -> id != SASL_CB_GETOPT)
+                        continue;
+                    if ((cb = (cb_context_t *) qp -> context) != NULL)
+                        resultPtr = cb -> ctx_cmdPtr;
+                    break;
+                }
+
+                for (p = cb_pairs; p -> p_key; p++)
+                    if (p -> p_value == qp -> id)
+                        break;
+                if (!p -> p_key)
+                    continue;
+
+                elemPtr = Tcl_NewObj ();
+
+                Tcl_ListObjAppendElement (interp, elemPtr,
+                                          Tcl_NewStringObj (p -> p_key, -1));
+
+                if ((cb = (cb_context_t *) qp -> context) != NULL)
+                    Tcl_ListObjAppendElement (interp, elemPtr,
+                                              cb -> ctx_cmdPtr);
+
+                Tcl_ListObjAppendElement (interp, resultPtr, elemPtr);
+            }
+            break;
+        }
+
+        default:
+            Tcl_SetResult (interp, "internal error, missing known case",
+                           TCL_STATIC);
+            return TCL_ERROR;
+    }
+
+    if (resultPtr)
+        Tcl_SetObjResult (interp, resultPtr);
+    else
+        Tcl_ResetResult (interp);
+    return TCL_OK;
+}
+
+
+#define SETPROP_OPERATION       0
+#define SETPROP_PROPERTY        1
+#define SETPROP_VALUE           2
+
+#define SETPROP_MAXARGS         3
+#define SETPROP_OPTIONAL        SETPROP_MAXARGS
+
+static kv_pair_t setprop_args[] = {
+  { "-operation",               SETPROP_OPERATION               },
+  { "-property",                SETPROP_PROPERTY                },
+  { "-value",                   SETPROP_VALUE                   },
+
+  { NULL,                       0                               }
+};
+
+static kv_pair_t setprop_pairs[] = {
+  { "auth_external",            SASL_AUTH_EXTERNAL              },
+  { "defrealm",                 SASL_DEFUSERREALM               },
+  { "iplocalport",              SASL_IPLOCALPORT                },
+  { "ipremoteport",             SASL_IPREMOTEPORT               },
+  { "sec_props",                SASL_SEC_PROPS                  },
+  { "ssf_external",             SASL_SSF_EXTERNAL               },
+
+  { NULL,                       0                               }
+};
+
+#define SECPROPS_FLAGS          0
+#define SECPROPS_MAXBUFSIZ      1
+#define SECPROPS_MAXSSF         2
+#define SECPROPS_MINSSF         3
+
+#define SECPROPS_MAXPROPS       4
+
+static kv_pair_t secprops_pairs[] = {
+  { "flags",                    SECPROPS_FLAGS                  },
+  { "max_bufsize",              SECPROPS_MAXBUFSIZ              },
+  { "max_ssf",                  SECPROPS_MAXSSF                 },
+  { "min_ssf",                  SECPROPS_MINSSF                 },
+
+  { NULL,                       0                               }
+};
+
+
+static int
+sasl_aux_setprop (ClientData  data,
+                  Tcl_Interp *interp,
+                  int          objc,
+                  Tcl_Obj     *CONST objv[]) {
+    CONST void      *pvalue;
+    int              offset,
+                     result;
+    long             ssf;       
+    kv_pair_t       *p;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SETPROP_MAXARGS];
+
+    memset (args, 0, sizeof *args * SETPROP_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, setprop_args,
+                              SETPROP_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    if ((result = tcl_GetIndexFromObjStruct (interp, args[SETPROP_PROPERTY],
+                                             (char **) setprop_pairs,
+                                             sizeof *setprop_pairs, "property",
+                                             0, &offset)) != TCL_OK)
+        return result;
+    p = setprop_pairs + offset;
+
+    switch (p -> p_value) {
+        case SASL_SSF_EXTERNAL:
+            if ((result = Tcl_GetLongFromObj (interp, args[SETPROP_VALUE],
+                                              &ssf)) != TCL_OK)
+                return result;
+            pvalue = (void *) &ssf;
+            break;
+        
+        case SASL_AUTH_EXTERNAL:
+        case SASL_DEFUSERREALM:
+        case SASL_IPLOCALPORT:
+        case SASL_IPREMOTEPORT:
+            pvalue = (void *) Tcl_GetString (args[SETPROP_VALUE]);
+            break;
+
+        case SASL_SEC_PROPS:
+            {
+                int                         i,
+                                            nelem,
+                                            props[SECPROPS_MAXPROPS];
+                sasl_security_properties_t  sps,
+                                           *sp = &sps;
+
+                if ((result = Tcl_ListObjLength (interp,
+                                                 args[SETPROP_VALUE], &nelem))
+                        != TCL_OK)
+                    return result;
+                if (nelem % 2) {
+                    Tcl_SetResult (interp,
+                                   "expecting an even number of list elements",
+                                   TCL_STATIC);
+                    return TCL_ERROR;
+                }
+
+                memset (props, 0, sizeof *props * SECPROPS_MAXPROPS);
+                memset (sp, 0, sizeof *sp);
+                for (i = 0; i < nelem; i += 2) {
+                    int      offset;
+                    long     longValue;
+                    Tcl_Obj *elemPtr;
+
+                    if ((result = Tcl_ListObjIndex (interp,
+                                                    args[SETPROP_VALUE], i,
+                                                    &elemPtr)) != TCL_OK)
+                        return TCL_ERROR;
+                    if ((result =
+                             tcl_GetIndexFromObjStruct (interp, elemPtr,
+                                                        (char **) secprops_pairs,
+                                                        sizeof *secprops_pairs,
+                                                        "security property",
+                                                        0, &offset))
+                            != TCL_OK)
+                        return TCL_ERROR;
+                    if (props[offset]) {
+                        Tcl_ResetResult (interp);
+                        Tcl_AppendResult (interp, "property \"",
+                                          secprops_pairs[offset].p_key,
+                                          "\" appears more than once", NULL);
+                        return TCL_ERROR;
+                    }
+                    props[offset] = 1;
+
+                    if ((result = Tcl_ListObjIndex (interp,
+                                                    args[SETPROP_VALUE], i + 1,
+                                                    &elemPtr)) != TCL_OK)
+                        return TCL_ERROR;
+
+                    switch (offset) {
+                        case SECPROPS_FLAGS:
+                            if ((result = t2c_flags (interp, elemPtr,
+                                                     secprops_flags,
+                                                     &sp -> security_flags))
+                                    != TCL_OK)
+                                return result;
+                            break;
+
+                        case SECPROPS_MINSSF:
+                        case SECPROPS_MAXSSF:
+                        case SECPROPS_MAXBUFSIZ:
+                            if ((result = Tcl_GetLongFromObj (interp, elemPtr,
+                                                              &longValue))
+                                    != TCL_OK)
+                                return result;
+                            if (offset == SECPROPS_MINSSF)
+                                sp -> min_ssf = longValue;
+                            else if (offset == SECPROPS_MAXSSF)
+                                sp -> max_ssf = longValue;
+                            else
+                                sp -> maxbufsize = longValue;
+                            break;
+                    }
+                }
+                pvalue = (void *) sp;
+                break;
+            }
+
+        default:
+            Tcl_SetResult (interp, "internal error, missing known case",
+                           TCL_STATIC);
+            return TCL_ERROR;
+    }
+
+    return c2t_result (interp, "sasl_setprop",
+                       sasl_setprop (sd -> sd_conn, p -> p_value, pvalue));
+}
+
+
+static int
+sasl_aux_errdetail (ClientData  data,
+                  Tcl_Interp *interp,
+                  int         objc,
+                  Tcl_Obj    *CONST objv[]) {
+    sasl_data_t   *sd = (sasl_data_t *) data;
+
+    if (objc != 3) {
+        Tcl_ResetResult (interp);
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
+                          " -operation errdetail", NULL);
+        return TCL_ERROR;
+    }
+
+    Tcl_SetObjResult (interp,
+                      Tcl_NewStringObj (sasl_errdetail (sd -> sd_conn), -1));
+    return TCL_OK;
+}
+
+
+static int
+sasl_aux_info (ClientData  data,
+                  Tcl_Interp *interp,
+                  int         objc,
+                  Tcl_Obj    *CONST objv[]) {
+    oc_pair_t     *pp;
+    sasl_data_t   *sd = (sasl_data_t *) data;
+    Tcl_Obj       *resultPtr;
+
+    if (objc != 3) {
+        Tcl_ResetResult (interp);
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
+                          " -operation info", NULL);
+        return TCL_ERROR;
+    }
+
+    resultPtr = Tcl_NewObj ();
+    for (pp = sd -> sd_dispatch; pp -> p_key; pp++)
+        Tcl_ListObjAppendElement (interp, resultPtr,
+                                  Tcl_NewStringObj (pp -> p_key, -1));
+
+    Tcl_SetObjResult (interp, resultPtr);
+    return TCL_OK;
+}
+
+
+/* server routines */
+
+#define SERVERINIT_CALLBACKS    0
+#define SERVERINIT_APPNAME      1
+
+#define SERVERINIT_MAXARGS      2
+#define SERVERINIT_OPTIONAL     SERVERINIT_APPNAME
+
+static kv_pair_t serverinit_args[] = {
+  { "-callbacks",               SERVERINIT_CALLBACKS            },
+  { "-appname",                 SERVERINIT_APPNAME              },
+
+  { NULL,                       0                               }
+};
+
+/* ARGSUSED */
+
+static int
+server_init (ClientData  unused,
+             Tcl_Interp *interp,
+             int          objc,
+             Tcl_Obj     *CONST objv[]) {
+    int              result;
+    char            *appname;
+    sasl_callback_t *cb;
+    Tcl_Obj         *args[SERVERINIT_MAXARGS];
+
+    if (objc == 1)
+        return t2c_usage (interp, objv[0], serverinit_args,
+                          SERVERINIT_OPTIONAL, NULL, NULL);
+
+    memset (args, 0, sizeof *args * SERVERINIT_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, serverinit_args,
+                              SERVERINIT_OPTIONAL, args) != TCL_OK))
+        return result;
+
+    if (args[SERVERINIT_APPNAME] != NULL)
+        appname = Tcl_GetString (args[SERVERINIT_APPNAME]);
+    else if (!(appname = Tcl_GetVar (interp, "argv0",
+                                     TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG)))
+        return TCL_ERROR;
+
+    if (!(cb = t2c_sasl_callback (interp, args[SERVERINIT_CALLBACKS])))
+        return TCL_ERROR;
+
+    if ((result = sasl_server_init (cb, appname)) != SASL_OK) {
+        Tcl_HashEntry *entryPtr;
+
+        if ((entryPtr = Tcl_FindHashEntry (&allocTable, (char *) cb)) != NULL)
+            Tcl_DeleteHashEntry (entryPtr);
+        free ((char *) cb);
+    }
+    
+    return c2t_result (interp, "sasl_server_init", result);
+}
+
+
+#define SAUXLIST_OPERATION      0
+#define SAUXLIST_USER           1
+
+#define SAUXLIST_MAXARGS        2
+#define SAUXLIST_OPTIONAL       SAUXLIST_USER
+
+static kv_pair_t sauxlist_args[] = {
+  { "-operation",               SAUXLIST_OPERATION              },
+  { "-user",                    SAUXLIST_USER                   },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_list (ClientData  data,
+                  Tcl_Interp *interp,
+                  int          objc,
+                  Tcl_Obj     *CONST objv[]) {
+    int              result;
+    CONST char      *mptr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SAUXLIST_MAXARGS];
+
+    memset (args, 0, sizeof *args * SAUXLIST_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, sauxlist_args,
+                              SAUXLIST_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    if ((result = sasl_listmech (sd -> sd_conn,
+                                 Tcl_Obj2String (args[SAUXLIST_USER]),
+                                 NULL, " ", NULL, &mptr, NULL, NULL))
+            != SASL_OK)
+        return c2t_result (interp, "sasl_listmech", result);
+
+    Tcl_SetObjResult (interp, Tcl_NewStringObj (mptr, -1));
+    return TCL_OK;
+}
+
+
+#define SAUXSTART_OPERATION     0
+#define SAUXSTART_MECHANISM     1
+#define SAUXSTART_INPUT         2
+
+#define SAUXSTART_MAXARGS       3
+#define SAUXSTART_OPTIONAL      SAUXSTART_INPUT
+
+static kv_pair_t sauxstart_args[] = {
+  { "-operation",               SAUXSTART_OPERATION             },
+  { "-mechanism",               SAUXSTART_MECHANISM             },
+  { "-input",                   SAUXSTART_INPUT                 },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_start (ClientData  data,
+                  Tcl_Interp *interp,
+                  int          objc,
+                  Tcl_Obj     *CONST objv[]) {
+    int              ilen,
+                     olen,
+                     result;
+    CONST char      *iptr,
+                    *optr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SAUXSTART_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], sauxstart_args, SAUXSTART_OPTIONAL,
+                          "start", NULL);
+
+    memset (args, 0, sizeof *args * SAUXSTART_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, sauxstart_args,
+                              SAUXSTART_OPTIONAL, args)) != TCL_OK)
+        return result;
+    if (args[SAUXSTART_INPUT] != NULL)
+        iptr = Tcl_GetByteArrayFromObj (args[SAUXSTART_INPUT], &ilen);
+    else
+        iptr = NULL, ilen = 0;
+
+    optr = NULL, olen = 0;
+    switch (result =
+                sasl_server_start (sd -> sd_conn,
+                                   Tcl_GetString (args[SAUXSTART_MECHANISM]),
+                                    iptr, ilen, &optr, &olen)) {
+        case SASL_OK:
+        case SASL_CONTINUE:
+            Tcl_SetObjResult (interp,
+                              Tcl_NewByteArrayObj ((unsigned char *) optr,
+                                                   olen));
+            return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
+
+        default:
+            return c2t_result (interp, "sasl_server_start", result);
+    }
+}
+
+
+#define SAUXSTEP_OPERATION      0
+#define SAUXSTEP_INPUT          1
+
+#define SAUXSTEP_MAXARGS        2
+#define SAUXSTEP_OPTIONAL       SAUXSTEP_MAXARGS
+
+static kv_pair_t sauxstep_args[] = {
+  { "-operation",               SAUXSTEP_OPERATION              },
+  { "-input",                   SAUXSTEP_INPUT                  },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_step (ClientData  data,
+                 Tcl_Interp *interp,
+                 int          objc,
+                 Tcl_Obj     *CONST objv[]) {
+    int              ilen,
+                     olen,
+                     result;
+    CONST char      *iptr,
+                    *optr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SAUXSTEP_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], sauxstep_args, SAUXSTEP_OPTIONAL,
+                          "step", NULL);
+
+    memset (args, 0, sizeof *args * SAUXSTEP_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, sauxstep_args,
+                              SAUXSTEP_OPTIONAL, args)) != TCL_OK)
+        return result;
+    iptr = Tcl_GetByteArrayFromObj (args[SAUXSTEP_INPUT], &ilen);
+
+    switch (result = sasl_server_step (sd -> sd_conn, iptr, ilen, &optr,
+                                       &olen)) {
+        case SASL_OK:
+        case SASL_CONTINUE:
+            Tcl_SetObjResult (interp,
+                              Tcl_NewByteArrayObj ((unsigned char *) optr,
+                                                   olen));
+            return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
+
+        default:
+            return c2t_result (interp, "sasl_server_step", result);
+    }
+};
+
+
+#define SAUXCPASS_OPERATION     0
+#define SAUXCPASS_USER          1
+#define SAUXCPASS_PASS          2
+
+#define SAUXCPASS_MAXARGS       3
+#define SAUXCPASS_OPTIONAL      SAUXCPASS_MAXARGS
+
+static kv_pair_t sauxcpass_args[] = {
+  { "-operation",               SAUXCPASS_OPERATION             },
+  { "-user",                    SAUXCPASS_USER                  },
+  { "-pass",                    SAUXCPASS_PASS                  },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_cpass (ClientData  data,
+                 Tcl_Interp *interp,
+                 int          objc,
+                 Tcl_Obj     *CONST objv[]) {
+    int              ulen,
+                     plen,
+                     result;
+    CONST char      *uptr,
+                    *pptr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SAUXCPASS_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], sauxcpass_args, SAUXCPASS_OPTIONAL,
+                          "checkpass", NULL);
+
+    memset (args, 0, sizeof *args * SAUXCPASS_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, sauxcpass_args,
+                              SAUXCPASS_OPTIONAL, args)) != TCL_OK)
+        return result;
+    uptr = Tcl_GetByteArrayFromObj (args[SAUXCPASS_USER], &ulen);
+    pptr = Tcl_GetByteArrayFromObj (args[SAUXCPASS_PASS], &plen);
+
+    return c2t_result (interp, "sasl_checkpass",
+                       sasl_checkpass (sd -> sd_conn, uptr, ulen, pptr, plen));
+};
+
+
+#define SAUXCUSER_OPERATION     0
+#define SAUXCUSER_SERVER        1
+#define SAUXCUSER_USER          2
+#define SAUXCUSER_REALM         3
+
+#define SAUXCUSER_MAXARGS       4
+#define SAUXCUSER_OPTIONAL      SAUXCUSER_REALM
+
+static kv_pair_t sauxcuser_args[] = {
+  { "-operation",               SAUXCUSER_OPERATION             },
+  { "-server",                  SAUXCUSER_SERVER                },
+  { "-user",                    SAUXCUSER_USER                  },
+  { "-realm",                   SAUXCUSER_REALM                 },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_cuser (ClientData  data,
+                 Tcl_Interp *interp,
+                 int          objc,
+                 Tcl_Obj     *CONST objv[]) {
+    int              result;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SAUXCUSER_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], sauxcuser_args, SAUXCUSER_OPTIONAL,
+                          "userexists", NULL);
+
+    memset (args, 0, sizeof *args * SAUXCUSER_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, sauxcuser_args,
+                              SAUXCUSER_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+
+    return
+          c2t_result (interp, "sasl_user_exists",
+                      sasl_user_exists (sd -> sd_conn,
+                                        Tcl_GetString (args[SAUXCUSER_SERVER]),
+                                        Tcl_Obj2String (args[SAUXCUSER_REALM]),
+                                        Tcl_GetString (args[SAUXCUSER_USER])));
+}
+
+
+#define SAUXSPASS_OPERATION     0
+#define SAUXSPASS_USER          1
+#define SAUXSPASS_NEWPASS       2
+#define SAUXSPASS_OLDPASS       3
+#define SETPASS_FLAGS           4
+
+#define SAUXSPASS_MAXARGS       5
+#define SAUXSPASS_OPTIONAL      SAUXSPASS_NEWPASS
+
+static kv_pair_t sauxspass_args[] = {
+  { "-operation",               SAUXSPASS_OPERATION             },
+  { "-user",                    SAUXSPASS_USER                  },
+  { "-newpass",                 SAUXSPASS_NEWPASS               },
+  { "-oldpass",                 SAUXSPASS_OLDPASS               },
+  { "-flags",                   SETPASS_FLAGS                   },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_spass (ClientData  data,
+                 Tcl_Interp *interp,
+                 int          objc,
+                 Tcl_Obj     *CONST objv[]) {
+    int              nlen,
+                     olen,
+                     result;
+    unsigned         flags;
+    CONST char      *nptr,
+                    *optr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *args[SAUXSPASS_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], sauxspass_args, SAUXSPASS_OPTIONAL,
+                          "setpass", setpass_flags);
+
+    memset (args, 0, sizeof *args * SAUXSPASS_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, sauxspass_args,
+                              SAUXSPASS_OPTIONAL, args)) != TCL_OK)
+        return result;
+    if (args[SAUXSPASS_NEWPASS] != NULL)
+        nptr = Tcl_GetByteArrayFromObj (args[SAUXSPASS_NEWPASS], &nlen);
+    else
+        nptr = NULL, nlen = 0;
+    if (args[SAUXSPASS_OLDPASS] != NULL)
+        optr = Tcl_GetByteArrayFromObj (args[SAUXSPASS_NEWPASS], &olen);
+    else
+        optr = NULL, olen = 0;
+    if ((result = t2c_flags (interp, args[SETPASS_FLAGS], setpass_flags,
+                             &flags)) != TCL_OK)
+        return result;
+
+    return c2t_result (interp, "sasl_setpass",
+                       sasl_setpass (sd -> sd_conn,
+                                     Tcl_GetString (args[SAUXSPASS_USER]),
+                                     nptr, nlen, optr, olen, flags));
+};
+
+
+#define SPROPREQ_OPERATION      0
+#define SPROPREQ_PROPERTIES     1
+
+#define SPROPREQ_MAXARGS        2
+#define SPROPREQ_OPTIONAL       SPROPREQ_PROPERTIES
+
+static kv_pair_t spropreq_args[] = {
+  { "-operation",               SPROPREQ_OPERATION              },
+  { "-properties",              SPROPREQ_PROPERTIES             },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_propreq (ClientData  data,
+                    Tcl_Interp *interp,
+                    int         objc,
+                    Tcl_Obj    *CONST objv[]) {
+  int                i,
+                     nelem,
+                     result;
+    char           **ap,
+                    *mp;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    Tcl_Obj         *objPtr,
+                    *args[SPROPREQ_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], spropreq_args, SPROPREQ_OPTIONAL,
+                          "userexists", NULL);
+
+    memset (args, 0, sizeof *args * SPROPREQ_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, spropreq_args,
+                              SPROPREQ_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    if (!(objPtr = args[SPROPREQ_PROPERTIES]))
+        return c2t_result (interp, "sasl_auxprop_request",
+                           sasl_auxprop_request (sd -> sd_conn, NULL));
+
+    if ((result = Tcl_ListObjLength (interp, objPtr, &nelem)) != TCL_OK)
+        return result;
+
+    mp = Tcl_Alloc ((nelem + 1) * sizeof *ap);
+
+    ap = (char **) mp;
+    for (i = 0; i < nelem; i++) {
+        Tcl_Obj *elemPtr;
+
+        if ((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
+              != TCL_OK)
+            goto out;
+        *ap++ = Tcl_GetString (elemPtr);
+    }
+    *ap = NULL;
+
+    result = c2t_result (interp, "sasl_auxprop_request",
+                           sasl_auxprop_request (sd -> sd_conn,
+                                                 (const char **) mp));
+
+out: ;
+    Tcl_Free (mp);
+
+    return result;
+}
+
+
+
+#define SPROPGET_OPERATION      0
+
+#define SPROPGET_MAXARGS        1
+#define SPROPGET_OPTIONAL       SPROPGET_MAXARGS
+
+static kv_pair_t spropget_args[] = {
+  { "-operation",               SPROPGET_OPERATION              },
+
+  { NULL,                       0                               }
+};
+
+static int
+server_aux_propget (ClientData  data,
+                    Tcl_Interp *interp,
+                    int         objc,
+                    Tcl_Obj    *CONST objv[]) {
+    int              result;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    propctx_t       *pc;
+    Tcl_Obj         *args[SPROPGET_MAXARGS];
+
+    memset (args, 0, sizeof *args * SPROPGET_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, spropget_args,
+                              SPROPGET_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    if ((pc = sasl_auxprop_getctx (sd -> sd_conn)) != NULL)
+        Tcl_SetObjResult (interp, c2t_propctx (pc));
+    else
+        Tcl_ResetResult (interp);
+    return TCL_OK;
+}
+
+
+#define SERVERNEW_SERVICE       0
+#define SERVERNEW_SERVERFQDN    1
+#define SERVERNEW_IPLOCALPORT   2
+#define SERVERNEW_IPREMOTEPORT  3
+#define SERVERNEW_CALLBACKS     4
+#define SERVERNEW_FLAGS         5
+#define SERVERNEW_REALM         6
+
+#define SERVERNEW_MAXARGS       7
+#define SERVERNEW_OPTIONAL      SERVERNEW_SERVERFQDN
+
+static kv_pair_t servernew_args[] = {
+  { "-service",                 SERVERNEW_SERVICE               },
+  { "-serverFQDN",              SERVERNEW_SERVERFQDN            },
+  { "-realm",                   SERVERNEW_REALM                 },
+  { "-iplocalport",             SERVERNEW_IPLOCALPORT           },
+  { "-ipremoteport",            SERVERNEW_IPREMOTEPORT          },
+  { "-callbacks",               SERVERNEW_CALLBACKS             },
+  { "-flags",                   SERVERNEW_FLAGS                 },
+
+  { NULL,                       0                               }
+};
+
+static kv_pair_t servernew_flags[] = {
+  { "success_data",             SASL_SUCCESS_DATA               },
+
+  { NULL,                       0                               }
+};
+
+static oc_pair_t server_aux_pairs[] = {
+  { "auxprop_request",          server_aux_propreq              },
+  { "auxprop_getctx",           server_aux_propget              },
+  { "checkpass",                server_aux_cpass                },
+  { "decode",                   sasl_aux_decode                 },
+  { "encode",                   sasl_aux_encode                 },
+  { "errdetail",                sasl_aux_errdetail              },
+  { "getprop",                  sasl_aux_getprop                },
+  { "info",                     sasl_aux_info                   },
+  { "list",                     server_aux_list                 },
+  { "setpass",                  server_aux_spass                },
+  { "setprop",                  sasl_aux_setprop                },
+  { "start",                    server_aux_start                },
+  { "step",                     server_aux_step                 },
+  { "userexists",               server_aux_cuser                },
+
+  { NULL,                       0                               }
+};
+
+/* ARGSUSED */
+
+static int
+server_new (ClientData  unused,
+            Tcl_Interp *interp,
+            int          objc,
+            Tcl_Obj     *CONST objv[]) {
+    int            result;
+    unsigned       flags;
+    char           buffer[BUFSIZ],
+                  *cp;
+    sasl_data_t   *sd;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Obj       *args[SERVERNEW_MAXARGS];
+    static int     nproc = 0;
+
+    if (objc == 1)
+        return t2c_usage (interp, objv[0], servernew_args, SERVERNEW_OPTIONAL,
+                          NULL, servernew_flags);
+
+    memset (args, 0, sizeof *args * SERVERNEW_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, servernew_args,
+                              SERVERNEW_OPTIONAL, args) != TCL_OK))
+        return result;
+    if ((result = t2c_flags (interp, args[SERVERNEW_FLAGS], servernew_flags,
+                             &flags)) != TCL_OK)
+        return result;
+
+    cp = Tcl_Alloc (sizeof *sd);
+    memset (cp, 0, sizeof *sd);
+    sd = (sasl_data_t *) cp;
+    sd -> sd_dispatch = server_aux_pairs;
+
+    if ((args[SERVERNEW_CALLBACKS] != NULL)
+            && (!(sd -> sd_cb =
+                      t2c_sasl_callback (interp, args[SERVERNEW_CALLBACKS]))))
+        goto out;
+
+    if ((result =
+             sasl_server_new (Tcl_GetString (args[SERVERNEW_SERVICE]),
+                              Tcl_Obj2String (args[SERVERNEW_SERVERFQDN]),
+                              Tcl_Obj2String (args[SERVERNEW_REALM]),
+                              Tcl_Obj2String (args[SERVERNEW_IPLOCALPORT]),
+                              Tcl_Obj2String (args[SERVERNEW_IPREMOTEPORT]),
+                              sd -> sd_cb, flags,
+                              &sd -> sd_conn) != SASL_OK)) {
+        c2t_result (interp, "sasl_server_new", result);
+        goto out;
+    }
+    
+    sprintf (buffer, "::sasl::server_new_%d", nproc++);
+    sd -> sd_token = Tcl_CreateObjCommand (sd -> sd_interp = interp, buffer,
+                                           sasl_aux_proc, (ClientData) sd,
+                                           sasl_aux_free);
+
+    entryPtr = Tcl_CreateHashEntry (&connTable, (char *) sd -> sd_conn,
+                                    &result);
+    Tcl_SetHashValue (entryPtr, (ClientData) sd);
+
+    Tcl_SetResult (interp, buffer, TCL_VOLATILE);
+    return TCL_OK;
+
+out: ;
+    sasl_aux_free ((ClientData) sd);
+
+    return TCL_ERROR;
+}
+
+
+/* client routines */
+
+#define CLIENTINIT_CALLBACKS    0
+
+#define CLIENTINIT_MAXARGS      1
+#define CLIENTINIT_OPTIONAL     CLIENTINIT_MAXARGS
+
+static kv_pair_t clientinit_args[] = {
+  { "-callbacks",               CLIENTINIT_CALLBACKS            },
+
+  { NULL,                       0                               }
+};
+
+/* ARGSUSED */
+
+static int
+client_init (ClientData  unused,
+             Tcl_Interp *interp,
+             int          objc,
+             Tcl_Obj     *CONST objv[]) {
+    int              result;
+    sasl_callback_t *cb;
+    Tcl_Obj         *args[CLIENTINIT_MAXARGS];
+
+    if (objc == 1)
+        return t2c_usage (interp, objv[0], clientinit_args,
+                          CLIENTINIT_OPTIONAL, NULL, NULL);
+
+    memset (args, 0, sizeof *args * CLIENTINIT_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, clientinit_args,
+                              CLIENTINIT_OPTIONAL, args) != TCL_OK))
+        return result;
+
+    if (!(cb = t2c_sasl_callback (interp, args[CLIENTINIT_CALLBACKS])))
+        return TCL_ERROR;
+
+    if ((result = sasl_client_init (cb)) != SASL_OK) {
+        Tcl_HashEntry *entryPtr;
+
+        if ((entryPtr = Tcl_FindHashEntry (&allocTable, (char *) cb)) != NULL)
+            Tcl_DeleteHashEntry (entryPtr);
+        free ((char *) cb);
+    }
+    
+    return c2t_result (interp, "sasl_client_init", result);
+
+}
+
+
+static int
+client_aux_interact (Tcl_Interp      *interp,
+                     Tcl_Obj         *cmdPtr,
+                     sasl_interact_t *interact) {
+    int              result;
+    kv_pair_t       *p;
+    sasl_interact_t *ip;
+    Tcl_Obj         *argPtr,
+                    *evalPtr;
+
+    if (!interact)
+        return TCL_OK;
+
+    for (ip = interact; ip -> id != SASL_CB_LIST_END; ip++) {
+        ip -> result = NULL, ip -> len = 0;
+
+        if (!cmdPtr)
+            return TCL_OK;
+
+        for (p = cb_pairs; p -> p_key; p++)
+            if (p -> p_value == ip -> id)
+                break;
+        if (!p -> p_key)
+            continue;
+
+        argPtr = Tcl_NewObj ();
+
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj ("id", -1));
+        Tcl_ListObjAppendElement (interp, argPtr,
+                                  Tcl_NewStringObj (p -> p_key, -1));
+
+        if (ip -> challenge) {
+            Tcl_ListObjAppendElement (interp, argPtr,
+                                      Tcl_NewStringObj ("challenge", -1));
+            Tcl_ListObjAppendElement (interp, argPtr,
+                                      Tcl_NewStringObj (ip -> challenge, -1));
+        }
+
+        if (ip -> prompt) {
+            Tcl_ListObjAppendElement (interp, argPtr,
+                                      Tcl_NewStringObj ("prompt", -1));
+            Tcl_ListObjAppendElement (interp, argPtr,
+                                      Tcl_NewStringObj (ip -> prompt, -1));
+        }
+
+        if (ip -> defresult) {
+            Tcl_ListObjAppendElement (interp, argPtr,
+                                      Tcl_NewStringObj ("default", -1));
+            Tcl_ListObjAppendElement (interp, argPtr,
+                                      Tcl_NewStringObj (ip -> defresult, -1));
+        }
+
+        evalPtr = Tcl_DuplicateObj (cmdPtr);
+        if ((result = Tcl_ListObjAppendElement (interp, evalPtr, argPtr))
+                != TCL_OK)
+            return result;
+        if ((result = Tcl_EvalObjEx (interp, evalPtr, TCL_EVAL_DIRECT)) 
+                == TCL_OK)
+            ip -> result = allocate (interp, &ip -> len);
+    }
+
+    return TCL_OK;
+}
+
+
+static void
+client_aux_interact_free () {
+    Tcl_HashEntry  *entryPtr;
+    Tcl_HashSearch  hs,
+                   *searchPtr = &hs;
+
+    for (entryPtr = Tcl_FirstHashEntry (&allocTable, searchPtr);
+             entryPtr != NULL;
+             entryPtr = Tcl_NextHashEntry (searchPtr)) {
+        int     refcnt = (int) Tcl_GetHashValue (entryPtr);
+
+        if (refcnt > 0)
+            continue;
+
+        Tcl_Free (Tcl_GetHashKey (&allocTable, entryPtr));
+        Tcl_DeleteHashEntry (entryPtr);
+    }
+}
+
+
+#define CAUXSTART_OPERATION     0
+#define CAUXSTART_MECHANISMS    1
+#define CAUXSTART_INTERACT      2
+
+#define CAUXSTART_MAXARGS       3
+#define CAUXSTART_OPTIONAL      CAUXSTART_INTERACT
+
+static kv_pair_t cauxstart_args[] = {
+  { "-operation",               CAUXSTART_OPERATION             },
+  { "-mechanisms",              CAUXSTART_MECHANISMS            },
+  { "-interact",                CAUXSTART_INTERACT              },
+
+  { NULL,                       0                               }
+};
+
+static int
+client_aux_start (ClientData  data,
+                  Tcl_Interp *interp,
+                  int          objc,
+                  Tcl_Obj     *CONST objv[]) {
+    int              olen,
+                     result;
+    CONST char      *mechused,
+                    *optr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    sasl_interact_t *interact,
+                   **ip;
+    Tcl_Obj         *args[CAUXSTART_MAXARGS],
+                    *resultPtr;
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], cauxstart_args, CAUXSTART_OPTIONAL,
+                          "start", NULL);
+
+    memset (args, 0, sizeof *args * CAUXSTART_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, cauxstart_args,
+                              CAUXSTART_OPTIONAL, args)) != TCL_OK)
+        return result;
+
+    interact = NULL;
+    if (args[CAUXSTART_INTERACT] != NULL)
+        ip = &interact;
+    else
+        ip = NULL;
+    while ((result =
+                 sasl_client_start (sd -> sd_conn,
+                                    Tcl_GetString (args[CAUXSTART_MECHANISMS]),
+                                    ip, &optr, &olen, &mechused))
+                == SASL_INTERACT)
+        if ((result = client_aux_interact (interp, args[CAUXSTART_INTERACT],
+                                           interact))
+                != TCL_OK)
+            return result;
+
+    switch (result) {
+        case SASL_OK:
+            client_aux_interact_free ();
+        /* and fall... */
+
+        case SASL_CONTINUE:
+            resultPtr = Tcl_NewObj ();
+
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                      Tcl_NewStringObj ("mechanism", -1));
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                      Tcl_NewStringObj (mechused, -1));
+
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                      Tcl_NewStringObj ("output", -1));
+            Tcl_ListObjAppendElement (interp, resultPtr,
+                                      Tcl_NewByteArrayObj ((unsigned char *) optr,
+                                                           olen));
+
+            Tcl_SetObjResult (interp, resultPtr);
+            return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
+
+        default:
+            client_aux_interact_free ();
+            return c2t_result (interp, "sasl_client_start", result);
+    }
+}
+
+
+#define CAUXSTEP_OPERATION      0
+#define CAUXSTEP_INPUT          1
+#define CAUXSTEP_INTERACT       2
+
+#define CAUXSTEP_MAXARGS        3
+#define CAUXSTEP_OPTIONAL       CAUXSTEP_INTERACT
+
+static kv_pair_t cauxstep_args[] = {
+  { "-operation",               CAUXSTEP_OPERATION              },
+  { "-input",                   CAUXSTEP_INPUT                  },
+  { "-interact",                CAUXSTEP_INTERACT               },
+
+  { NULL,                       0                               }
+};
+
+static int
+client_aux_step (ClientData  data,
+                 Tcl_Interp *interp,
+                 int          objc,
+                 Tcl_Obj     *CONST objv[]) {
+    int              ilen,
+                     olen,
+                     result;
+    CONST char      *iptr,
+                    *optr;
+    sasl_data_t     *sd = (sasl_data_t *) data;
+    sasl_interact_t *interact,
+                   **ip;
+    Tcl_Obj         *args[CAUXSTEP_MAXARGS];
+
+    if (objc == 3)
+        return t2c_usage (interp, objv[0], cauxstep_args, CAUXSTEP_OPTIONAL,
+                          "step", NULL);
+
+    memset (args, 0, sizeof *args * CAUXSTEP_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, cauxstep_args,
+                              CAUXSTEP_OPTIONAL, args)) != TCL_OK)
+        return result;
+    iptr = Tcl_GetByteArrayFromObj (args[CAUXSTEP_INPUT], &ilen);
+
+    interact = NULL;
+    if (args[CAUXSTEP_INTERACT] != NULL)
+        ip = &interact;
+    else
+        ip = NULL;
+    while ((result = sasl_client_step (sd -> sd_conn, iptr, ilen, ip, &optr,
+                                       &olen)) == SASL_INTERACT)
+        if ((result = client_aux_interact (interp, args[CAUXSTEP_INTERACT],
+                                           interact))
+                != TCL_OK)
+            return result;
+
+    switch (result) {
+        case SASL_OK:
+            client_aux_interact_free ();
+        /* and fall... */
+
+        case SASL_CONTINUE:
+            Tcl_SetObjResult (interp,
+                              Tcl_NewByteArrayObj ((unsigned char *) optr,
+                                                   olen));
+            return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
+
+        default:
+            client_aux_interact_free ();
+            return c2t_result (interp, "sasl_client_step", result);
+    }
+};
+
+
+#define CLIENTNEW_SERVICE       0
+#define CLIENTNEW_SERVERFQDN    1
+#define CLIENTNEW_IPLOCALPORT   2
+#define CLIENTNEW_IPREMOTEPORT  3
+#define CLIENTNEW_CALLBACKS     4
+#define CLIENTNEW_FLAGS         5
+
+#define CLIENTNEW_MAXARGS       6
+#define CLIENTNEW_OPTIONAL      CLIENTNEW_IPLOCALPORT
+
+static kv_pair_t clientnew_args[] = {
+  { "-service",                 CLIENTNEW_SERVICE               },
+  { "-serverFQDN",              CLIENTNEW_SERVERFQDN            },
+  { "-iplocalport",             CLIENTNEW_IPLOCALPORT           },
+  { "-ipremoteport",            CLIENTNEW_IPREMOTEPORT          },
+  { "-callbacks",               CLIENTNEW_CALLBACKS             },
+  { "-flags",                   CLIENTNEW_FLAGS                 },
+
+  { NULL,                       0                               }
+};
+
+#define clientnew_flags servernew_flags
+
+static oc_pair_t client_aux_pairs[] = {
+  { "decode",                   sasl_aux_decode                 },
+  { "encode",                   sasl_aux_encode                 },
+  { "errdetail",                sasl_aux_errdetail              },
+  { "getprop",                  sasl_aux_getprop                },
+  { "info",                     sasl_aux_info                   },
+  { "setprop",                  sasl_aux_setprop                },
+  { "start",                    client_aux_start                },
+  { "step",                     client_aux_step                 },
+
+  { NULL,                       0                               }
+};
+
+
+/* ARGSUSED */
+
+static int
+client_new (ClientData  unused,
+            Tcl_Interp *interp,
+            int          objc,
+            Tcl_Obj     *CONST objv[]) {
+    int            result;
+    unsigned       flags;
+    char           buffer[BUFSIZ],
+                  *cp;
+    sasl_data_t   *sd;
+    Tcl_HashEntry *entryPtr;
+    Tcl_Obj       *args[CLIENTNEW_MAXARGS];
+    static int     nproc = 0;
+
+    if (objc == 1)
+        return t2c_usage (interp, objv[0], clientnew_args, CLIENTNEW_OPTIONAL,
+                          NULL, clientnew_flags);
+
+    memset (args, 0, sizeof *args * CLIENTNEW_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, clientnew_args,
+                              CLIENTNEW_OPTIONAL, args) != TCL_OK))
+        return result;
+    if ((result = t2c_flags (interp, args[CLIENTNEW_FLAGS], clientnew_flags,
+                             &flags)) != TCL_OK)
+        return result;
+
+    cp = Tcl_Alloc (sizeof *sd);
+    memset (cp, 0, sizeof *sd);
+    sd = (sasl_data_t *) cp;
+    sd -> sd_dispatch = client_aux_pairs;
+
+    if ((args[CLIENTNEW_CALLBACKS] != NULL)
+            && (!(sd -> sd_cb =
+                      t2c_sasl_callback (interp, args[CLIENTNEW_CALLBACKS]))))
+        goto out;
+
+    if ((result =
+             sasl_client_new (Tcl_GetString (args[CLIENTNEW_SERVICE]),
+                              Tcl_GetString (args[CLIENTNEW_SERVERFQDN]),
+                              Tcl_Obj2String (args[CLIENTNEW_IPLOCALPORT]),
+                              Tcl_Obj2String (args[CLIENTNEW_IPREMOTEPORT]),
+                              sd -> sd_cb, flags,
+                              &sd -> sd_conn) != SASL_OK)) {
+        c2t_result (interp, "sasl_client_new", result);
+        goto out;
+    }
+    
+    sprintf (buffer, "::sasl::client_new_%d", nproc++);
+    sd -> sd_token = Tcl_CreateObjCommand (sd -> sd_interp = interp, buffer,
+                                           sasl_aux_proc, (ClientData) sd,
+                                           sasl_aux_free);
+
+    entryPtr = Tcl_CreateHashEntry (&connTable, (char *) sd -> sd_conn,
+                                    &result);
+    Tcl_SetHashValue (entryPtr, (ClientData) sd);
+
+    Tcl_SetResult (interp, buffer, TCL_VOLATILE);
+    return TCL_OK;
+
+out: ;
+    sasl_aux_free ((ClientData) sd);
+
+    return TCL_ERROR;
+}
+
+
+/* the {de,en}code64 commands */
+
+static int
+proc_codec64 (Tcl_Interp  *interp,
+              char        *codep,
+              int        (*codec) (),
+              int          type,
+              Tcl_Obj     *string) {
+    int              result;
+    unsigned         ilen,
+                     olen,
+                     omax;
+    CONST char      *iptr;
+    char            *optr;
+
+    iptr = Tcl_GetByteArrayFromObj (string, &ilen);
+
+    omax = (type == 'e') ? ((ilen + 2) * 4) / 3 : ilen;
+    optr = Tcl_Alloc (++omax);
+
+    if ((result = (*codec) (iptr, ilen, optr, omax, &olen)) != SASL_OK)
+        result = c2t_result (interp, codep, result);
+    else {
+        result = TCL_OK;
+        Tcl_SetObjResult (interp, Tcl_NewByteArrayObj (optr, olen));
+    }
+
+    Tcl_Free (optr);
+
+    return TCL_OK;
+}
+
+
+/* ARGSUSED */
+
+static int
+proc_decode64 (ClientData  unused,
+               Tcl_Interp *interp,
+               int         objc,
+               Tcl_Obj    *CONST objv[]) {
+    if (objc != 2) {
+        Tcl_ResetResult (interp);
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
+                          " string", NULL);
+        return TCL_ERROR;
+    }
+
+    return proc_codec64 (interp, "sasl_decode64", sasl_decode64, 'd', objv[1]);
+}
+
+
+/* ARGSUSED */
+
+static int
+proc_encode64 (ClientData  unused,
+               Tcl_Interp *interp,
+               int         objc,
+               Tcl_Obj    *CONST objv[]) {
+    if (objc != 2) {
+        Tcl_ResetResult (interp);
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
+                          " string", NULL);
+        return TCL_ERROR;
+    }
+
+    return proc_codec64 (interp, "sasl_encode64", sasl_encode64, 'e', objv[1]);
+}
+
+
+/* the "errstring" command */
+
+#define ERRSTRING_CODE          0
+#define ERRSTRING_LANGUAGES     1
+
+#define ERRSTRING_MAXARGS       2
+#define ERRSTRING_OPTIONAL      ERRSTRING_LANGUAGES
+
+static kv_pair_t errstring_args[] = {
+  { "-code",                    ERRSTRING_CODE                  },
+  { "-languages",               ERRSTRING_LANGUAGES             },
+
+  { NULL,                       0                               }
+};
+
+/* ARGSUSED */
+
+static int
+proc_errstring (ClientData  unused,
+                Tcl_Interp *interp,
+                int         objc,
+                Tcl_Obj    *CONST objv[]) {
+    int      intValue,
+             result;
+    char    *langPtr;
+    Tcl_Obj *resultPtr,
+            *args[ERRSTRING_MAXARGS];
+
+    if (objc == 1)
+        return t2c_usage (interp, objv[0], errstring_args,
+                          ERRSTRING_OPTIONAL, NULL, NULL);
+
+    memset (args, 0, sizeof *args * ERRSTRING_MAXARGS);
+    if ((result = crack_args (interp, objc, objv, errstring_args,
+                              ERRSTRING_OPTIONAL, args) != TCL_OK))
+        return result;
+
+    if ((result = Tcl_GetIntFromObj (interp, args[ERRSTRING_CODE], &intValue))
+            != TCL_OK)
+        return result;
+
+
+    resultPtr = Tcl_NewObj ();
+
+    Tcl_ListObjAppendElement (interp, resultPtr,
+                              Tcl_NewStringObj ("diagnostic", -1));
+    Tcl_ListObjAppendElement (interp, resultPtr, Tcl_NewStringObj (
+        sasl_errstring (intValue, Tcl_Obj2String (args[ERRSTRING_LANGUAGES]),
+                        (const char **) &langPtr), -1));
+    
+    if (langPtr) {
+        Tcl_ListObjAppendElement (interp, resultPtr,
+                                  Tcl_NewStringObj ("language", -1));
+        Tcl_ListObjAppendElement (interp, resultPtr,
+                                  Tcl_NewStringObj (langPtr, -1));
+    }
+    
+    Tcl_SetObjResult (interp, resultPtr);
+    return TCL_OK;
+}
+
+
+/* the "mechanisms" command */
+
+/* ARGSUSED */
+
+static int
+proc_mechanisms (ClientData  unused,
+                 Tcl_Interp *interp,
+                 int         objc,
+                 Tcl_Obj    *CONST objv[]) {
+    char    **mp;
+    Tcl_Obj  *resultPtr;
+
+    Tcl_ResetResult (interp);
+
+    if (objc != 1) {
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]), NULL);
+        return TCL_ERROR;
+    }
+
+    if (!(mp = (char **) sasl_global_listmech ()))
+        return TCL_OK;
+
+    resultPtr = Tcl_NewObj ();
+
+    for (; *mp; mp++)
+        Tcl_ListObjAppendElement (interp, resultPtr,
+                                  Tcl_NewStringObj (*mp, -1));
+    
+    Tcl_SetObjResult (interp, resultPtr);
+    return TCL_OK;
+}
+
+
+/* the "info" command */
+
+
+#define INFO_CALLBACKS  0
+#define INFO_CANONFLAGS 1
+#define INFO_CNEWFLAGS  2
+#define INFO_GETPROPS   3
+#define INFO_SECFLAGS   4
+#define INFO_SECPROPS   5
+#define INFO_SNEWFLAGS  6
+#define INFO_SPASSFLAGS 7
+#define INFO_SETPROPS   8
+#define INFO_VRFYTYPES  9
+
+static kv_pair_t info_pairs[] = {
+  { "callbacks",                INFO_CALLBACKS                  },
+  { "canon_flags",              INFO_CANONFLAGS                 },
+  { "clientnew_flags",          INFO_CNEWFLAGS                  },
+  { "getprops",                 INFO_GETPROPS                   },
+  { "sec_flags",                INFO_SECFLAGS                   },
+  { "sec_props",                INFO_SECPROPS                   },
+  { "servernew_flags",          INFO_SNEWFLAGS                  },
+  { "setpass_flags",            INFO_SPASSFLAGS                 },
+  { "setprops",                 INFO_SETPROPS                   },
+  { "verify_types",             INFO_VRFYTYPES                  },
+
+  { NULL,                       0                               }
+};
+
+
+/* ARGSUSED */
+
+static int
+proc_info (ClientData  unused,
+           Tcl_Interp *interp,
+           int         objc,
+           Tcl_Obj    *CONST objv[]) {
+    int          result;
+    kv_pair_t   *p;
+    Tcl_Obj     *resultPtr;
+
+    if (objc == 1)
+        p = info_pairs;
+    else if (objc != 2) {
+        Tcl_ResetResult (interp);
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
+                          " option", NULL);
+        return TCL_ERROR;
+    } else {
+        int     offset;
+        if ((result = tcl_GetIndexFromObjStruct (interp, objv[1],
+                                                 (char **) info_pairs,
+                                                 sizeof *info_pairs,
+                                                 "option", 0, &offset))
+                != TCL_OK)
+            return result;
+
+        switch (offset) {
+            case INFO_CALLBACKS:
+                p = cb_pairs;
+                break;
+    
+            case INFO_CANONFLAGS:
+                p = canon_flags;
+                break;
+
+            case INFO_CNEWFLAGS:
+                p = clientnew_flags;
+                break;
+
+            case INFO_GETPROPS:
+                p = getprop_pairs;
+                break;
+    
+            case INFO_SECFLAGS:
+                p = secprops_flags;
+                break;
+    
+            case INFO_SECPROPS:
+                p = secprops_pairs;
+                break;
+    
+            case INFO_SNEWFLAGS:
+                p = servernew_flags;
+                break;
+        
+            case INFO_SPASSFLAGS:
+                p = setpass_flags;
+                break;
+
+            case INFO_SETPROPS:
+                p = setprop_pairs;
+                break;
+
+            case INFO_VRFYTYPES:
+                p = vf_pairs;
+                break;
+
+            default:
+                Tcl_SetResult (interp, "internal error, missing known case",
+                               TCL_STATIC);
+                return TCL_ERROR;
+            }
+    }
+
+    resultPtr = Tcl_NewObj ();
+    for (; p -> p_key; p++)
+        Tcl_ListObjAppendElement (interp, resultPtr,
+                                  Tcl_NewStringObj (p -> p_key, -1));
+
+    Tcl_SetObjResult (interp, resultPtr);
+    return TCL_OK;
+}
+
+
+/* the "done" command */
+
+/* ARGSUSED */
+
+static int
+proc_done (ClientData  unused,
+           Tcl_Interp *interp,
+           int         objc,
+           Tcl_Obj    *CONST objv[]) {
+    Tcl_HashEntry  *entryPtr;
+    Tcl_HashSearch  hs,
+                   *searchPtr = &hs;
+
+    if (objc != 1) {
+        Tcl_ResetResult (interp);
+        Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]), NULL);
+        return TCL_ERROR;
+    }
+
+    for (entryPtr = Tcl_FirstHashEntry (&connTable, searchPtr);
+             entryPtr != NULL;
+             entryPtr = Tcl_NextHashEntry (searchPtr)) {
+        sasl_data_t *sd = Tcl_GetHashValue (entryPtr);
+
+        Tcl_DeleteCommandFromToken (sd -> sd_interp, sd -> sd_token);
+    }
+
+    for (entryPtr = Tcl_FirstHashEntry (&t2pTable, searchPtr);
+             entryPtr != NULL;
+             entryPtr = Tcl_NextHashEntry (searchPtr)) {
+        Tcl_Obj *objPtr = (Tcl_Obj *) Tcl_GetHashKey (&t2pTable, entryPtr); 
+        propctx_t *prop = (propctx_t *) Tcl_GetHashValue (entryPtr);
+
+        Tcl_DecrRefCount (objPtr);
+        Tcl_DeleteHashEntry (entryPtr);
+
+        if ((entryPtr = Tcl_FindHashEntry (&p2tTable, (char *) prop)) != NULL)
+            Tcl_DeleteHashEntry (entryPtr);
+
+#if     0
+        prop_dispose (&prop);
+#endif
+    }
+
+    for (entryPtr = Tcl_FirstHashEntry (&allocTable, searchPtr);
+             entryPtr != NULL;
+             entryPtr = Tcl_NextHashEntry (searchPtr)) {
+        Tcl_Free (Tcl_GetHashKey (&allocTable, entryPtr));
+        Tcl_DeleteHashEntry (entryPtr);
+    }
+
+    sasl_done ();
+
+    Tcl_ResetResult (interp);
+    return TCL_OK;
+}
+
+
+/* module initialization */
+
+static oc_pair_t init_pairs[] = {
+  { "sasl::decode64",           proc_decode64                   },
+  { "sasl::done",               proc_done                       },
+  { "sasl::encode64",           proc_encode64                   },
+  { "sasl::errstring",          proc_errstring                  },
+  { "sasl::mechanisms",         proc_mechanisms                 },
+  { "sasl::info",               proc_info                       },
+
+  { "sasl::server_init",        server_init                     },
+  { "sasl::server_new",         server_new                      },
+
+  { "sasl::client_init",        client_init                     },
+  { "sasl::client_new",         client_new                      },
+
+  { NULL,                       0                               }
+};
+
+
+int
+Tclsasl_Init (Tcl_Interp *interp) {
+    oc_pair_t *pp;
+
+    if (Tcl_InitStubs (interp, "8.0", 0) == NULL)
+        return TCL_ERROR;
+
+    if ((Tcl_PkgRequire (interp, "Tcl", TCL_VERSION, 0) == NULL)
+            && (TCL_VERSION[0] == '7')
+            && (Tcl_PkgRequire (interp, "Tcl", "8.0", 0) == NULL))
+        return TCL_ERROR;
+
+    if (Tcl_PkgProvide (interp, "sasl", VERSION) != TCL_OK)
+        return TCL_ERROR;
+
+    Tcl_InitHashTable (&allocTable, TCL_ONE_WORD_KEYS);
+    Tcl_InitHashTable (&connTable, TCL_ONE_WORD_KEYS);
+    Tcl_InitHashTable (&p2tTable, TCL_ONE_WORD_KEYS);
+    Tcl_InitHashTable (&t2pTable, TCL_ONE_WORD_KEYS);
+
+    for (pp = init_pairs; pp -> p_key; pp++)
+        Tcl_CreateObjCommand (interp, pp -> p_key, pp -> p_proc,
+                              (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+
+    return TCL_OK;
+}
+
+
+int
+Sasl_Init (Tcl_Interp *interp) {
+    return Tclsasl_Init (interp);
+}
+
+#endif  /* TCLSASL */
diff --git a/contrib/tclsasl/tcl/test.tcl b/contrib/tclsasl/tcl/test.tcl
new file mode 100644
index 0000000..3ba701d
--- /dev/null
+++ b/contrib/tclsasl/tcl/test.tcl
@@ -0,0 +1,580 @@
+#!/bin/sh
+# the following restarts using tclsh \
+exec tclsh "$0" "$@"
+
+# test the Tcl wrapper for Cyrus SASL
+
+
+#
+# load the library
+#
+
+load .libs/libtclsasl.so
+
+
+if {[llength $argv] > 0} {
+    set mechanisms [list [lindex $argv 0]]
+    set argv [lrange $argv 1 end]
+}
+if {[llength $argv] > 0} {
+    set pass [lindex $argv 0]
+    set argv [lrange $argv 1 end]
+}
+
+
+#
+# globals
+#
+
+global errorCode
+
+
+global client server
+
+foreach prop [sasl::info setprops] {
+    set client($prop) ""
+    set server($prop) ""
+}
+
+# edit these as you wish
+
+array set server [list \
+    silent              1                               \
+    service             example                         \
+    fqdn                ""                              \
+    auth_external       client at example.com              \
+    ssf_external        1                               \
+    sec_props           [list min_ssf 0 max_ssf 128]    \
+]
+
+array set client [list \
+    silent              0                               \
+    service             example                         \
+    fqdn                example.com                     \
+    mechanisms          digest-md5                      \
+    user                ""                              \
+    language            en-US                           \
+    authname            fred                            \
+    cnonce              ""                              \
+    pass                "secret"                        \
+    getrealm            ""                              \
+    auth_external       server at example.com              \
+    ssf_external        1                               \
+    sec_props           [list min_ssf 0 max_ssf 255]    \
+]
+
+if {[info exists mechanisms]} {
+    set client(mechanisms) $mechanisms
+}
+if {[info exists pass]} {
+    set client(pass) $pass
+}
+
+
+#
+# print out available commands and options
+#
+
+puts stdout "initializing package...\n"
+puts -nonewline stdout [format "%15.15s:" "commands"]
+set i 0
+foreach p [lsort -dictionary [info commands ::sasl::*]] {
+    puts -nonewline stdout [format "    %-15.15s" \
+                                   [string range $p 8 end]]
+    if {[expr [incr i]%3] == 0} {
+        puts -nonewline stdout [format "\n%15.15s " ""]
+    }
+}
+puts stdout "\n"
+
+
+foreach p [lsort -dictionary [sasl::info]]  {
+    puts -nonewline stdout [format "%15.15s:" $p]
+    set q [sasl::info $p]
+    set i 0
+    while {1} {
+        puts -nonewline stdout [format "    %-15.15s" [lindex $q 0]]
+        if {[llength [set q [lrange $q 1 end]]] == 0} {
+            break
+        }
+        if {[expr [incr i]%3] == 0} {
+            puts -nonewline stdout [format "\n%15.15s " ""]
+        }
+    }
+    puts stdout "\n"
+}
+puts stdout ""
+
+
+#
+# callbacks
+#
+
+proc sasl_log {data} {
+    array set params $data
+
+    puts stdout "logging"
+    foreach {k v} $data {
+        puts stdout [format "%11.11s %s" $k $v]
+    }
+    puts stdout ""
+}
+
+
+#
+# server-side callbacks
+#
+
+proc server_callback {id data} {
+    global server
+
+    array set params $data
+
+    if {!$server(silent)} {
+        puts stdout "looking for $id"
+        foreach {k v} $data {
+            puts stdout [format "%11.11s %s" $k $v]
+        }
+    }
+
+    switch -- $id {
+        getopt {
+            if {![info exists params(plugin)]} {
+                set params(plugin) ""
+            }
+            switch -- $params(plugin)/$params(option) {
+                /auto_transition
+                    -
+                /canon_user_plugin
+                    -
+                /mech_list
+                    -
+		/sasldb_path
+		    -
+                OTP/opiekeys {
+                }
+
+                default {
+                    set value ""
+                }
+            }
+        }
+
+        verifyfile
+            -
+        proxy
+            -
+        checkpass {
+            set value 0
+        }
+    }
+
+    if {!$server(silent)} {
+        if {[info exists value]} {
+            puts stdout [format "%11.11s %s" returning $value]
+        }
+        puts stdout ""
+    }
+
+    return $value
+}
+
+
+#
+# timing
+#
+
+proc ticks {now then} {
+    set elapsed [expr $now-$then]
+
+    if {[set x [string length $elapsed]] <= 6} {
+        return $elapsed
+    }
+
+    return [format %s.%s [string range $elapsed 0 [expr $x-7]] \
+                         [string range $elapsed [expr $x-6] end]]
+}
+
+
+#
+# init the server-side code
+#
+
+puts stdout "initializing server...\n"
+sasl::server_init -callbacks [list [list log sasl_log]]
+
+set callbacks [list [list log sasl_log]]
+foreach id [list getopt verifyfile proxy checkpass] {
+    lappend callbacks [list $id "server_callback $id"]
+}
+set args {}
+if {[string length $server(fqdn)] > 0} {
+    lappend args -serverFQDN $server(fqdn)
+}
+
+set server(token) \
+    [eval [list sasl::server_new -service    $server(service) \
+                                 -callbacks  $callbacks       \
+                                 -flags      [list success_data]] $args]
+
+puts -nonewline stdout [format "%15.15s:" "operations"]
+set i 0
+foreach p [lsort -dictionary [$server(token) -operation info]] {
+    puts -nonewline stdout [format "    %-15.15s" $p]
+    if {[expr [incr i]%3] == 0} {
+        puts -nonewline stdout [format "\n%15.15s " ""]
+    }
+}
+puts stdout "\n\n"
+
+
+set hitP 0
+foreach prop [lsort -dictionary [sasl::info setprops]] {
+    if {[string length [set value $server($prop)]] > 0} {
+        if {!$hitP} {
+            puts stdout "setting server properties...\n"
+        }
+        puts stdout "    set $prop to $value"
+        $server(token) -operation setprop \
+                       -property  $prop   \
+                       -value     $value
+        set hitP 1
+    }
+}
+if {$hitP} {
+    puts stdout "\n"
+}
+
+
+puts -nonewline stdout [format "%15.15s:" "mechanisms"]
+set i 0
+foreach p [lsort -dictionary [set mechlist [$server(token) -operation list]]] {
+    puts -nonewline stdout [format "    %-15.15s" $p]
+    if {[expr [incr i]%3] == 0} {
+        puts -nonewline stdout [format "\n%15.15s " ""]
+    }
+}
+puts stdout "\n\n"
+
+set server(silent) 0
+
+
+#
+# client-side callbacks
+#
+
+proc client_callback {data} {
+    global client
+
+    array set params $data
+
+    if {!$client(silent)} {
+        puts stdout "looking for $params(id)"
+        foreach {k v} $data {
+            puts stdout [format "%11.11s %s" $k $v]
+        }
+    }
+
+    switch -- $params(id) {
+        pass {
+            set value $client(pass)
+        }
+
+        getrealm {
+            if {(![info exists params(available)]) \
+                    || ([lsearch -exact $params(available) \
+                                 $client(getrealm)] >= 0)} {
+                set value $client(getrealm)
+            }
+        }
+    }
+
+    if {!$client(silent)} {
+        if {[info exists value]} {
+            puts stdout [format "%11.11s %s" returning $value]
+        }
+        puts stdout ""
+    }
+
+    return $value
+}
+
+proc client_interact {data} {
+    global client
+
+    array set params $data
+    set id $params(id)
+
+    catch { set value $params(default) }
+
+    puts stdout "asking for  $id"
+    foreach {k v} $data {
+        if {![string compare $k id]} {
+            continue
+        }
+        puts stdout [format "%11.11s %s" $k $v]
+    }
+
+    if {[string length $client($id)] > 0} {
+        set value $client($id)
+    }
+
+    if {[info exists value]} {
+        puts stdout [format "%11.11s %s" "returning" $value]
+    } else {
+        puts stdout [format "%11.11s %s" "nothing" "to return"]
+    }
+    puts stdout ""
+
+# if value isn't defined, that's ok...
+    return $value
+}
+
+
+# init the client-side code
+
+puts stdout "initializing client...\n"
+sasl::client_init -callbacks [list [list log sasl_log]]
+
+set callbacks [list [list log sasl_log]]
+foreach id [list user language authname cnonce] {
+    if {[string length $client($id)] > 0} {
+        lappend callbacks $id
+    }
+}
+if {[string length $client(pass)] > 0} {
+    foreach id [list pass echoprompt noechoprompt] {
+        lappend callbacks [list $id client_callback]
+    }
+}
+set id getrealm
+if {[string length $client($id)] > 0} {
+    lappend callbacks [list $id client_callback]
+}
+
+set client(token) [sasl::client_new -service    $client(service) \
+                                    -serverFQDN $client(fqdn)    \
+                                    -callbacks  $callbacks       \
+                                    -flags      [list success_data]]
+
+puts -nonewline stdout [format "%15.15s:" "operations"]
+set i 0
+foreach p [lsort -dictionary [$client(token) -operation info]] {
+    puts -nonewline stdout [format "    %-15.15s" $p]
+    if {[expr [incr i]%3] == 0} {
+        puts -nonewline stdout [format "\n%15.15s " ""]
+    }
+}
+puts stdout "\n\n"
+
+
+set hitP 0
+foreach prop [lsort -dictionary [sasl::info setprops]] {
+    if {[string length [set value $client($prop)]] > 0} {
+        if {!$hitP} {
+            puts stdout "setting client properties...\n"
+        }
+        puts stdout "    set $prop to $value"
+        $client(token) -operation setprop \
+                       -property  $prop   \
+                       -value     $value
+        set hitP 1
+    }
+}
+if {$hitP} {
+    puts stdout "\n"
+}
+
+
+puts -nonewline stdout [format "%15.15s:" "mechanisms"]
+set i 0
+foreach p [lsort -dictionary [sasl::mechanisms]] {
+    puts -nonewline stdout [format "    %-15.15s" $p]
+    if {[expr [incr i]%3] == 0} {
+        puts -nonewline stdout [format "\n%15.15s " ""]
+    }
+}
+puts stdout "\n\n"
+
+
+puts stdout "starting client...\n"
+flush stdout
+
+if {[string length $client(mechanisms)] > 0} {
+    set mechlist $client(mechanisms)
+}
+
+set clicks [clock clicks]
+set client(code) [catch {
+    $client(token) -operation  start     \
+                   -mechanisms $mechlist \
+                   -interact   client_interact
+} result]
+puts stdout "     elapsed: [ticks [clock clicks] $clicks] msec"
+
+switch -- $client(code) {
+    0 {
+        puts stdout "          OK: $result"
+    }
+
+    4 {
+        puts stdout "    CONTINUE: $result"
+    }
+
+    default {
+        puts stdout "        code: $client(code), $errorCode"
+        return
+    }
+}
+puts stdout "\n"
+flush stdout
+
+
+puts stdout "starting server...\n"
+flush stdout
+
+array set params $result
+
+set clicks [clock clicks]
+set server(code) [catch {
+    $server(token) -operation start              \
+                   -mechanism $params(mechanism) \
+                   -input     $params(output)
+} result]
+puts stdout "     elapsed: [ticks [clock clicks] $clicks] msec"
+
+switch -- $server(code) {
+    0 {
+        puts stdout "         OK: $result"
+    }
+
+    4 {
+        puts stdout "    CONTINUE: $result"
+    }
+
+    default {
+        puts stdout "        code: $server(code), $errorCode"
+    }
+}
+puts stdout "\n"
+flush stdout
+
+
+while {($server(code) == 4) || ($client(code) == 4)} {
+    puts stdout "stepping client...\n"
+    flush stdout
+
+    set clicks [clock clicks]
+    set client(code) [catch {
+        $client(token) -operation step    \
+                       -input     $result \
+                       -interact  client_interact
+    } result]
+    puts stdout "     elapsed: [ticks [clock clicks] $clicks] msec"
+    
+    switch -- $client(code) {
+        0 {
+            puts stdout "          OK: $result"
+        }
+    
+        4 {
+            puts stdout "    CONTINUE: $result"
+        }
+    
+        default {
+            puts stdout "        code: $client(code), $errorCode"
+            return
+        }
+    }
+    puts stdout "\n\n"
+    flush stdout
+
+    if {($client(code) == 0) && ([string length $result] == 0)} {
+	break
+    }
+
+    puts stdout "stepping server...\n"
+    flush stdout
+
+    set clicks [clock clicks]
+    set server(code) [catch {
+        $server(token) -operation step    \
+                       -input     $result
+    } result]
+    puts stdout "     elapsed: [ticks [clock clicks] $clicks] msec"
+
+    switch -- $server(code) {
+        0 {
+            puts stdout "          OK: $result"
+        }
+    
+        4 {
+            puts stdout "    CONTINUE: $result"
+        }
+    
+        default {
+            puts stdout "        code: $server(code), $errorCode"
+        }
+    }
+    puts stdout "\n\n"
+    flush stdout
+}
+
+
+switch -- $client(code)/$server(code) {
+    4/0 {
+	puts stderr "server done, but client isn't...\n"
+	return
+    }
+
+    0/4 {
+	puts stderr "client done, but server isn't...\n"
+	return
+    }
+}
+
+
+rename sasl_log ""
+
+
+puts stdout "getting client properties...\n"
+foreach prop [lsort -dictionary [sasl::info getprops]] {
+    if {[set code [catch { $client(token) -operation getprop \
+                                          -property  $prop } result]]} {
+        set result "ERROR: $result"
+    }
+    puts stdout [format "%14.14s: %s" $prop $result]
+}
+puts stdout ""
+
+if {[set code [catch { $client(token) -operation errdetail } result]]} {
+        set result "ERROR: $result"
+}
+puts stdout [format "%14.14s: %s" errdetail $result]
+puts stdout "\n"
+
+
+puts stdout "getting server properties...\n"
+foreach prop [lsort -dictionary [sasl::info getprops]] {
+    if {[set code [catch { $server(token) -operation getprop \
+                                          -property  $prop } result]]} {
+        set result "ERROR: $result"
+    }
+    puts stdout [format "%14.14s: %s" $prop $result]
+}
+puts stdout ""
+
+if {[set code [catch { $server(token) -operation errdetail } result]]} {
+        set result "ERROR: $result"
+}
+puts stdout [format "%14.14s: %s" errdetail $result]
+puts stdout "\n"
+
+
+puts stdout "shutting down"
+sasl::done
+
+puts stdout "\n"
+
+
+puts stdout "if you see this, the test was passed..."
diff --git a/contrib/tclsasl/tclsasl.patch b/contrib/tclsasl/tclsasl.patch
new file mode 100644
index 0000000..b58a212
--- /dev/null
+++ b/contrib/tclsasl/tclsasl.patch
@@ -0,0 +1,265 @@
+Index: Makefile.am
+===================================================================
+RCS file: /cvs/src/sasl/Makefile.am,v
+retrieving revision 1.24
+diff -u -r1.24 Makefile.am
+--- Makefile.am	2001/12/04 17:46:35	1.24
++++ Makefile.am	2002/01/21 07:07:29
+@@ -68,7 +68,8 @@
+ INSTALLOSX = 
+ endif
+ 
+-SUBDIRS=include sasldb plugins lib utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
++SUBDIRS=include sasldb plugins lib utils doc man $(PWC) $(SAM) $(JAV) $(SAD) \
++        tcl
+ EXTRA_DIST=config cmulocal win32 mac dlcompat-20010505
+ 
+ dist-hook:
+Index: acconfig.h
+===================================================================
+RCS file: /cvs/src/sasl/acconfig.h,v
+retrieving revision 1.31
+diff -u -r1.31 acconfig.h
+--- acconfig.h	2001/12/11 17:35:29	1.31
++++ acconfig.h	2002/01/21 07:07:29
+@@ -155,6 +155,9 @@
+ /* do we have a wierd location of db.h? */
+ #undef HAVE_DB3_DB_H
+ 
++/* is Tcl available? */
++#undef	TCLSASL
++
+ /* define if your compile has __attribute__ */
+ #undef HAVE___ATTRIBUTE__
+ 
+Index: configure.in
+===================================================================
+RCS file: /cvs/src/sasl/configure.in,v
+retrieving revision 1.122
+diff -u -r1.122 configure.in
+--- configure.in	2002/01/10 22:49:35	1.122
++++ configure.in	2002/01/21 07:07:29
+@@ -592,6 +592,45 @@
+ AC_SUBST(SASL_UTIL_LIBS_EXTRA)
+ AC_SUBST(SASL_UTIL_HEADERS_EXTRA)
+ 
++dnl check for tcl
++AC_MSG_CHECKING(for tcl support)
++AC_ARG_WITH(tcl, [  --with-tcl=DIR          with Tcl support [no] ],
++	with_tcl=$withval,
++	with_tcl=no)
++
++if test "$with_tcl" != "no"; then
++    AC_CACHE_VAL(ac_cv_c_tclconfig,[
++	if test "$with_tcl" = "yes"; then
++	    for i in `ls -d ${prefix}/lib 2>/dev/null` \
++		     `ls -d /usr/lib 2>/dev/null`      \
++		     `ls -d /usr/local/lib 2>/dev/null` ; do
++		if test -f "$i/tclConfig.sh" ; then
++		    ac_cv_c_tclconfig=`(cd $i; pwd)`
++		    break
++		fi
++	    done
++	    with_tcl=`dirname ${ac_cv_c_tclconfig}`
++	elif test -f "${with_tcl}/tclConfig.sh" ; then
++	    :
++	else
++	    AC_MSG_ERROR([${with_tcl}/lib directory doesn't contain tclConfig.sh])
++	fi
++    ])
++
++    . ${ac_cv_c_tclconfig}/tclConfig.sh
++    LIB_TCL="${TCL_LIB_SPEC} ${TCL_LIBS}"
++    PKG_TCL=${TCL_PACKAGE_PATH}/sasl
++    INSTALL_TCLSASL=install-tclsasl
++
++    AC_DEFINE(TCLSASL)
++    AC_MSG_RESULT(yes)
++else
++    AC_MSG_RESULT(no)    
++fi
++AC_SUBST(LIB_TCL)
++AC_SUBST(PKG_TCL)
++AC_SUBST(INSTALL_TCLSASL)
++
+ dnl check for getsubopt
+ sasl_cv_getsubopt=no
+ AC_CHECK_FUNC(getsubopt, [AC_DEFINE(HAVE_GETSUBOPT)], [sasl_cv_getsubopt=yes])
+@@ -695,6 +734,7 @@
+ java/javax/security/Makefile
+ java/javax/security/auth/Makefile
+ java/javax/security/auth/callback/Makefile
++tcl/Makefile
+ pwcheck/Makefile
+ man/Makefile)
+ 
+Index: config/kerberos_v4.m4
+===================================================================
+RCS file: /cvs/src/sasl/config/kerberos_v4.m4,v
+retrieving revision 1.2
+diff -u -r1.2 kerberos_v4.m4
+--- kerberos_v4.m4	2001/12/04 02:05:09	1.2
++++ kerberos_v4.m4	2002/01/21 07:07:30
+@@ -11,8 +11,19 @@
+     CPPFLAGS="$CPPFLAGS -I${with_des}/include"
+     LDFLAGS="$LDFLAGS -L${with_des}/lib"
+   fi
+-  AC_CHECK_LIB(des, des_pcbc_encrypt, [LIB_DES="-ldes";
+-				       with_des=yes], with_des=no)
++
++dnl check for openssl installing -lcrypto, then make vanilla check
++  AC_CHECK_LIB(crypto, des_pcbc_encrypt, 
++      AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES)
++				      LIB_DES="-lcrypto";
++				      with_des=yes],
++		      with_des=no),
++      with_des=no, $LIB_RSAREF)
++
++  if test "$with_des" = no; then
++    AC_CHECK_LIB(des, des_pcbc_encrypt, [LIB_DES="-ldes";
++				         with_des=yes], with_des=no)
++  fi
+ 
+   if test "$with_des" = no; then
+      AC_CHECK_LIB(des524, des_pcbc_encrypt, [LIB_DES="-ldes524";
+Index: config/sasldb.m4
+===================================================================
+RCS file: /cvs/src/sasl/config/sasldb.m4,v
+retrieving revision 1.4
+diff -u -r1.4 sasldb.m4
+--- sasldb.m4	2001/12/10 17:02:36	1.4
++++ sasldb.m4	2002/01/21 07:07:30
+@@ -76,10 +76,26 @@
+ 	BERKELEY_DB_CHK()
+ 	;;
+   gdbm)
+-	AC_CHECK_HEADER(gdbm.h,
++        AC_ARG_WITH(with-gdbm,[  --with-gdbm=PATH        use gdbm from PATH],
++    	      with_gdbm="${withval}")
++
++        case "$with_gdbm" in
++	""|yes) 
++	        AC_CHECK_HEADER(gdbm.h,
+ 			AC_CHECK_LIB(gdbm, gdbm_open, SASL_DB_LIB="-lgdbm",
+                                            dblib="no"),
+ 			dblib="no")
++
++		;;
++	*)
++		if test -d $with_gdbm; then
++		  CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
++		  LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
++		  SASL_DB_LIB="-lgdbm"
++		else
++		  with_gdbm="no"
++		fi
++	esac
+ 	;;
+   ndbm)
+ 	dnl We want to attempt to use -lndbm if we can, just in case
+Index: doc/index.html
+===================================================================
+RCS file: /cvs/src/sasl/doc/index.html,v
+retrieving revision 1.11
+diff -u -r1.11 index.html
+--- index.html	2002/01/18 16:40:06	1.11
++++ index.html	2002/01/21 07:07:30
+@@ -33,6 +33,7 @@
+ <li> <a href="options.html">Options for use with Cyrus SASL</A></li>
+ <li> <a href="programming.html">The SASL Application Programmer's Guide</A></li>
+ <li> <a href="plugprog.html">The SASL Plugin Programmer's Guide</A></li>
++<li> <a href="tclsasl.html">Using SASL with Tcl</A></li>
+ <li> <a href="advanced.html">Advanced SASL usage</A></li>
+ </ul>
+ 
+Index: sasldb/db_gdbm.c
+===================================================================
+RCS file: /cvs/src/sasl/sasldb/db_gdbm.c,v
+retrieving revision 1.2
+diff -u -r1.2 db_gdbm.c
+--- db_gdbm.c	2001/12/04 02:06:59	1.2
++++ db_gdbm.c	2002/01/21 07:07:30
+@@ -99,7 +99,8 @@
+   }
+   db = gdbm_open((char *)path, 0, GDBM_READER, S_IRUSR | S_IWUSR, NULL);
+   if (! db) {
+-      utils->seterror(cntxt, 0, "Could not open db");
++      utils->seterror(conn, 0, "Could not open %s: gdbm_errno=%d",
++		      path, gdbm_errno);
+       result = SASL_FAIL;
+       goto cleanup;
+   }
+@@ -108,8 +109,17 @@
+   gvalue = gdbm_fetch(db, gkey);
+   gdbm_close(db);
+   if (! gvalue.dptr) {
+-      utils->seterror(cntxt, 0, "no user in db");
+-      result = SASL_NOUSER;
++      if (gdbm_errno == GDBM_ITEM_NOT_FOUND) {
++          utils->seterror(conn, SASL_NOLOG,
++		          "user: %s@%s property: %s not found in %s",
++			  authid, realm, propName, path);
++	  result = SASL_NOUSER;
++      } else {
++	  utils->seterror(conn, 0,
++			  "Couldn't fetch entry from %s: gdbm_errno=%d",
++			  path, gdbm_errno);
++	  result = SASL_FAIL;
++      }
+       goto cleanup;
+   }
+ 
+@@ -177,7 +187,8 @@
+       utils->log(conn, SASL_LOG_ERR,
+ 		 "SASL error opening password file. "
+ 		 "Do you have write permissions?\n");
+-      utils->seterror(conn, 0, "Could not open db for write");
++      utils->seterror(conn, 0, "Could not open %s for write: gdbm_errno=%d",
++		      path, gdbm_errno);
+       result = SASL_FAIL;
+       goto cleanup;
+   }
+@@ -190,13 +201,15 @@
+     gvalue.dsize = data_len;
+     if (gdbm_store(db, gkey, gvalue, GDBM_REPLACE)) {
+ 	utils->seterror(conn, 0,
+-			"Couldn't update db");
++			"Couldn't replace entry in %s: gdbm_errno=%d",
++			path, gdbm_errno);
+ 	result = SASL_FAIL;
+     }
+   } else {
+       if (gdbm_delete(db, gkey)) {
+ 	  utils->seterror(conn, 0,
+-			  "Couldn't update db");	  
++			  "Couldn't delete entry in %s: gdbm_errno=%d",
++			  path, gdbm_errno);
+ 	  result = SASL_NOUSER;
+       }
+   }
+@@ -285,7 +298,8 @@
+     db = gdbm_open((char *)path, 0, GDBM_READER, S_IRUSR | S_IWUSR, NULL);
+ 
+     if(!db) {
+-	utils->seterror(conn, 0, "Could not open db");
++        utils->seterror(conn, 0, "Could not open %s: gdbm_errno=%d",
++			path, gdbm_errno);
+ 	return NULL;
+     }
+ 
+Index: utils/dbconverter-2.c
+===================================================================
+RCS file: /cvs/src/sasl/utils/dbconverter-2.c,v
+retrieving revision 1.2
+diff -u -r1.2 dbconverter-2.c
+--- dbconverter-2.c	2001/12/04 02:07:01	1.2
++++ dbconverter-2.c	2002/01/21 07:07:30
+@@ -349,6 +349,8 @@
+ 
+ #else 
+ 
++/* ARGSUSED */
++
+ int listusers(const char *path, listcb_t *cb)
+ {
+     fprintf(stderr,"Unsupported DB format");
diff --git a/dlcompat-20010505/APPLE_LICENSE b/dlcompat-20010505/APPLE_LICENSE
new file mode 100644
index 0000000..84687a4
--- /dev/null
+++ b/dlcompat-20010505/APPLE_LICENSE
@@ -0,0 +1,372 @@
+APPLE PUBLIC SOURCE LICENSE
+Version 1.1 - April 19,1999
+
+Please read this License carefully before downloading this software.
+By downloading and using this software, you are agreeing to be bound
+by the terms of this License.  If you do not or cannot agree to the
+terms of this License, please do not download or use the software.
+
+1. General; Definitions.  This License applies to any program or other
+work which Apple Computer, Inc. ("Apple") publicly announces as
+subject to this Apple Public Source License and which contains a
+notice placed by Apple identifying such program or work as "Original
+Code" and stating that it is subject to the terms of this Apple Public
+Source License version 1.1 (or subsequent version thereof), as it may
+be revised from time to time by Apple ("License").  As used in this
+License:
+
+1.1 "Affected Original Code" means only those specific portions of
+Original Code that allegedly infringe upon any party's intellectual
+property rights or are otherwise the subject of a claim of
+infringement.
+
+1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is
+the grantor of rights, (i) claims of patents that are now or hereafter
+acquired, owned by or assigned to Apple and (ii) that cover subject
+matter contained in the Original Code, but only to the extent
+necessary to use, reproduce and/or distribute the Original Code
+without infringement; and (b) in the case where You are the grantor of
+rights, (i) claims of patents that are now or hereafter acquired,
+owned by or assigned to You and (ii) that cover subject matter in Your
+Modifications, taken alone or in combination with Original Code.
+
+1.3 "Covered Code" means the Original Code, Modifications, the
+combination of Original Code and any Modifications, and/or any
+respective portions thereof.
+
+1.4 "Deploy" means to use, sublicense or distribute Covered Code other
+than for Your internal research and development (R&D), and includes
+without limitation, any and all internal use or distribution of
+Covered Code within Your business or organization except for R&D use,
+as well as direct or indirect sublicensing or distribution of Covered
+Code by You to any third party in any form or manner.
+
+1.5 "Larger Work" means a work which combines Covered Code or portions
+thereof with code not governed by the terms of this License.
+
+1.6 "Modifications" mean any addition to, deletion from, and/or change
+to, the substance and/or structure of Covered Code.  When code is
+released as a series of files, a Modification is: (a) any addition to
+or deletion from the contents of a file containing Covered Code;
+and/or (b) any new file or other representation of computer program
+statements that contains any part of Covered Code.
+
+1.7 "Original Code" means (a) the Source Code of a program or other
+work as originally made available by Apple under this License,
+including the Source Code of any updates or upgrades to such programs
+or works made available by Apple under this License, and that has been
+expressly identified by Apple as such in the header file(s) of such
+work; and (b) the object code compiled from such Source Code and
+originally made available by Apple under this License.
+
+1.8 "Source Code" means the human readable form of a program or other
+work that is suitable for making modifications to it, including all
+modules it contains, plus any associated interface definition files,
+scripts used to control compilation and installation of an executable
+(object code).
+
+1.9 "You" or "Your" means an individual or a legal entity exercising
+rights under this License.  For legal entities, "You" or "Your"
+includes any entity which controls, is controlled by, or is under
+common control with, You, where "control" means (a) the power, direct
+or indirect, to cause the direction or management of such entity,
+whether by contract or otherwise, or (b) ownership of fifty percent
+(50%) or more of the outstanding shares or beneficial ownership of
+such entity.
+
+2. Permitted Uses; Conditions & Restrictions.  Subject to the terms
+and conditions of this License, Apple hereby grants You, effective on
+the date You accept this License and download the Original Code, a
+world-wide, royalty-free, non- exclusive license, to the extent of
+Apple's Applicable Patent Rights and copyrights covering the Original
+Code, to do the following:
+
+2.1 You may use, copy, modify and distribute Original Code, with or
+without Modifications, solely for Your internal research and
+development, provided that You must in each instance:
+
+(a) retain and reproduce in all copies of Original Code the copyright
+and other proprietary notices and disclaimers of Apple as they appear
+in the Original Code, and keep intact all notices in the Original Code
+that refer to this License;
+
+(b) include a copy of this License with every copy of Source Code of
+Covered Code and documentation You distribute, and You may not offer
+or impose any terms on such Source Code that alter or restrict this
+License or the recipients' rights hereunder, except as permitted under
+Section 6; and
+
+(c) completely and accurately document all Modifications that you have
+made and the date of each such Modification, designate the version of
+the Original Code you used, prominently include a file carrying such
+information with the Modifications, and duplicate the notice in
+Exhibit A in each file of the Source Code of all such Modifications.
+
+2.2 You may Deploy Covered Code, provided that You must in each
+  instance:
+
+(a) satisfy all the conditions of Section 2.1 with respect to the
+Source Code of the Covered Code;
+
+(b) make all Your Deployed Modifications publicly available in Source
+Code form via electronic distribution (e.g. download from a web site)
+under the terms of this License and subject to the license grants set
+forth in Section 3 below, and any additional terms You may choose to
+offer under Section 6.  You must continue to make the Source Code of
+Your Deployed Modifications available for as long as you Deploy the
+Covered Code or twelve (12) months from the date of initial
+Deployment, whichever is longer;
+
+(c) if You Deploy Covered Code containing Modifications made by You,
+inform others of how to obtain those Modifications by filling out and
+submitting the information found at
+http://www.apple.com/publicsource/modifications.html, if available;
+and
+
+(d) if You Deploy Covered Code in object code, executable form only,
+include a prominent notice, in the code itself as well as in related
+documentation, stating that Source Code of the Covered Code is
+available under the terms of this License with information on how and
+where to obtain such Source Code.
+
+3. Your Grants.  In consideration of, and as a condition to, the
+licenses granted to You under this License:
+
+(a) You hereby grant to Apple and all third parties a non-exclusive,
+royalty-free license, under Your Applicable Patent Rights and other
+intellectual property rights owned or controlled by You, to use,
+reproduce, modify, distribute and Deploy Your Modifications of the
+same scope and extent as Apple's licenses under Sections 2.1 and 2.2;
+and
+
+(b) You hereby grant to Apple and its subsidiaries a non-exclusive,
+worldwide, royalty-free, perpetual and irrevocable license, under Your
+Applicable Patent Rights and other intellectual property rights owned
+or controlled by You, to use, reproduce, execute, compile, display,
+perform, modify or have modified (for Apple and/or its subsidiaries),
+sublicense and distribute Your Modifications, in any form, through
+multiple tiers of distribution.
+
+4. Larger Works.  You may create a Larger Work by combining Covered
+Code with other code not governed by the terms of this License and
+distribute the Larger Work as a single product.  In each such
+instance, You must make sure the requirements of this License are
+fulfilled for the Covered Code or any portion thereof.
+
+5. Limitations on Patent License.  Except as expressly stated in
+Section 2, no other patent rights, express or implied, are granted by
+Apple herein.  Modifications and/or Larger Works may require
+additional patent licenses from Apple which Apple may grant in its
+sole discretion.
+
+6. Additional Terms.  You may choose to offer, and to charge a fee
+for, warranty, support, indemnity or liability obligations and/or
+other rights consistent with the scope of the license granted herein
+("Additional Terms") to one or more recipients of Covered
+Code. However, You may do so only on Your own behalf and as Your sole
+responsibility, and not on behalf of Apple. You must obtain the
+recipient's agreement that any such Additional Terms are offered by
+You alone, and You hereby agree to indemnify, defend and hold Apple
+harmless for any liability incurred by or claims asserted against
+Apple by reason of any such Additional Terms.
+
+7. Versions of the License.  Apple may publish revised and/or new
+versions of this License from time to time.  Each version will be
+given a distinguishing version number.  Once Original Code has been
+published under a particular version of this License, You may continue
+to use it under the terms of that version. You may also choose to use
+such Original Code under the terms of any subsequent version of this
+License published by Apple.  No one other than Apple has the right to
+modify the terms applicable to Covered Code created under this
+License.
+
+8. NO WARRANTY OR SUPPORT.  The Original Code may contain in whole or
+in part pre-release, untested, or not fully tested works.  The
+Original Code may contain errors that could cause failures or loss of
+data, and may be incomplete or contain inaccuracies.  You expressly
+acknowledge and agree that use of the Original Code, or any portion
+thereof, is at Your sole and entire risk.  THE ORIGINAL CODE IS
+PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND
+AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND
+9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS
+"APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+RIGHTS.  APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE
+ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF
+THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT
+DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED.  NO ORAL OR WRITTEN
+INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED
+REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE
+SCOPE OF THIS WARRANTY.  You acknowledge that the Original Code is not
+intended for use in the operation of nuclear facilities, aircraft
+navigation, communication systems, or air traffic control machines in
+which case the failure of the Original Code could lead to death,
+personal injury, or severe physical or environmental damage.
+
+9. Liability.
+
+9.1 Infringement.  If any portion of, or functionality implemented by,
+the Original Code becomes the subject of a claim of infringement,
+Apple may, at its option: (a) attempt to procure the rights necessary
+for Apple and You to continue using the Affected Original Code; (b)
+modify the Affected Original Code so that it is no longer infringing;
+or (c) suspend Your rights to use, reproduce, modify, sublicense and
+distribute the Affected Original Code until a final determination of
+the claim is made by a court or governmental administrative agency of
+competent jurisdiction and Apple lifts the suspension as set forth
+below.  Such suspension of rights will be effective immediately upon
+Apple's posting of a notice to such effect on the Apple web site that
+is used for implementation of this License.  Upon such final
+determination being made, if Apple is legally able, without the
+payment of a fee or royalty, to resume use, reproduction,
+modification, sublicensing and distribution of the Affected Original
+Code, Apple will lift the suspension of rights to the Affected
+Original Code by posting a notice to such effect on the Apple web site
+that is used for implementation of this License.  If Apple suspends
+Your rights to Affected Original Code, nothing in this License shall
+be construed to restrict You, at Your option and subject to applicable
+law, from replacing the Affected Original Code with non-infringing
+code or independently negotiating for necessary rights from such third
+party.
+
+9.2 LIMITATION OF LIABILITY.  UNDER NO CIRCUMSTANCES SHALL APPLE BE
+LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO
+USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY
+OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY
+OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF
+ANY REMEDY.  In no event shall Apple's total liability to You for all
+damages under this License exceed the amount of fifty dollars
+($50.00).
+
+10. Trademarks.  This License does not grant any rights to use the
+trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac
+OS X Server" or any other trademarks or trade names belonging to Apple
+(collectively "Apple Marks") and no Apple Marks may be used to endorse
+or promote products derived from the Original Code other than as
+permitted by and in strict compliance at all times with Apple's third
+party trademark usage guidelines which are posted at
+http://www.apple.com/legal/guidelinesfor3rdparties.html.
+
+11. Ownership.  Apple retains all rights, title and interest in and to
+the Original Code and any Modifications made by or on behalf of Apple
+("Apple Modifications"), and such Apple Modifications will not be
+automatically subject to this License.  Apple may, at its sole
+discretion, choose to license such Apple Modifications under this
+License, or on different terms from those contained in this License or
+may choose not to license them at all.  Apple's development, use,
+reproduction, modification, sublicensing and distribution of Covered
+Code will not be subject to this License.
+
+12. Termination.
+
+12.1 Termination.  This License and the rights granted hereunder will
+   terminate:
+
+(a) automatically without notice from Apple if You fail to comply with
+any term(s) of this License and fail to cure such breach within 30
+days of becoming aware of such breach; (b) immediately in the event of
+the circumstances described in Section 13.5(b); or (c) automatically
+without notice from Apple if You, at any time during the term of this
+License, commence an action for patent infringement against Apple.
+
+12.2 Effect of Termination.  Upon termination, You agree to
+immediately stop any further use, reproduction, modification,
+sublicensing and distribution of the Covered Code and to destroy all
+copies of the Covered Code that are in your possession or control.
+All sublicenses to the Covered Code which have been properly granted
+prior to termination shall survive any termination of this License.
+Provisions which, by their nature, should remain in effect beyond the
+termination of this License shall survive, including but not limited
+to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13.  Neither party will be
+liable to the other for compensation, indemnity or damages of any sort
+solely as a result of terminating this License in accordance with its
+terms, and termination of this License will be without prejudice to
+any other right or remedy of either party.
+
+13.  Miscellaneous.
+
+13.1 Government End Users.  The Covered Code is a "commercial item" as
+defined in FAR 2.101.  Government software and technical data rights
+in the Covered Code include only those rights customarily provided to
+the public as defined in this License. This customary commercial
+license in technical data and software is provided in accordance with
+FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer
+Software or Computer Software Documentation).  Accordingly, all U.S.
+Government End Users acquire Covered Code with only those rights set
+forth herein.
+
+13.2 Relationship of Parties.  This License will not be construed as
+creating an agency, partnership, joint venture or any other form of
+legal association between You and Apple, and You will not represent to
+the contrary, whether expressly, by implication, appearance or
+otherwise.
+
+13.3 Independent Development.  Nothing in this License will impair
+Apple's right to acquire, license, develop, have others develop for
+it, market and/or distribute technology or products that perform the
+same or similar functions as, or otherwise compete with,
+Modifications, Larger Works, technology or products that You may
+develop, produce, market or distribute.
+
+13.4 Waiver; Construction.  Failure by Apple to enforce any provision
+of this License will not be deemed a waiver of future enforcement of
+that or any other provision.  Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+will not apply to this License.
+
+13.5 Severability.  (a) If for any reason a court of competent
+jurisdiction finds any provision of this License, or portion thereof,
+to be unenforceable, that provision of the License will be enforced to
+the maximum extent permissible so as to effect the economic benefits
+and intent of the parties, and the remainder of this License will
+continue in full force and effect.  (b) Notwithstanding the foregoing,
+if applicable law prohibits or restricts You from fully and/or
+specifically complying with Sections 2 and/or 3 or prevents the
+enforceability of either of those Sections, this License will
+immediately terminate and You must immediately discontinue any use of
+the Covered Code and destroy all copies of it that are in your
+possession or control.
+
+13.6 Dispute Resolution.  Any litigation or other dispute resolution
+between You and Apple relating to this License shall take place in the
+Northern District of California, and You and Apple hereby consent to
+the personal jurisdiction of, and venue in, the state and federal
+courts within that District with respect to this License. The
+application of the United Nations Convention on Contracts for the
+International Sale of Goods is expressly excluded.
+
+13.7 Entire Agreement; Governing Law.  This License constitutes the
+entire agreement between the parties with respect to the subject
+matter hereof.  This License shall be governed by the laws of the
+United States and the State of California, except that body of
+California law concerning conflicts of law.
+
+Where You are located in the province of Quebec, Canada, the following
+clause applies: The parties hereby confirm that they have requested
+that this License and all related documents be drafted in English. Les
+parties ont exige que le present contrat et tous les documents
+connexes soient rediges en anglais.
+
+EXHIBIT A.
+
+"Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+Reserved.  This file contains Original Code and/or Modifications of
+Original Code as defined in and that are subject to the Apple Public
+Source License Version 1.1 (the "License").  You may not use this file
+except in compliance with the License.  Please obtain a copy of the
+License at http://www.apple.com/publicsource and read it before using
+this file.
+
+The Original Code and all software distributed under the License are
+distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+License for the specific language governing rights and limitations
+under the License."
diff --git a/dlcompat-20010505/ChangeLog b/dlcompat-20010505/ChangeLog
new file mode 100644
index 0000000..49bc51b
--- /dev/null
+++ b/dlcompat-20010505/ChangeLog
@@ -0,0 +1,20 @@
+2001-05-05  Christoph Pfisterer  <cp at chrisp.de>
+
+	* dlfcn.h: Added wrapper for C++.
+
+2001-01-23  Christoph Pfisterer  <cp at chrisp.de>
+
+	* dlopen.c: Added optional debugging output. Modules are now
+	searched for in various directories when no absolute path is
+	specified and the module is not found in the current directory. A
+	new function, _dl_search_paths, was added to accomplish the
+	search. Added an include for <limits.h>, because PATH_MAX is
+	defined there.
+	* Makefile: Some rearragements for the optional debugging
+	output. (Use "make DEBUG=1" to enable it.)
+
+2001-01-16  Christoph Pfisterer  <cp at chrisp.de>
+
+	* dlopen.c: Removed #include for ofi.h - it doesn't seem to be
+	needed.
+
diff --git a/dlcompat-20010505/Makefile b/dlcompat-20010505/Makefile
new file mode 100644
index 0000000..3291cf2
--- /dev/null
+++ b/dlcompat-20010505/Makefile
@@ -0,0 +1,63 @@
+#
+# Makefile for dlcompat
+#
+#
+# Copyright (c) 2001 Christoph Pfisterer.
+#
+# Portions Copyright (c) 1999-2001 Apple Computer, Inc. All Rights
+# Reserved.
+#
+# This file contains Original Code and/or Modifications of Original
+# Code as defined in and that are subject to the Apple Public Source
+# License Version 1.2 (the "License"). You may not use this file
+# except in compliance with the License. Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before
+# using this file.
+#
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
+# NON-INFRINGEMENT. Please see the License for the specific language
+# governing rights and limitations under the License.
+# 
+
+
+prefix=/usr/local
+DEBUG=0
+
+CC=cc
+CFLAGS=-Wall -O2 -DDEBUG=$(DEBUG)
+AR=ar cru
+RANLIB=ranlib
+INSTALL=install
+
+OBJS = dlopen.o
+
+
+all: libdl.a libdl.dylib
+
+install: all
+	if test ! -d $(prefix)/lib ; then mkdir $(prefix)/lib ; fi
+	$(INSTALL) -m 644 libdl.a $(prefix)/lib
+	$(RANLIB) $(prefix)/lib/libdl.a
+	chmod 644 $(prefix)/lib/libdl.a
+	$(INSTALL) -m 755 libdl.dylib $(prefix)/lib
+	if test ! -d $(prefix)/include ; then mkdir $(prefix)/include ; fi
+	$(INSTALL) -c -m 644 dlfcn.h $(prefix)/include
+
+.c.o:
+	$(CC) $(CFLAGS) -fno-common -o $@ -c $<
+
+libdl.a: $(OBJS)
+	$(AR) libdl.a $(OBJS)
+	$(RANLIB) libdl.a
+
+libdl.dylib: $(OBJS)
+	$(CC) -dynamiclib -undefined error -o libdl.dylib $(OBJS) -install_name $(prefix)/lib/libdl.dylib
+
+clean:
+	rm -f $(OBJS) libdl.*
+
+# EOF
diff --git a/dlcompat-20010505/README b/dlcompat-20010505/README
new file mode 100644
index 0000000..858ce8e
--- /dev/null
+++ b/dlcompat-20010505/README
@@ -0,0 +1,71 @@
+ dlcompat for Darwin
+=====================
+
+This is release 20010505 of dlcompat. dlcompat is a small library that
+emulates the dlopen() interface on top of Darwin's dyld API. It is
+based on a CVS snapshot of Apple's Darwin CVS repository, taken on
+Jan 16 2001 (and still current as of May 5 2001). Since it's based on
+Apple code, it is released under the terms of the Apple Public Source
+License; see the file APPLE_LICENSE for the text of the license.
+
+Changes were made to automatically search for the module in several
+directories (taken from the environment variables DYLD_LIBRARY_PATH
+and LD_LIBRARY_PATH, plus /usr/lib and /lib) when no absolute path is
+specified and the module is not found in the current directory. If you
+prefer to run unmodified Apple code, download release 20010116.
+
+
+ Installation
+--------------
+As root, type:
+
+  make install
+
+This will compile the source file, generate both a static and shared
+library called libdl and install it into /usr/local/lib. The header
+file dlfcn.h will be installed in /usr/local/include.
+
+If you want to place the files somewhere else, run
+
+  make clean
+  make install prefix=<prefix>
+
+where <prefix> is the hierarchy you want to install into, e.g. /usr
+for /usr/lib and /usr/include (_NOT_ recommended!).
+
+To enable debugging output, run
+
+  make clean
+  make DEBUG=1
+  make install
+
+Combinations of those commands are left as an excercise to the
+reader. :-)
+
+
+ Usage
+-------
+Software that uses GNU autoconf will likely check for a library called
+libdl, that's why I named it that way. For software that doesn't find
+the library on its own, you must add a '-ldl' to the appropriate
+Makefile (or environment) variable, usually LIBS.
+
+If you installed dlcompat into a directory other than /usr/local/lib,
+you must tell the compiler where to find it. Add '-L<prefix>/lib' to
+LDFLAGS (or CFLAGS) and '-I<prefix>/include' to CPPFLAGS (or CFLAGS).
+
+
+ Genesis
+---------
+The files dlfcn.h and dlopen.c are taken from the Darwin CVS,
+directory Commands/Apple/cctools/libdyld. For release 20010116, I
+removed an unneccessary include statement from dlopen.c and added the
+Makefile. For release 20010123, I added debugging output and library
+searching. The changes are clearly documented, as required by the
+Apple Public Source License. For release 20010505, I added wrappers to
+disable C++ name mangling. That allows the library to be used by C++
+code, but be aware that there are issues with C++ and bundles, like
+static initializers not being called.
+
+
+Christoph Pfisterer <cp at chrisp.de>
diff --git a/dlcompat-20010505/dlfcn.h b/dlcompat-20010505/dlfcn.h
new file mode 100644
index 0000000..c287399
--- /dev/null
+++ b/dlcompat-20010505/dlfcn.h
@@ -0,0 +1,57 @@
+/*
+ * This file was modified by Christoph Pfisterer <cp at chrisp.de>
+ * on Sat, May 5 2001. See the file "ChangeLog" for details of what
+ * was changed.
+ *
+ *
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.1 (the "License").  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void * dlopen(
+    const char *path,
+    int mode);
+extern void * dlsym(
+    void * handle,
+    const char *symbol);
+extern const char * dlerror(
+    void);
+extern int dlclose(
+    void * handle);
+
+#define RTLD_LAZY	0x1
+#define RTLD_NOW	0x2
+#define RTLD_LOCAL	0x4
+#define RTLD_GLOBAL	0x8
+#define RTLD_NOLOAD	0x10
+#define RTLD_SHARED	0x20	/* not used, the default */
+#define RTLD_UNSHARED	0x40
+#define RTLD_NODELETE	0x80
+#define RTLD_LAZY_UNDEF	0x100
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/dlcompat-20010505/dlopen.c b/dlcompat-20010505/dlopen.c
new file mode 100644
index 0000000..a2d2036
--- /dev/null
+++ b/dlcompat-20010505/dlopen.c
@@ -0,0 +1,516 @@
+/*
+ * This file was modified by Christoph Pfisterer <cp at chrisp.de>
+ * on Tue, Jan 23 2001. See the file "ChangeLog" for details of what
+ * was changed.
+ *
+ *
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.1 (the "License").  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <limits.h>
+#include "mach-o/dyld.h"
+#include "dlfcn.h"
+
+/*
+ * debugging macros
+ */
+#if DEBUG > 0
+#define DEBUG_PRINT(format) fprintf(stderr,(format));fflush(stderr)
+#define DEBUG_PRINT1(format,arg1) fprintf(stderr,(format),(arg1));\
+  fflush(stderr)
+#define DEBUG_PRINT2(format,arg1,arg2) fprintf(stderr,(format),\
+  (arg1),(arg2));fflush(stderr)
+#define DEBUG_PRINT3(format,arg1,arg2,arg3) fprintf(stderr,(format),\
+  (arg1),(arg2),(arg3));fflush(stderr)
+#else
+#define DEBUG_PRINT(format) /**/
+#define DEBUG_PRINT1(format,arg1) /**/
+#define DEBUG_PRINT2(format,arg1,arg2) /**/
+#define DEBUG_PRINT3(format,arg1,arg2,arg3) /**/
+#undef DEBUG
+#endif
+
+/*
+ * The structure of a dlopen() handle.
+ */
+struct dlopen_handle {
+    dev_t dev;		/* the path's device and inode number from stat(2) */
+    ino_t ino; 
+    int dlopen_mode;	/* current dlopen mode for this handle */
+    int dlopen_count;	/* number of times dlopen() called on this handle */
+    NSModule module;	/* the NSModule returned by NSLinkModule() */
+    struct dlopen_handle *prev;
+    struct dlopen_handle *next;
+};
+static struct dlopen_handle *dlopen_handles = NULL;
+static const struct dlopen_handle main_program_handle = {NULL};
+static char *dlerror_pointer = NULL;
+
+/*
+ * NSMakePrivateModulePublic() is not part of the public dyld API so we define
+ * it here.  The internal dyld function pointer for
+ * __dyld_NSMakePrivateModulePublic is returned so thats all that maters to get
+ * the functionality need to implement the dlopen() interfaces.
+ */
+static
+int
+NSMakePrivateModulePublic(
+NSModule module)
+{
+    static int (*p)(NSModule module) = NULL;
+
+	if(p == NULL)
+	    _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",
+			      (unsigned long *)&p);
+	if(p == NULL){
+#ifdef DEBUG
+	    printf("_dyld_func_lookup of __dyld_NSMakePrivateModulePublic "
+		   "failed\n");
+#endif
+	    return(FALSE);
+	}
+	return(p(module));
+}
+
+/*
+ * helper routine: search for a named module in various locations
+ */
+static
+int
+_dl_search_paths(
+const char *filename,
+char *pathbuf,
+struct stat *stat_buf)
+{
+    const char *pathspec;
+    const char *element;
+    const char *p;
+    char *q;
+    char *pathbuf_end;
+    const char *envvars[] = {
+        "$DYLD_LIBRARY_PATH",
+        "$LD_LIBRARY_PATH",
+        "/usr/lib:/lib",
+        NULL };
+    int envvar_index;
+
+        pathbuf_end = pathbuf + PATH_MAX - 8;
+
+	for(envvar_index = 0; envvars[envvar_index]; envvar_index++){
+	    if(envvars[envvar_index][0] == '$'){
+	        pathspec = getenv(envvars[envvar_index]+1);
+	    }
+	    else {
+	        pathspec = envvars[envvar_index];
+	    }
+
+	    if(pathspec != NULL){
+	        element = pathspec;
+		while(*element){
+	            /* extract path list element */
+		    p = element;
+		    q = pathbuf;
+		    while(*p && *p != ':' && q < pathbuf_end)
+                        *q++ = *p++;
+		    if(q == pathbuf){  /* empty element */
+		        if(*p){
+		            element = p+1;
+			    continue;
+			}
+			break;
+		    }
+		    if (*p){
+		        element = p+1;
+		    }
+		    else{
+		        element = p;  /* this terminates the loop */
+		    }
+
+		    /* add slash if neccessary */
+		    if(*(q-1) != '/' && q < pathbuf_end){
+		        *q++ = '/';
+		    }
+
+		    /* append module name */
+		    p = filename;
+		    while(*p && q < pathbuf_end) *q++ = *p++;
+		    *q++ = 0;
+
+		    if(q >= pathbuf_end){
+		        /* maybe add an error message here */
+		        break;
+		    }
+
+		    if(stat(pathbuf, stat_buf) == 0){
+		        return 0;
+		    }
+		}
+	    }
+	}
+
+	/* we have searched everywhere, now we give up */
+	return -1;
+}
+
+/*
+ * dlopen() the MacOS X version of the FreeBSD dlopen() interface.
+ */
+void *
+dlopen(
+const char *path,
+int mode)
+{
+    const char *module_path;
+    void *retval;
+    struct stat stat_buf;
+    NSObjectFileImage objectFileImage;
+    NSObjectFileImageReturnCode ofile_result_code;
+    NSModule module;
+    struct dlopen_handle *p;
+    unsigned long options;
+    NSSymbol NSSymbol;
+    void (*init)(void);
+    char pathbuf[PATH_MAX];
+
+        DEBUG_PRINT2("libdl: dlopen(%s,0x%x) -> ", path, (unsigned int)mode);
+
+	dlerror_pointer = NULL;
+	/*
+	 * A NULL path is to indicate the caller wants a handle for the
+	 * main program.
+ 	 */
+	if(path == NULL){
+	    retval = (void *)&main_program_handle;
+	    DEBUG_PRINT1("main / %p\n", retval);
+	    return(retval);
+	}
+
+	/* see if the path exists and if so get the device and inode number */
+	if(stat(path, &stat_buf) == -1){
+	    dlerror_pointer = strerror(errno);
+
+	    if(path[0] == '/'){
+	        DEBUG_PRINT1("ERROR (stat): %s\n", dlerror_pointer);
+	        return(NULL);
+	    }
+
+	    /* search for the module in various places */
+	    if(_dl_search_paths(path, pathbuf, &stat_buf)){
+	        /* dlerror_pointer is unmodified */
+	        DEBUG_PRINT1("ERROR (stat): %s\n", dlerror_pointer);
+	        return(NULL);
+	    }
+	    DEBUG_PRINT1("found %s -> ", pathbuf);
+	    module_path = pathbuf;
+	    dlerror_pointer = NULL;
+	}
+	else{
+	    module_path = path;
+	}
+
+	/*
+	 * If we don't want an unshared handle see if we already have a handle
+	 * for this path.
+	 */
+	if((mode & RTLD_UNSHARED) != RTLD_UNSHARED){
+	    p = dlopen_handles;
+	    while(p != NULL){
+		if(p->dev == stat_buf.st_dev && p->ino == stat_buf.st_ino){
+		    /* skip unshared handles */
+		    if((p->dlopen_mode & RTLD_UNSHARED) == RTLD_UNSHARED)
+			continue;
+		    /*
+		     * We have already created a handle for this path.  The
+		     * caller might be trying to promote an RTLD_LOCAL handle
+		     * to a RTLD_GLOBAL.  Or just looking it up with
+		     * RTLD_NOLOAD.
+		     */
+		    if((p->dlopen_mode & RTLD_LOCAL) == RTLD_LOCAL &&
+		       (mode & RTLD_GLOBAL) == RTLD_GLOBAL){
+			/* promote the handle */
+			if(NSMakePrivateModulePublic(p->module) == TRUE){
+			    p->dlopen_mode &= ~RTLD_LOCAL;
+			    p->dlopen_mode |= RTLD_GLOBAL;
+			    p->dlopen_count++;
+			    DEBUG_PRINT1("%p\n", p);
+			    return(p);
+			}
+			else{
+			    dlerror_pointer = "can't promote handle from "
+					      "RTLD_LOCAL to RTLD_GLOBAL";
+			    DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+			    return(NULL);
+			}
+		    }
+		    p->dlopen_count++;
+		    DEBUG_PRINT1("%p\n", p);
+		    return(p);
+		}
+		p = p->next;
+	    }
+	}
+	
+	/*
+	 * We do not have a handle for this path if we were just trying to
+	 * look it up return NULL to indicate we don't have it.
+	 */
+	if((mode & RTLD_NOLOAD) == RTLD_NOLOAD){
+	    dlerror_pointer = "no existing handle for path RTLD_NOLOAD test";
+	    DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+	    return(NULL);
+	}
+
+	/* try to create an object file image from this path */
+	ofile_result_code = NSCreateObjectFileImageFromFile(module_path,
+							    &objectFileImage);
+	if(ofile_result_code != NSObjectFileImageSuccess){
+	    switch(ofile_result_code){
+	    case NSObjectFileImageFailure:
+		dlerror_pointer = "object file setup failure";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    case NSObjectFileImageInappropriateFile:
+		dlerror_pointer = "not a Mach-O MH_BUNDLE file type";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    case NSObjectFileImageArch:
+		dlerror_pointer = "no object for this architecture";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    case NSObjectFileImageFormat:
+		dlerror_pointer = "bad object file format";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    case NSObjectFileImageAccess:
+		dlerror_pointer = "can't read object file";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    default:
+		dlerror_pointer = "unknown error from "
+				  "NSCreateObjectFileImageFromFile()";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    }
+	}
+
+	/* try to link in this object file image */
+	options = NSLINKMODULE_OPTION_PRIVATE;
+	if((mode & RTLD_NOW) == RTLD_NOW)
+	    options |= NSLINKMODULE_OPTION_BINDNOW;
+	module = NSLinkModule(objectFileImage, module_path, options);
+	NSDestroyObjectFileImage(objectFileImage) ;
+	if(module == NULL){
+	    dlerror_pointer = "NSLinkModule() failed for dlopen()";
+	    DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+	    return(NULL);
+	}
+
+	/*
+	 * If the handle is to be global promote the handle.  It is done this
+	 * way to avoid multiply defined symbols.
+	 */
+	if((mode & RTLD_GLOBAL) == RTLD_GLOBAL){
+	    if(NSMakePrivateModulePublic(module) == FALSE){
+		dlerror_pointer = "can't promote handle from RTLD_LOCAL to "
+				  "RTLD_GLOBAL";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    }
+	}
+
+	p = malloc(sizeof(struct dlopen_handle));
+	if(p == NULL){
+	    dlerror_pointer = "can't allocate memory for the dlopen handle";
+	    DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+	    return(NULL);
+	}
+
+	/* fill in the handle */
+	p->dev = stat_buf.st_dev;
+        p->ino = stat_buf.st_ino;
+	if(mode & RTLD_GLOBAL)
+	    p->dlopen_mode = RTLD_GLOBAL;
+	else
+	    p->dlopen_mode = RTLD_LOCAL;
+	p->dlopen_mode |= (mode & RTLD_UNSHARED) |
+			  (mode & RTLD_NODELETE) |
+			  (mode & RTLD_LAZY_UNDEF);
+	p->dlopen_count = 1;
+	p->module = module;
+	p->prev = NULL;
+	p->next = dlopen_handles;
+	if(dlopen_handles != NULL)
+	    dlopen_handles->prev = p;
+	dlopen_handles = p;
+
+	/* call the init function if one exists */
+	NSSymbol = NSLookupSymbolInModule(p->module, "__init");
+	if(NSSymbol != NULL){
+	    init = NSAddressOfSymbol(NSSymbol);
+	    init();
+	}
+	
+	DEBUG_PRINT1("%p\n", p);
+	return(p);
+}
+
+/*
+ * dlsym() the MacOS X version of the FreeBSD dlopen() interface.
+ */
+void *
+dlsym(
+void * handle,
+const char *symbol)
+{
+    struct dlopen_handle *dlopen_handle, *p;
+    NSSymbol NSSymbol;
+    void *address;
+
+        DEBUG_PRINT2("libdl: dlsym(%p,%s) -> ", handle, symbol);
+
+	dlopen_handle = (struct dlopen_handle *)handle;
+
+	/*
+	 * If this is the handle for the main program do a global lookup.
+	 */
+	if(dlopen_handle == (struct dlopen_handle *)&main_program_handle){
+	    if(NSIsSymbolNameDefined(symbol) == TRUE){
+		NSSymbol = NSLookupAndBindSymbol(symbol);
+		address = NSAddressOfSymbol(NSSymbol);
+		dlerror_pointer = NULL;
+		DEBUG_PRINT1("%p\n", address);
+		return(address);
+	    }
+	    else{
+		dlerror_pointer = "symbol not found";
+		DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		return(NULL);
+	    }
+	}
+
+	/*
+	 * Find this handle and do a lookup in just this module.
+	 */
+	p = dlopen_handles;
+	while(p != NULL){
+	    if(dlopen_handle == p){
+		NSSymbol = NSLookupSymbolInModule(p->module, symbol);
+		if(NSSymbol != NULL){
+		    address = NSAddressOfSymbol(NSSymbol);
+		    dlerror_pointer = NULL;
+		    DEBUG_PRINT1("%p\n", address);
+		    return(address);
+		}
+		else{
+		    dlerror_pointer = "symbol not found";
+		    DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		    return(NULL);
+		}
+	    }
+	    p = p->next;
+	}
+
+	dlerror_pointer = "bad handle passed to dlsym()";
+	DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+	return(NULL);
+}
+
+/*
+ * dlerror() the MacOS X version of the FreeBSD dlopen() interface.
+ */
+const char *
+dlerror(
+void)
+{
+    const char *p;
+
+	p = (const char *)dlerror_pointer;
+	dlerror_pointer = NULL;
+	return(p);
+}
+
+/*
+ * dlclose() the MacOS X version of the FreeBSD dlopen() interface.
+ */
+int
+dlclose(
+void * handle)
+{
+    struct dlopen_handle *p, *q;
+    unsigned long options;
+    NSSymbol NSSymbol;
+    void (*fini)(void);
+
+        DEBUG_PRINT1("libdl: dlclose(%p) -> ", handle);
+
+	dlerror_pointer = NULL;
+	q = (struct dlopen_handle *)handle;
+	p = dlopen_handles;
+	while(p != NULL){
+	    if(p == q){
+		/* if the dlopen() count is not zero we are done */
+		p->dlopen_count--;
+		if(p->dlopen_count != 0){
+		    DEBUG_PRINT("OK");
+		    return(0);
+		}
+
+		/* call the fini function if one exists */
+		NSSymbol = NSLookupSymbolInModule(p->module, "__fini");
+		if(NSSymbol != NULL){
+		    fini = NSAddressOfSymbol(NSSymbol);
+		    fini();
+		}
+
+		/* unlink the module for this handle */
+		options = 0;
+		if(p->dlopen_mode & RTLD_NODELETE)
+		    options |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
+		if(p->dlopen_mode & RTLD_LAZY_UNDEF)
+		    options |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
+		if(NSUnLinkModule(p->module, options) == FALSE){
+		    dlerror_pointer = "NSUnLinkModule() failed for dlclose()";
+		    DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+		    return(-1);
+		}
+		if(p->prev != NULL)
+		    p->prev->next = p->next;
+		if(p->next != NULL)
+		    p->next->prev = p->prev;
+		if(dlopen_handles == p)
+		    dlopen_handles = p->next;
+		free(p);
+		DEBUG_PRINT("OK");
+		return(0);
+	    }
+	    p = p->next;
+	}
+	dlerror_pointer = "invalid handle passed to dlclose()";
+	DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
+	return(-1);
+}
diff --git a/doc/Makefile.in b/doc/Makefile.in
deleted file mode 100644
index ea0cd16..0000000
--- a/doc/Makefile.in
+++ /dev/null
@@ -1,496 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for SASL documentation
-# Rob Earhart
-# $Id: Makefile.am,v 1.34 2004/11/24 18:05:28 ken3 Exp $
-#
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = rfc1321.txt \
-		rfc1939.txt \
-		rfc2104.txt \
-		rfc2195.txt \
-		rfc2222.txt \
-		rfc2243.txt \
-		rfc2245.txt \
-		rfc2289.txt \
-		rfc2444.txt \
-		rfc2595.txt \
-		rfc2831.txt \
-		rfc2945.txt \
-		rfc3174.txt \
-		testing.txt \
-		server-plugin-flow.fig \
-		draft-burdis-cat-srp-sasl-xx.txt \
-		draft-ietf-sasl-anon-xx.txt \
-		draft-ietf-sasl-crammd5-xx.txt \
-		draft-ietf-sasl-gssapi-xx.txt \
-		draft-ietf-sasl-plain-xx.txt \
-		draft-ietf-sasl-rfc2222bis-xx.txt \
-		draft-ietf-sasl-rfc2831bis-xx.txt \
-		draft-ietf-sasl-saslprep-xx.txt \
-		draft-murchison-sasl-login-xx.txt \
-		draft-newman-sasl-c-api-xx.txt \
-		draft-newman-sasl-passdss-xx.txt \
-		programming.html \
-		sysadmin.html \
-		gssapi.html \
-		advanced.html \
-		options.html \
-		plugprog.html \
-		appconvert.html \
-		macosx.html \
-		windows.html \
-		readme.html \
-		mechanisms.html \
-		upgrading.html \
-		index.html \
-		components.html \
-		install.html \
-		TODO \
-		ONEWS \
-		NTMakefile
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/doc/draft-burdis-cat-srp-sasl-xx.txt b/doc/draft-burdis-cat-srp-sasl-xx.txt
new file mode 100644
index 0000000..d784f82
--- /dev/null
+++ b/doc/draft-burdis-cat-srp-sasl-xx.txt
@@ -0,0 +1,2858 @@
+
+
+
+Network                                                        K. Burdis
+Internet-Draft                                         Rhodes University
+Expires: November 28, 2003                                     R. Naffah
+                                                          Forge Research
+                                                            May 30, 2003
+
+
+            Secure Remote Password Authentication Mechanism
+                      draft-burdis-cat-srp-sasl-08
+
+Status of this Memo
+
+   This document is an Internet-Draft and is in full conformance with
+   all provisions of Section 10 of RFC2026.
+
+   Internet-Drafts are working documents of the Internet Engineering
+   Task Force (IETF), its areas, and its working groups. Note that other
+   groups may also distribute working documents as Internet-Drafts.
+
+   Internet-Drafts are draft documents valid for a maximum of six months
+   and may be updated, replaced, or obsoleted by other documents at any
+   time. It is inappropriate to use Internet-Drafts as reference
+   material or to cite them other than as "work in progress."
+
+   The list of current Internet-Drafts can be accessed at http://
+   www.ietf.org/ietf/1id-abstracts.txt.
+
+   The list of Internet-Draft Shadow Directories can be accessed at
+   http://www.ietf.org/shadow.html.
+
+   This Internet-Draft will expire on November 28, 2003.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2003). All Rights Reserved.
+
+Abstract
+
+   This document describes an authentication mechanism based on the
+   Secure Remote Password protocol (SRP-6) and how to use it with the
+   authentication frameworks Secure Authentication and Security Layer
+   (SASL), Generic Security Services Application Programming Interface
+   (GSS-API) and Extensible Authentication Protocol (EAP).  This
+   mechanism performs mutual authentication and can provide a security
+   layer with replay detection, integrity protection and/or
+   confidentiality protection.
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 1]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Table of Contents
+
+   1.    Introduction . . . . . . . . . . . . . . . . . . . . . . . .  4
+   2.    Conventions Used in this Document  . . . . . . . . . . . . .  5
+   3.    Data Element Formats . . . . . . . . . . . . . . . . . . . .  6
+   3.1   Scalar Numbers . . . . . . . . . . . . . . . . . . . . . . .  6
+   3.2   Multi-Precision Integers . . . . . . . . . . . . . . . . . .  6
+   3.3   Octet Sequences  . . . . . . . . . . . . . . . . . . . . . .  7
+   3.4   Extended Octet Sequences . . . . . . . . . . . . . . . . . .  7
+   3.5   Text . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
+   3.6   Buffers  . . . . . . . . . . . . . . . . . . . . . . . . . .  8
+   3.7   Data Element Size Limits . . . . . . . . . . . . . . . . . .  8
+   3.8   Unsigned Integers  . . . . . . . . . . . . . . . . . . . . .  8
+   4.    Protocol Description . . . . . . . . . . . . . . . . . . . .  9
+   4.1   Client Sends its Identity  . . . . . . . . . . . . . . . . . 11
+   4.2   Server Agrees to Re-use Parameters of a Previous Session . . 11
+   4.3   Server Sends Protocol Elements . . . . . . . . . . . . . . . 12
+   4.4   Client Sends its Ephemeral Public Key and Evidence . . . . . 15
+   4.5   Server Verifies Client's Evidence and Sends its Evidence . . 17
+   5.    Security Layer . . . . . . . . . . . . . . . . . . . . . . . 19
+   5.1   Cryptographic Primitives . . . . . . . . . . . . . . . . . . 20
+   5.1.1 Pseudo Random Number Generator . . . . . . . . . . . . . . . 20
+   5.1.2 Key Derivation Function  . . . . . . . . . . . . . . . . . . 22
+   5.2   Confidentiality Protection . . . . . . . . . . . . . . . . . 23
+   5.3   Replay Detection . . . . . . . . . . . . . . . . . . . . . . 24
+   5.4   Integrity Protection . . . . . . . . . . . . . . . . . . . . 25
+   5.5   Summary of Security Layer Output . . . . . . . . . . . . . . 25
+   6.    Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 27
+   6.1   Mandatory Algorithms . . . . . . . . . . . . . . . . . . . . 27
+   6.2   Modulus and Generator Values . . . . . . . . . . . . . . . . 27
+   6.3   Replay Detection Sequence Number Counters  . . . . . . . . . 27
+   6.4   Re-using the Parameters of a Previous Session  . . . . . . . 28
+   7.    SASL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
+   7.1   Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 30
+   7.2   Mechanism Name . . . . . . . . . . . . . . . . . . . . . . . 30
+   7.3   Security Layer . . . . . . . . . . . . . . . . . . . . . . . 30
+   7.4   Profile Considerations . . . . . . . . . . . . . . . . . . . 30
+   7.5   Example  . . . . . . . . . . . . . . . . . . . . . . . . . . 31
+   8.    GSS-API  . . . . . . . . . . . . . . . . . . . . . . . . . . 34
+   8.1   Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 34
+   8.2   Terminology  . . . . . . . . . . . . . . . . . . . . . . . . 34
+   8.3   Initial Token  . . . . . . . . . . . . . . . . . . . . . . . 34
+   8.4   Security Layer . . . . . . . . . . . . . . . . . . . . . . . 35
+   9.    EAP  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
+   9.1   Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 36
+   9.2   Terminology  . . . . . . . . . . . . . . . . . . . . . . . . 36
+   9.3   Method Details . . . . . . . . . . . . . . . . . . . . . . . 36
+   9.4   Security Claims  . . . . . . . . . . . . . . . . . . . . . . 37
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 2]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   10.   Security Considerations  . . . . . . . . . . . . . . . . . . 40
+   11.   Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 41
+         Normative References . . . . . . . . . . . . . . . . . . . . 42
+         Informative References . . . . . . . . . . . . . . . . . . . 44
+         Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 46
+   A.    Modulus and Generator Values . . . . . . . . . . . . . . . . 47
+   B.    Changes since the previous draft . . . . . . . . . . . . . . 49
+         Intellectual Property and Copyright Statements . . . . . . . 50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 3]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+1. Introduction
+
+   The Secure Remote Password (SRP) is a password-based, zero-knowledge,
+   authentication and key-exchange protocol developed by Thomas Wu.  It
+   has good performance, is not plaintext-equivalent and maintains
+   perfect forward secrecy.  It provides authentication (optionally
+   mutual authentication) and the negotiation of a shared context key
+   [SRP].
+
+   The mechanism described herein is based on the SRP-6 protocol,
+   described in [SRP-6] and [SRP-6i].  SRP-6 is an improved version of
+   the original SRP protocol (also called SRP-3) described in
+   [RFC-2945].  Due to the design of the mechanism, mutual
+   authentication is MANDATORY.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 4]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+2. Conventions Used in this Document
+
+   o  A hex digit is an element of the set:
+
+         {0, 1, 2, 3, 4, 5, 6, 7, 8 , 9, A, B, C, D, E, F}
+
+      A hex digit is the representation of a 4-bit string.  Examples:
+
+         7 = 0111
+
+         A = 1010
+
+   o  An octet is an 8-bit string.  In this document an octet may be
+      written as a pair of hex digits.  Examples:
+
+         7A = 01111010
+
+         02 = 00000010
+
+   o  All data is encoded and sent in network byte order (big-endian).
+
+   o  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
+      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
+      in this document are to be interpreted as described in [RFC-2119].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 5]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+3. Data Element Formats
+
+   This section describes the encoding of the data elements used by the
+   mechanism described in this document.
+
+3.1 Scalar Numbers
+
+   Scalar numbers are unsigned quantities.  Using b[k] to refer to the
+   k-th octet being processed, the value of a two-octet scalar is:
+
+      ((b[0] << 8) + b[1]),
+
+   where << is the bit left-shift operator.  The value of a four-octet
+   scalar is:
+
+      ((b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3]).
+
+
+3.2 Multi-Precision Integers
+
+   Multi-Precision Integers, or MPIs, are positive integers used to hold
+   large integers used in cryptographic computations.
+
+   MPIs are encoded using a scheme inspired by that used by OpenPGP -
+   [RFC-2440] (section 3.2) - for encoding such entities:
+
+      The encoded form of an MPI SHALL consist of two pieces: a
+      two-octet scalar that represents the length of the entity, in
+      octets, followed by a sequence of octets that contain the actual
+      integer.
+
+      These octets form a big-endian number; A big-endian number can be
+      encoded by prefixing it with the appropriate length.
+
+      Examples: (all numbers are in hexadecimal)
+
+         The sequence of octets [00 01 01] encodes an MPI with the value
+         1, while the sequence [00 02 01 FF] encodes an MPI with the
+         value of 511.
+
+      Additional rule:
+
+      *  The length field of an encoded MPI describes the octet count
+         starting from the MPI's first non-zero octet, containing the
+         most significant non-zero bit.  Thus, the encoding [00 02 01]
+         is not formed correctly; It should be [00 01 01].
+
+   We shall use the syntax mpi(A) to denote the encoded form of the
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 6]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   multi-precision integer A.  Furthermore, we shall use the syntax
+   bytes(A) to denote the big-endian sequence of octets forming the
+   multi-precision integer with the most significant octet being the
+   first non-zero octet containing the most significant bit of A.
+
+3.3 Octet Sequences
+
+   This mechanism generates, uses and exchanges sequences of octets;
+   e.g. output values of message digest algorithm functions.  When such
+   entities travel on the wire, they shall be preceded by a one-octet
+   scalar quantity representing the count of following octets.
+
+   Note that a zero-length octet sequence is encoded as a single 00
+   octet.
+
+   We shall use the syntax os(s) to denote the encoded form of the octet
+   sequence.  Furthermore, we shall use the syntax bytes(s) to denote
+   the sequence of octets s, in big-endian order.
+
+3.4 Extended Octet Sequences
+
+   Extended sequences of octets are exchanged when using the security
+   layer.  When these sequences travel on the wire, they shall be
+   preceded by a four-octet scalar quantity representing the count of
+   following octets.
+
+   We shall use the syntax eos(s) to denote the encoded form of the
+   extended octet sequence.  Furthermore, we shall use the syntax
+   bytes(s) to denote the sequence of octets s, in big-endian order.
+
+3.5 Text
+
+   The only character set for text is the UTF-8 encoding [RFC-2279] of
+   Unicode characters [ISO-10646]. All text MUST be in Unicode
+   Normalization Form KC [UNICODE-KC] without NUL characters.
+
+   In addition, to avoid non-interoperability due to incompatible
+   normalisation techniques, the client MUST prepare strings using the
+   [SASLprep] profile of [RFC-3454]
+
+   We shall use the syntax utf8(L) to denote the string L in UTF-8
+   encoding, preceded by a two-octet scalar quantity representing the
+   count of following octets.  Furthermore, we shall use the syntax
+   bytes(L) to denote the sequence of octets representing the UTF-8
+   encoding of L, in big-endian order.
+
+   Not that the empty string is encoded as the two octet sequence 00 00.
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 7]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+3.6 Buffers
+
+   In this mechanism data is exchanged between the client and server
+   using buffers.  A buffer acts as an envelope for the sequence of data
+   elements sent by one end-point of the exchange, and expected by the
+   other.
+
+   A buffer MAY NOT contain other buffers.  It may only contain zero,
+   one or more data elements.
+
+   A buffer shall be encoded as two fields: a four-octet scalar quantity
+   representing the count of following octets, and the concatenation of
+   the octets of the data element(s) contained in the buffer.
+
+   We shall use the syntax {A|B|C} to denote a buffer containing A, B
+   and C in that order.  For example:
+
+      { mpi(N) | mpi(g) | utf8(L) }
+
+   is a buffer containing, in the designated order, the encoded forms of
+   an MPI N, an MPI g and a Text L.
+
+3.7 Data Element Size Limits
+
+   The following table details the size limit, in number of octets, for
+   each of the data element encodings described earlier.
+
+      Data element type          Header       Size limit in octets
+                                (octets)       (excluding header)
+      ------------------------------------------------------------
+      Octet Sequence               1                  255
+      MPI                          2                 65,535
+      Text                         2                 65,535
+      Extended Octet Sequence      4             2,147,483,383
+      Buffer                       4             2,147,483,643
+
+   An implementation MUST signal an exception if any size constraint is
+   violated.
+
+3.8 Unsigned Integers
+
+   This mechanism uses unsigned integer values ranging from zero to
+   4,294,967,296.
+
+   When such entities travel on the wire, they shall be encoded as
+   4-octet Scalar Numbers.  We shall use the syntax uint(n) to denote
+   the encoding of an Unsigned Integer n.
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 8]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+4. Protocol Description
+
+   The following sections describe the sequence of data transmitted
+   between the client and server for SRP authentication, as well as the
+   extra control information exchanged to enable a client to request
+   whether or not replay detection, integrity protection and/or
+   confidentiality protection should be provided by a security layer.
+   There are two possible mechanism data exchanges during the
+   authentication phase:
+
+   The following exchange occurs when a new session is negotiated
+   between the client and the server.  It will also occur when the
+   client requests re-use of the parameters of a previous session and
+   either the server does not support such re-use or no longer considers
+   the previous session to be valid:
+
+    Client                                                   Server
+
+    ---  { utf8(U) | utf8(I) | utf8(sid) | os(cn) }  ------------->
+
+    <------ { 00 | mpi(N) | mpi(g) | os(s) | mpi(B) | utf8(L) } ---
+
+    ---  { mpi(A) | os(M1) | utf8(o) | os(cIV) }  ---------------->
+
+    <------ { os(M2) | os(sIV) | utf8(sid) | uint(ttl) }  ---------
+
+   where:
+
+      U   is the authentication identity (username),
+
+      I   is the authorisation identity (userid),
+
+      sid is the identifier of a previous session whose parameters the
+      client wishes to re-use,
+
+      cn  is the client's nonce used in deriving a new shared context
+      key from the shared context key of the previous session,
+
+      00  is an octet indicating that the previous session parameters
+      will NOT be re-used,
+
+      N   is the safe prime modulus,
+
+      g   is the generator,
+
+      s   is the user's password salt,
+
+      B   is the server's ephemeral public key,
+
+
+
+Burdis & Naffah        Expires November 28, 2003                [Page 9]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      L   is the options list indicating available security services,
+
+      A   is the client's ephemeral public key,
+
+      M1  is the client's evidence that the shared key K is known,
+
+      o   is the options list indicating chosen security services,
+
+      cIV is the client's initial vector for the chosen encryption
+      algorithm,
+
+      M2  is the server's evidence that the shared key K is known.
+
+      sIV is the server's initial vector for the chosen encryption
+      algorithm,
+
+      sid is the identifier the server gives to this session for
+      possible later re-use of the negotiated parameters,
+
+      ttl is the time period for which this session's parameters may be
+      re-usable,
+
+   The following exchange occurs when the client requests that the
+   parameters negotiated in a previous session be re-used in this
+   session, but with a newly derived shared context key, and the server
+   agrees:
+
+    Client                                                   Server
+
+    ---  { utf8(U) | utf8(I) | utf8(sid) | os(cn) }  -------------->
+
+    <----------------------------------  { FF | os(sn) }  ----------
+
+   where:
+
+      U   is the authentication identity (username),
+
+      I   is the authorisation identity (userid),
+
+      sid is the identifier of a previous session whose parameters the
+      client wishes to re-use,
+
+      cn  is the client's nonce used in deriving a new shared context
+      key from the shared context key of the previous session,
+
+      FF  is an octet indicating that the previous session parameters
+      WILL be re-used,
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 10]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      sn  is the server's nonce used in deriving a new shared context
+      key from the shared context key of the previous session,
+
+
+4.1 Client Sends its Identity
+
+   The client determines its authentication identity U and authorisation
+   identity I, encodes them and sends them to the server.
+
+   The semantics of both U and I are intended to be the same as
+   described in [SASL].  Specifically, the authentication identity U is
+   derived from the client's authentication credentials, and the
+   authorisation identity I is used by the server as the primary
+   identity for making access policy decisions.
+
+   As a client might not have the same information as the server,
+   clients SHOULD NOT themselves try to derive authorisation identities
+   from authentication identities.  When an authorisation identity is
+   not specified by the user the client SHOULD send an empty string
+   instead.
+
+   If the client does not wish to re-use parameters negotiated in a
+   previous session then it sets sid to the empty string and cn to a
+   zero-length octet sequence.
+
+   However, if the client does wish to attempt to re-use the parameters
+   negotiated in a previous session then it sets sid to the session
+   identifier for that session, and sets cn as follows:
+
+      cn = prng()
+
+   where:
+
+      prng()  is a random number generation function that outputs at
+      least 16 octets of data.
+
+   See Section 6.4 for more information on re-using negotiated
+   parameters of a previous session.
+
+   The client sends:
+
+      { utf8(U) | utf8(I) | utf8(sid) | os(cn) }
+
+
+4.2 Server Agrees to Re-use Parameters of a Previous Session
+
+   If the server supports re-using the parameters negotiated in a
+   previous session and it considers the previous session, identified by
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 11]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   the session identifier (sid) received from the client, to be valid,
+   it responds as follows:
+
+   The server sends the octet FF as the first element of the message to
+   indicate to the client that parameters of the previous session are
+   being re-used.  It also generates a nonce (sn), which is later used
+   in deriving a new shared context key for this session:
+
+      sn = prng()
+
+   where:
+
+      prng()  is a random number generation function that outputs at
+      least 16 octets of data.
+
+   Note that the server nonce (sn) MUST NOT be the same as the client
+   nonce (cn).
+
+   The server sends:
+
+      { FF | os(sn) }
+
+   See Section 6.4 for more information on re-using negotiated
+   parameters of a previous session and deriving the new shared context
+   key.
+
+4.3 Server Sends Protocol Elements
+
+   Otherwise, the server receives U and looks up the safe prime modulus
+   N, the generator g, the salt s, and the verifier v, to be used for
+   that identity.  It uses the this information to generate its
+   ephemeral public key B as follows:
+
+      b = prng();
+
+      B = ((3 * v) + (g ** b)) % N;
+
+   where:
+
+      prng() is a random number generation function,
+
+      b      is the MPI that will act as the server's private key,
+
+      v      is the stored password verifier value,
+
+      g      is the generator,
+
+      N      is the safe prime modulus,
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 12]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      *      is the multiplication operator,
+
+      +      is the addition operator,
+
+      **     is the exponentiation operator,
+
+      %      is the modulus operator,
+
+   The server also creates an options list L, which consists of a
+   comma-separated list of option strings that specify the options the
+   server supports.  This options list MUST NOT contain any whitespace
+   characters and all alphabetic characters MUST be in lowercase.  When
+   used in digest calculations by the client the options list MUST be
+   used as received.
+
+   The following option strings are defined:
+
+   o  "mda=<MDA-name>" indicates that the server supports the designated
+      hash function as the underlying Message Digest Algorithm for the
+      designated user to be used for all SRP calculations - to compute
+      both client-side and server-side digests.  The specified algorithm
+      MUST meet the requirements specified in section 3.2 of [RFC-2945]:
+
+         "Any hash function used with SRP should produce an output of at
+         least 16 bytes and have the property that small changes in the
+         input cause significant nonlinear changes in the output."
+
+      Note that in the interests of interoperability between client and
+      server implementations and with other SRP-based tools, both the
+      client and the server MUST support SHA-160 as an underlying
+      Message Digest Algorithm.  While the server is not required to
+      list SHA-160 as an available underlying Message Digest Algorithm,
+      it must be able to do so.
+
+   o  "integrity=hmac-<MDA-name>" indicates that the server supports
+      integrity protection using the HMAC algorithm [RFC-2104] with
+      <MDA-name> as the underlying Message Digest Algorithm.  Acceptable
+      MDA names are chosen from [SCAN] under the MessageDigest section.
+      A server SHOULD send such an option string for each HMAC algorithm
+      it supports.  The server MUST advertise at least one integrity
+      protection algorithm and in the interest of interoperability the
+      server SHOULD advertise support for the HMAC-SHA-160 algorithm.
+
+   o  "replay_detection" indicates that the server supports replay
+      detection using sequence numbers.  Replay detection SHALL NOT be
+      activated without also activating integrity protection.  If the
+      replay detection option is offered (by the server) and/or chosen
+      (by the client) without explicitly specifying an integrity
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 13]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      protection option, then the default integrity protection option
+      "integrity=hmac-sha-160" is implied and SHALL be activated.
+
+   o  "confidentiality=<cipher-name>" indicates that the server supports
+      confidentiality protection using the symmetric key block cipher
+      algorithm <cipher-name>.  The server SHOULD send such an option
+      string for each confidentiality protection algorithm it supports.
+      Note that in the interest of interoperability, if the server
+      offers confidentiality protection, it MUST send the option string
+      "confidentiality=aes" since it is then MANDATORY for it to provide
+      support for the [AES] algorithm.
+
+   o  "mandatory=[integrity|replay_detection|confidentiality]" is an
+      option only available to the server that indicates that the
+      specified security layer option is MANDATORY and MUST be chosen by
+      the client for use in the resulting security layer.  If a server
+      specifies an option as mandatory in this way, it MUST abort the
+      connection if the specified option is not chosen by the client.
+      It doesn't make sense for the client to send this option since it
+      is only able to choose options that the server advertises.  The
+      client SHOULD abort the connection if the server does not offer an
+      option that it requires.  If this option is not specified then
+      this implies that no options are mandatory.  The server SHOULD
+      always send the "mandatory=integrity" option indicating that
+      integrity protection is required.
+
+   o  "maxbuffersize=<number-of-bytes>" indicates to the peer the
+      maximum number of raw bytes (excluding the buffer header) to be
+      processed by the security layer at a time, if one is negotiated.
+      The value of <number-of-bytes> MUST NOT exceed the Buffer size
+      limit defined in section 3.7.  If this option is not detected by a
+      client or server mechanism, then it shall operate its security
+      layer on the assumption that the maximum number of bytes that may
+      be sent, to the peer server or client mechanism respectively, is
+      the Buffer data size limit indicated in section 3.7.  On the other
+      hand, if a recipient detects this option, it shall break any
+      octet-sequence longer than the designated limit into two or more
+      fragments, before sending them separately, in sequence, to the
+      peer.
+
+   For example, if the server supports integrity protection using the
+   HMAC-SHA-160 and HMAC-MD5 algorithms, replay detection and no
+   confidentiality protection, the options list would be:
+
+      mda=sha-1,integrity=hmac-sha-160,integrity=hmac-md5,replay_detection
+
+   The server sends the octet 00 as the first element of the message to
+   indicate to the client that parameters from a previous session are
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 14]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   NOT being used.
+
+   The server sends:
+
+      { 00 | mpi(N) | mpi(g) | os(s) | mpi(B) | utf8(L) }
+
+
+4.4 Client Sends its Ephemeral Public Key and Evidence
+
+   The client receives the options list L from the server that specifies
+   the Message Digest Algorithm(s) available to be used for all SRP
+   calculations, the security service options the server supports,
+   including the maximum buffer size the server can handle, and the
+   server's ephemeral public key B.  The client selects options from
+   this list and creates a new options list o that specifies the
+   selected Message Digest Algorithm to be used for SRP calculations and
+   the security services that will be used in the security layer.  At
+   most one available Message Digest Algorithm name, one available
+   integrity protection algorithm and one available confidentiality
+   protection algorithm may be selected.  In addition the client may
+   specify the maximum buffer size it can handle.  The client MUST
+   include any option specified by the mandatory option.
+
+   The client SHOULD always select an integrity protection algorithm
+   even if the server does not make it mandatory to do so.  If the
+   client selects a confidentiality protection algorithm it SHOULD then
+   also select an integrity protection algorithm.
+
+   The options list o MUST NOT contain any whitespace characters and all
+   alphabetic characters MUST be in lowercase.  When used in digest
+   calculations by the server the options list MUST be used as received.
+
+   The client generates its ephemeral public key A as follows:
+
+      a = prng();
+
+      A = (g ** a) % N;
+
+   where:
+
+      a      is the MPI that will act as the client's private key,
+
+   The client also calculates the shared context key K, and calculates
+   the evidence M1 that proves to the server that it knows the shared
+   context key K, as well as the server's ephemeral public key B, the
+   user's authorisation identity I and the server's options list L.
+
+   K, on the client's side is computed as follows:
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 15]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      x = H(s | H(U | ":" | p));
+
+      u = H(A | B);
+
+      S = ((B - (3 * (g ** x))) ** (a + (u * x))) % N;
+
+      K = H(S);
+
+   where:
+
+      s    is the user's password salt,
+
+      U    is the authentication identity (username),
+
+      p    is the password value.
+
+      A    is the client's ephemeral public key,
+
+      B    is the server's ephemeral public key,
+
+      g    is the generator,
+
+      N    is the safe prime modulus,
+
+      H()  is the result of digesting the designated input/data with the
+      chosen underlying Message Digest Algorithm function.
+
+      -    is the subtraction operator,
+
+      *    is the multiplication operator,
+
+      +    is the addition operator,
+
+      **   is the exponentiation operator,
+
+      %    is the modulus operator,
+
+   M1 is computed as:
+
+            H(   bytes(H( bytes(N) )) ^ bytes( H( bytes(g) ))
+               | bytes(H( bytes(U) ))
+               | bytes(s)
+               | bytes(A)
+               | bytes(B)
+               | bytes(K)
+               | bytes(H( bytes(I) ))
+               | bytes(H( bytes(L) ))
+             )
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 16]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   where:
+
+      ^    is the bitwise XOR operator.
+
+   All parameters received from the server that are used as input to a
+   digest operation MUST be used as received.
+
+   If the client chooses to activate the Confidentiality Protection
+   service in the Security Layer, it MUST send the Initial Vector cIV
+   that the server will use to set up its encryption context.  (See
+   Section 5.2 for details on the Confidentiality Protection service and
+   how cIV is generated.)  However, this element MAY be a zero-length
+   octet stream if the server does not advertise the Confidentiality
+   Protection service or the client decides not to activate it.
+
+   The client sends:
+
+      { mpi(A) | os(M1) | utf8(o) | os(cIV) }
+
+
+4.5 Server Verifies Client's Evidence and Sends its Evidence
+
+   The server calculates the shared context key K, and verifies the
+   client's evidence M1.
+
+   K, on the server's side is computed as follows:
+
+      u = H(A | B);
+
+      S = ((A * (v ** u)) ** b) % N;
+
+      K = H(S);
+
+   where:
+
+      A    is the client's ephemeral public key,
+
+      B    is the server's ephemeral public key,
+
+      v    is the stored password verifier value,
+
+      b    is the server's ephemeral private key,
+
+      N    is the safe prime modulus,
+
+      H()  is the result of digesting the designated input/data with the
+      chosen underlying Message Digest Algorithm function.
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 17]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      *    is the multiplication operator,
+
+      **   is the exponentiation operator,
+
+      %    is the modulus operator,
+
+   If the client chose to activate the Confidentiality Protection
+   service in the Security Layer then the server MUST send the Initial
+   Vector sIV that the client will use to set up its encryption context.
+   (See Section 5.2 for details on the Confidentiality Protection
+   service and how sIV is generated.)  However, this element MAY be a
+   zero-length octet sequence if the client did not choose to activate
+   the Confidentiality Protection service.
+
+   If the server's policy allows re-using the parameters of this session
+   then it sets sid to a unique identifier for this session and sets ttl
+   to the number of seconds for which the session MAY be valid.  If the
+   server does not support re-using the parameters of this session then
+   it sets sid to the empty string and ttl to any value.  See Section
+   6.4 for more information on re-using negotiated parameters of a
+   previous session.
+
+   The server computes its evidence M2, which proves to the client that
+   it knows the shared context key K, as well as U, I and o, as follows:
+
+            H(   bytes(A)
+               | bytes(M1)
+               | bytes(K)
+               | bytes(H( bytes(I) ))
+               | bytes(H( bytes(o) ))
+               | bytes(sid)
+               | ttl
+            )
+
+   All parameters received from the client that are used as input to a
+   digest operation MUST be used as received.
+
+   The server sends:
+
+      { os(M2) | os(sIV) | sid | ttl }
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 18]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+5. Security Layer
+
+   Depending on the options offered by the server and chosen by the
+   client, the security layer may provide integrity protection, replay
+   detection, and/or confidentiality protection.
+
+   The security layer can be thought of as a three-stage filter through
+   which the data flows from the output of one stage to the input of the
+   following one.  The first input is the original data, while the last
+   output is the data after being subject to the transformations of this
+   filter.
+
+   The data always passes through this three-stage filter, though any of
+   the stages may be inactive.  Only when a stage is active would the
+   output be different from the input.  In other words, if a stage is
+   inactive, the octet sequence at the output side is an exact duplicate
+   of the same sequence at the input side.
+
+   Schematically, the three-stage filter security layer appears as
+   follows:
+
+                 +----------------------------+
+                 |                            |     I/ p1
+         p1  --->| Confidentiality protection |---+
+                 |                            |   | A/ c
+                 +----------------------------+   |
+                                                  |
+             +------------------------------------+
+             |
+             |   +----------------------------+
+             |   |                            |     I/ p2
+         p2  +-->|      Replay detection      |---+
+                 |                            |   | A/ p2 | q
+                 +----------------------------+   |
+                                                  |
+             +------------------------------------+
+             |
+             |   +----------------------------+
+             |   |                            |     I/ p3
+         p3  +-->|    Integrity protection    |--->
+                 |                            |     A/ p3 | C
+                 +----------------------------+
+
+   where:
+
+      p1, p2 and p3 are the input octet sequences at each stage,
+
+      I/ denotes the output at the end of one stage if/when the stage is
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 19]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      inactive or disabled,
+
+      A/ denotes the output at the end of one stage if/when the stage is
+      active or enabled,
+
+      c is the encrypted (sender-side) or decrypted (receiver-side)
+      octet sequence.  c1 shall denote the value computed by the sender,
+      while c2 shall denote the value computed by the receiver.
+
+      q is a four-octet scalar quantity representing a sequence number,
+
+      C is the Message Authentication Code.  C1 shall denote the value
+      of the MAC as computed by the sender, while C2 shall denote the
+      value computed by the receiver.
+
+   It is worth noting here that both client and server have their own
+   distinct security contexts, including distinct encryption and
+   decryption sub-contexts.  In principal, nothing in this specification
+   should prevent an implementation from supporting asynchronous
+   connections.
+
+5.1 Cryptographic Primitives
+
+5.1.1 Pseudo Random Number Generator
+
+   This mechanism requires random data to be generated for use in:
+
+   1.  The CALG key material for both the client and server when the
+       Confidentiality Protection service is enabled.
+
+   2.  The IALG key material for both the client and server when the
+       Integrity Protection service is enabled.
+
+   The PRNG used in this specification is based on the pseudo-random
+   function described in section 5 of [UMAC].  It uses the [AES]
+   algorithm, in its 128-bit key size variant, as the underlying
+   symmetric key block cipher for its operations.
+
+   A formal description of this PRNG follows:
+
+   o  Initialisation
+
+      *  SK: a 16-octet sequence (seeding key to AES)
+
+   o  Input
+
+      *  n: a positive integer
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 20]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   o  Output
+
+      *  Y: an n-octet sequence
+
+   o  Algorithm
+
+      *  (initialisation)
+
+         1.  Initialise an AES instance for encryption with the first 16
+             octets of SK as its user-supplied key material.  Let "aes"
+             be that instance; i.e. aes = AES(SK, ENCRYPTION);
+
+         2.  Initialise T to be an all-zero 16-octet long sequence;
+
+      *  (for every input)
+
+         1.  Initialise "remaining" to n;
+
+         2.  Initialise Y to be a 0-length octet sequence;
+
+         3.  while (remaining > 0) do
+
+             1.  T = aes(T);
+
+             2.  Append m octets from T to Y, where m is the minimum of
+                 16 and remaining;
+
+             3.  Subtract 16 from remaining;
+
+         4.  return Y;
+
+   In this document, "PRNG(key,n)" will refer to this algorithm, with
+   the initialisation parameter SK set to be the octets of the specified
+   key, returning n bits of pseudo-random data.  For example,
+   "PRNG(K,n)" will refer to this algorithm, with the initialisation
+   parameters SK set to the shared context key K computed by the SRP
+   calculations (see Section 4.4 and Section 4.5), returning n bits of
+   pseudo-random data.
+
+   This algorithm MAY also be used as part of the SRP calculations to
+   generate the required "a" and "b" parameters used in creating the
+   client and server ephemeral private keys ("A" and "B"), or to
+   generate the cn and sn parameters used in session re-use, or to
+   generate the initial vectors sIV and cIV used to set up the
+   encryption contexts. In this case the initialisation parameter SK can
+   be any 16-octet sequence (e.g. multiple representations of the
+   time-of-day).
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 21]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   If the same PRNG instance is used for both these calculations and the
+   calculations in this specification, it MUST be re-initialised with
+   the shared context key K before any of the latter calculations are
+   performed.
+
+5.1.2 Key Derivation Function
+
+   During the authentication phase, both parties compute the shared
+   context key K (see Section 4.4 for the client, and Section 4.5 for
+   the server sides respectively).  The length of K is s bits, where "s"
+   is the output length of the chosen underlying Message Digest
+   Algorithm used in the SRP calculations (see "mda" option in Section
+   4.3).
+
+   When Confidentiality Protection is required, and the length of K is
+   not equal to the length of the user-supplied key material needed to
+   initialise the chosen Confidentiality Algorithm (CALG), the peers
+   MUST apply the Key Derivation Function (KDF) in order to obtain
+   enough data for this purpose.
+
+   Similarly, when Integrity Protection is required, and the length of K
+   is not equal to the required length of the key material needed to
+   initialise the chosen Integrity Algorithm (IALG), the peers MUST
+   apply the Key Derivation Function (KDF) in order to obtain enough
+   data for this purpose too.
+
+   If the KDF is required for both the key used with the CALG and the
+   key used with the IALG then it is first applied for the CALG key and
+   thereafter for the IALG key.
+
+   We define this KDF as:
+
+      Km = KDF(n)
+
+   where:
+
+      Km  is the required key material,
+
+      K   is the shared context key, and
+
+      n   is the required length of Km.
+
+   The following steps describe the KDF algorithm:
+
+      If length of K is greater than or equal to n, then
+
+         Let Km be the first n bytes of K;
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 22]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      Else
+
+         Let Km = PRNG(K, n);
+
+      return Km
+
+
+5.2 Confidentiality Protection
+
+   The plaintext data octet sequence p1 is encrypted using the chosen
+   confidentiality algorithm (CALG) with key size m, initialised for
+   encryption with the key material Kc obtained as follows:
+
+      Kc = KDF(m)
+
+      c1 = CALG(Kc, ENCRYPTION)( bytes(p1) )
+
+   On the receiving side, the ciphertext data octet sequence p1 is
+   decrypted using the chosen confidentiality algorithm (CALG)
+   initialised for decryption, with the key Kc obtained by a similar
+   process:
+
+      Kc = KDF(m)
+
+      c2 = CALG(Kc, DECRYPTION)( bytes(p1) )
+
+   The designated CALG symmetric-key block cipher MUST be used in OFB
+   (Output Feedback Block) mode in the ISO variant, as described in
+   [HAC], algorithm 7.20.
+
+   Let k be the block size of the chosen symmetric key block cipher
+   algorithm; e.g. for AES this is 128 bits or 16 octets. The OFB mode
+   used shall have a block size of k.
+
+   It is recommended that block ciphers operating in OFB mode be used
+   with an Initial Vector (the mode's IV).  In such a mode of operation
+   - OFB with key re-use - the IV need not be secret.  For the mechanism
+   described in this document, the server MUST use cIV received from the
+   client as the Initial Vector when initialising its encryption
+   context, and the client MUST use sIV received from the server as the
+   Initial Vector when initialising its encryption context.  These
+   Initial Vectors are generated as:
+
+      cIV = prng(k);
+
+      sIV = prng(k);
+
+   where:
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 23]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      prng() is a random number generation function that outputs k
+      octets of data,
+
+      k      is the block size of the chosen symmetric key block cipher
+      algorithm
+
+   The input data to the confidentiality protection algorithm shall be a
+   multiple of the symmetric key block cipher block size k.  When the
+   input length is not a multiple of k octets, the data shall be padded
+   according to the following scheme (described in [PKCS7] which itself
+   is based on [RFC-1423]):
+
+      Assuming the length of the input is l octets, (k - (l mod k))
+      octets, all having the value (k - (l mod k)), shall be appended to
+      the original data.  In other words, the input is padded at the
+      trailing end with one of the following sequences:
+
+
+
+                   01 -- if l mod k = k-1
+                  02 02 -- if l mod k = k-2
+                            ...
+                            ...
+                            ...
+                k k ... k k -- if l mod k = 0
+
+      The padding can be removed unambiguously since all input is padded
+      and no padding sequence is a suffix of another.  This padding
+      method is well-defined if and only if k < 256 octets, which is the
+      case with symmetric block ciphers today, and in the forseeable
+      future.
+
+   The output of this stage, when it is active, is:
+
+      at the sending side: CALG(Kc, ENCRYPT)( bytes(p1) )
+
+      at the receiving side: CALG(Kc, DECRYPT)( bytes(p1) )
+
+
+5.3 Replay Detection
+
+   A sequence number q is incremented every time a message is sent to
+   the peer.
+
+   The output of this stage, when it is active, is:
+
+      p2 | q
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 24]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   At the other end, the receiver increments its instance of the
+   sequence number.  This new value of the sequence number is then used
+   in the integrity protection transformation, which must also be active
+   as described in Section 4.3.  See Section 6.3 for more details.
+
+5.4 Integrity Protection
+
+   When the Integrity Protection stage is active, a message
+   authentication code C is computed using the chosen integrity
+   protection algorithm (IALG) as follows:
+
+   o  the IALG is initialised (once) with the key material Ki of size n
+      (the required key size of the chosen IALG); i.e. Ki = KDF(n),
+
+   o  the IALG is updated with every exchange of the sequence p3,
+      yielding the value C and a new IALG context for use in the
+      following exchange.
+
+   At the other end, the receiver computes its version of C, using the
+   same transformation, and checks that its value is equal to that
+   received. If the two values do not agree, the receiver MUST signal an
+   exception and abort.
+
+   The output of this stage, when it is active, is then:
+
+      IALG(Ki)( bytes(p3) )
+
+
+5.5 Summary of Security Layer Output
+
+   The following table shows the data exchanged by the security layer
+   peers, depending on the possible legal combinations of the three
+   security services in operation:
+
+      CP   IP   RD   Peer sends/receives
+
+      I    I    I    { eos(p) }
+      I    A    I    { eos(p) | os( IALG(Ki)( bytes(p) ) ) }
+      I    A    A    { eos(p) | os( IALG(Ki)( bytes(p) | bytes(q)) ) }
+      A    I    I    { eos(c) }
+      A    A    I    { eos(c) | os( IALG(Ki)( bytes(c) ) ) }
+      A    A    A    { eos(c) | os( IALG(Ki)((bytes(c) | bytes(q)) )}
+
+   where
+
+      CP    Confidentiality protection,
+
+      IP    Integrity protection,
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 25]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      RD    Replay detection,
+
+      I     Security service is Inactive/disabled,
+
+      A     Security service is Active/enabled,
+
+      p     The original plaintext,
+
+      q     The sequence number.
+
+      c     The enciphered input obtained by either:
+
+         CALG(Kc, ENCRYPT)( bytes(p) ) at the sender's side, or
+
+         CALG(Kc, DECRYPT)( bytes(p) ) at the receiver's side
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 26]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+6. Discussion
+
+6.1 Mandatory Algorithms
+
+   The algorithms specified as mandatory were chosen for utility and
+   availablity.  We felt that a mandatory confidentiality and integrity
+   protection algorithm for the security layer and a mandatory Message
+   Digest Algorithm for SRP calculations should be specified to ensure
+   interoperability between implementations of this mechanism:
+
+   o  The SHA-160 Message Digest Algorithm was chosen as an underlying
+      algorithm for SRP calculations because this allows for easy
+      interoperability with other SRP-based tools that use the SRP-SHA1
+      protocol described in section 3 of [RFC-2945] and create their
+      password files using this algorithm.
+
+   o  The HMAC algorithm was chosen as an integrity algorithm because it
+      is faster than MAC algorithms based on secret key encryption
+      algorithms [RFC-2847].
+
+   o  AES was chosen as a symmetric-key block cipher because it has
+      undergone thorough scrutiny by the best cryptographers in the
+      world.
+
+   Since confidentiality protection is optional, this mechanism should
+   be usable in countries that have strict controls on the use of
+   cryptography.
+
+6.2 Modulus and Generator Values
+
+   It is RECOMMENDED that the server use values for the modulus N and
+   generator g chosen from those listed in Appendix A so that the client
+   can avoid expensive constraint checks, since these predefined values
+   already meet the constraints described in [RFC-2945]:
+
+      "For maximum security, N should be a safe prime (i.e. a number of
+      the form N = 2q + 1, where q is also prime).  Also, g should be a
+      generator modulo N (see [SRP] for details), which means that for
+      any X where 0 < X < N, there exists a value x for which g**x == X
+      (mod N).
+
+   If other values are used for N and g then these values SHOULD undergo
+   the specified constraint checks.
+
+6.3 Replay Detection Sequence Number Counters
+
+   The mechanism described in this document allows the use of a Replay
+   Detection security service that works by including sequence number
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 27]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   counters in the message authentication code (MAC) created by the
+   Integrity Protection service.  As noted in Section 4.3 integrity
+   protection is always activated when the Replay Detection service is
+   activated.
+
+   Both the client and the server keep two sequence number counters.
+   Each of these counters is a 32-bit unsigned integer initialised with
+   a Starting Value and incremented by an Increment Value with every
+   successful transmission of a data buffer through the security layer.
+   The Sent counter is incremented for each buffer sent through the
+   security layer. The Received counter is incremented for each buffer
+   received through the security layer.  If the value of a sequence
+   number counter exceeds 2**32-1 it wraps around and starts from zero
+   again.
+
+   When a sender sends a buffer it includes the value of its Sent
+   counter in the computation of the MAC accompanying each integrity
+   protected message.  When a recipient receives a buffer it uses the
+   value of it's Received counter in its computation of the integrity
+   protection MAC for the received message.  The recipient's Received
+   counter must be the same as the sender's Sent counter in order for
+   the received and computed MACs to match.
+
+   This specification assumes that for each sequence number counter the
+   Starting Value is ZERO, and that the Increment Value is ONE.  These
+   values do not affect the security or the intended objective of the
+   replay detection service, since they never travel on the wire.
+
+6.4 Re-using the Parameters of a Previous Session
+
+   Re-using the parameters of a previous session enables the client and
+   server to avoid the overhead of the full authentication exchange
+   where the client and server communicate more than once during a
+   server-specified time period.
+
+   Servers are not required to support re-using the parameters of the
+   current session in future sessions.  If they do not wish to support
+   this then they send an empty string for the session identifier (sid).
+   However, if the server's policy allows for the parameters of the
+   current session to be re-used later, it generates a session
+   identifier (sid) that will uniquely identify the session within the
+   specified time period (ttl).  The time period (ttl) is specified in
+   seconds and only gives an indication to the client how long the
+   session  may be valid. The server is not required to ensure that the
+   session is valid for this time period. Note that a ttl of 0 indicates
+   an indeterminate time period.
+
+   To avoid session hijacking, servers SHOULD NOT indicate that a
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 28]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   session may be re-used unless a security layer with integrity
+   protection and/or confidentiality protection has been negotiated.
+
+   Clients are not required to support re-using the parameters of
+   previous sessions.  If they do not wish to support it or they do not
+   wish to re-use the parameters of a previous session then they send
+   the empty string as the value for the session identifier (sid) and
+   send a zero-length octet sequence for the nonce (cn).  If they do
+   support it and wish to use the parameters of a previous session then
+   they send the session identifier for this session that they
+   previously received from the server and calculate cn as described in
+   Section 4.1.
+
+   If a client specifies a session id (sid) for a session that the
+   server still considers valid then the server sends the octet FF, to
+   indicate to the client that parameters of a previous session are
+   being re-used, and the nonce (sn) calculated as described in Section
+   4.2.  The client and server then calculate the new shared context key
+   Kn for this session as follows:
+
+      Kn = H(K | cn | sn)
+
+   where:
+
+      K    is the shared context key for the previous session identified
+      by sid.
+
+      H()  is the result of digesting the designated input/data with the
+      Message Digest Algorithm function negotiated in the previous
+      session identified by sid.
+
+   Then, if the confidentiality and/or integrity protection services
+   were negotiated for the previous session, new keys for these services
+   are derived using the KDF for use in this session.  (See Section
+   5.1.2.)
+
+   If the server does not support re-using parameters of previous
+   sessions or no longer considers the specified previous session to be
+   valid, it ignores the session id specified by the client and
+   continues the full authentication exchange.  However, the first
+   element of the next buffer it sends is the octet 00, which indicates
+   to the client that no parameters of a previous session will be
+   re-used.
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 29]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+7. SASL
+
+7.1 Overview
+
+   SASL is described as follows [RFC-2222]:
+
+      The Simple Authentication and Security Layer (SASL) is a method
+      for adding authentication support to connection-based protocols.
+
+   This document describes a mechanism that can be used within the SASL
+   authentication framework.
+
+7.2 Mechanism Name
+
+   The SASL mechanism name associated with this protocol is "SRP".
+
+7.3 Security Layer
+
+   Section 3 of [RFC-2222] describes the operation of the security layer
+   as follows:
+
+      "The security layer takes effect immediately following the last
+      response of the authentication exchange for data sent by the
+      client and the completion indication for data sent by the server.
+      Once the security layer is in effect, the protocol stream is
+      processed by the security layer into buffers of cipher-text.  Each
+      buffer is transferred over the connection as a stream of octets
+      prepended with a four octet field in network byte order that
+      represents the length of the following buffer.  The length of the
+      cipher-text buffer must be no larger than the maximum size that
+      was defined or negotiated by the other side."
+
+
+7.4 Profile Considerations
+
+   As mentioned briefly in [RFC-2222], and detailed in [SASL] a SASL
+   specification has three layers: (a) a protocol definition using SASL
+   known as the "Profile", (b) a SASL mechanism definition, and (c) the
+   SASL framework.
+
+   Point (3) in section 5 of [SASL] ("Protocol profile requirements")
+   clearly states that it is the responsibility of the Profile to define
+   "...how the challenges and responses are encoded, how the server
+   indicates completion or failure of the exchange, how the client
+   aborts an exchange, and how the exchange method interacts with any
+   line length limits in the protocol."
+
+   The username entity, referenced as U throughout this document, and
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 30]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   used by the server to locate the password data, is assumed to travel
+   "in the clear," meaning that no transformation is applied to its
+   contents. This assumption was made to allow the same SRP password
+   files to be used in this mechanism, as those used with other SRP
+   applications and tools.
+
+   A Profile may decide, for privacy or other reason, to disallow such
+   information to travel in the clear, and instead use a hashed version
+   of U, or more generally a transformation function applied to U; i.e.
+   f(U).  Such a Profile would require additional tools to add the
+   required entries to the SRP password files for the new value(s) of
+   f(U).  It is worth noting too that if this is the case, and the same
+   user shall access the server through this mechanism as well as
+   through other SRP tools, then at least two entries, one with U and
+   the other with f(U) need to be present in the SRP password files if
+   those same files are to be used for both types of access.
+
+7.5 Example
+
+   The example below uses SMTP authentication [RFC-2554]. The base64
+   encoding of challenges and responses, as well as the reply codes
+   preceding the responses are part of the SMTP authentication
+   specification, not part of this SASL mechanism itself.
+
+   "C:" and "S:" indicate lines sent by the client and server
+   respectively.
+
+    S: 220 smtp.example.com ESMTP server ready
+
+    C: EHLO zaau.example.com
+
+    S: 250-smtp.example.com
+    S: 250 AUTH SRP CRAM-MD5 DIGEST-MD5
+
+    C: AUTH SRP AAAADAAEdGVzdAAEdGVzdA==
+
+     with:
+
+       U = "test"
+
+       I = "test"
+
+    S: 334 AAABygEArGvbQTJKmpvxZt5eE4lYL69ytmUZh+4H/DGSlD21YFCjcynLtKCZ
+    7YGT4HV3Z6E91SMSq0sDMQ3Nf0ip2gT9UOgIOWntt2ewz2CVF5oWOrNmGgX71fqq6Ck
+    YqZYvC5O4Vfl5k+yXXuqoDXQK2/T/dHNZ0EHVwz6nHSgeRGsUdzvKl7Q6I/uAFna9IH
+    pDbGSB8dK5B4cXRhpbnTLmiPh3SFRFI7UksNV9Xqd6J3XS7PoDLPvb9S+zeGFgJ5AE5
+    Xrmr4dOcwPOUymczAQce8MI2CpWmPOo0MOCca41+Onb+7aUtcgD2J965DXeI21SX1R1
+    m2XjcvzWjvIPpxEfnkr/cwABAgqsi3AvmIqdEbREALhtZGE9U0hBLTEsbWFuZGF0b3J
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 31]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+    5PXJlcGxheSBkZXRlY3Rpb24scmVwbGF5IGRldGVjdGlvbixpbnRlZ3JpdHk9aG1hYy
+    1zaGExLGludGVncml0eT1obWFjLW1kNSxjb25maWRlbnRpYWxpdHk9YWVzLGNvbmZpZ
+    GVudGlhbGl0eT1jYXN0NSxjb25maWRlbnRpYWxpdHk9Ymxvd2Zpc2gsbWF4YnVmZmVy
+    c2l6ZT0yMTQ3NDgzNjQz
+
+     with:
+
+       N = "21766174458617435773191008891802753781907668374255538511144
+       6432246898862353838409572109090130860564015713997172358072665816
+       4960647214841029141336415219736447718088739565548373811507267740
+       2235101762521901569820740293149529620419333266262073471054548368
+       7360395197024862265062488610602569718029849535611214426801576680
+       0076142998822245709041387397397017192709399211475176516806361476
+       1119615476233422096442783117971236371647333871414335895773474667
+       3089670508070055093204247996784170368679283167612722742303140675
+       4829113358247958306143957755934710196177140617368437852270348349
+       5337037655006751328447510550299250924469288819"
+
+       g = "2"
+
+       s = "814819216327401865851972"
+
+       L = "mda=sha-1,mandatory=replay_detection,replay_detection,integ
+       rity=hmac-sha1,integrity=hmac-md5,confidentiality=aes,confidenti
+       ality=cast5,confidentiality=blowfish,maxbuffersize=2147483643"
+
+    C: AAABYwEAAp5q/4zhXoTUzXBscozN97SWgfDcAImIk3lNHNvd0b+Dr7jEm6upXblZ
+    T5sL9mPgFsejlIh+B/eCu/HvzWCrXj6ylPZv8dy3LCH3LIORqQ45S7Lsbmrrg/dukDh
+    4tZCJMLD4r3evzaY8KVhtJeLMVbeXuh4JljKP42Ll59Lzwf8jfPh4+4Lae1rpWUCL9D
+    ueKcY+nN+xNHTit/ynLATxwL93P6+GoGY4TkUbUBfjiI1+rAMvyMDMw5XozGy07FOEc
+    ++U0iPeXCQP4MT5FipOUoz8CYX7J1LbaXp2WJuFHlkyVXF7oCoyHbhld/5CfR3o6q/B
+    /x9+yZRqaHH+JfllOgBfbWRhPVNIQS0xLHJlcGxheSBkZXRlY3Rpb24saW50ZWdyaXR
+    5PWhtYWMtbWQ1LGNvbmZpZGVudGlhbGl0eT1ibG93ZmlzaCxtYXhidWZmZXJzaXplPT
+    IxNDc0ODM2NDM=
+
+     with:
+
+       A = "33059541846712102497463123211304342021934496372587869281515
+       9695658237779884462777478850394977744553746930451895815615888405
+       0562780707370878253753979367019077142882237029766166623275718227
+       6555389834190840322081091599089081947324537907613924707058150037
+       7802790776231793962143786411792516760030102436603621046541729396
+       6890613394379900527412007068242559299422872893332111365840536495
+       1858834742328835373387573188369956379881606380890675411966073665
+       1106922002294035533470301541999274557200666703389531481794516625
+       4757418442215980634933876533189969562613241499465295849832999091
+       40398081321840949606581251320320995783959866"
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 32]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+       o = mda=sha-1,replay_detection,integrity=hmac-md5,confidentialit
+       y=blowfish,maxbuffersize=2147483643"
+
+    S: 334 AAABAgEAOUKbXpnzMhziivGgMwm+FS8sKGSvjh5M3D+80RF/5z9rm0oPoi4+
+    pF83fueWn4Hz9M+muF/22PHHZkHtlutDrtapj4OtirdxC21fS9bMtEh3F0whTX+3mPv
+    thw5sk11turandHiLvcUZOgcrAGIoDKcBPoGyBud+8bMgpkf/uGfyBM2nEX/hV+oGgg
+    X+LiHjmkxAJ3kewfQPH0eV9ffEuuyu8BUcBXkJsS6l7eWkuERSCttVOi/jS031c+CD/
+    nuecUXYiF8IYzW03rbcwYhZzifmTi3VK9C8zG2K1WmGU+cDKlZMkyCPMmtCsxlbgE8z
+    SHCuCiOgQ35XhcA0Qa0C3Q==
+
+     with:
+
+       B: "722842847565031844205403087285424428589273458129750231766015
+       4465607827529853239240118185263492617243523916106658696965596526
+       8585300845435562962039149169549800169184521786717633959469278439
+       8771344445002432579509292115598435685062882631760796416554562980
+       8475896198325835507901319556929511421472132184990365213059654962
+       7218189966140113906545856088040473723048909402258929560823932725
+       2022154114087913895411927676707073040281136096806681758265221209
+       8822374723416364340410020172215773934302794679034424699999611678
+       9730443114919539575466941344964841591072763617954717789621871251
+       71089179399349194452686682517183909017223901"
+
+    C: AAAAFRTkoju6xGP+zH89iaDWIFjfIKt5Kg==
+
+    S: 235 Authentication successful.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 33]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+8. GSS-API
+
+8.1 Overview
+
+   The GSS-API is described as follows:
+
+      The Generic Security Service Application Program Interface
+      (GSS-API), Version 2, as defined in [RFC-2078], provides security
+      services to callers in a generic fashion, supportable with a range
+      of underlying mechanisms and technologies and hence allowing
+      source-level portability of applications to different
+      environments.
+
+   According to [RFC-2078] there are certain specifications related to
+   the GSS-API that are:
+
+      "documents defining token formats, protocols, and procedures to be
+      implemented in order to realize GSS-API services atop particular
+      security mechanisms"
+
+   This specification is such a document - it defines a security
+   mechanism that can be used with the GSS-API authentication framework.
+
+8.2 Terminology
+
+   The tokens referred to in the GSS-API specification [RFC-2078] are
+   the same as the buffers referred to in this document.
+
+8.3 Initial Token
+
+   [RFC-2078] states that:
+
+      The first context-level token obtained from GSS_Init_sec_context()
+      is required to indicate at its very beginning a
+      globally-interpretable mechanism identifier, i.e., an Object
+      Identifier (OID) of the security mechanism.  The remaining part of
+      this token as well as the whole content of all other tokens are
+      specific to the particular underlying mechanism used to support
+      the GSS-API.
+
+   To satisfy this requirement and make use of the mechanism described
+   in this document as a GSS-API mechanism, the following octets must be
+   prefixed to the first buffer sent as part of the protocol described
+   in Section 4:
+
+      [ 60 08 06 06 2B 06 01 05 05 08 ]
+
+   Each octet is written as a pair of hex digits - see Section 2.
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 34]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   These octets represent the encoding of the GSS-API mechanism
+   identifier as per section 3.1 of [RFC-2078].  The OID for this
+   mechanism is iso.org.dod.internet.security.mechanisms.srp
+   (1.3.6.1.5.5.8).
+
+   Note that it is not possible to make this requirement part of the
+   security protocol itself, because other authentication frameworks
+   have different requirements for the initial octets in a mechanism
+   buffer.
+
+8.4 Security Layer
+
+   This mechanism does not provide distinct replay detection and
+   sequencing services as part of the security layer.  Both of these
+   services are provided through the use of sequence numbers in
+   integrity protected messages.  If a GSS-API caller sets either the
+   replay_det_req_flag or the sequence_req_flag (section 1.2.3 of
+   [RFC-2078]) then this selects the "replay_detection" security
+   service.
+
+   This mechanism does not make use of any channel binding data (section
+   1.1.6 of [RFC-2078]).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 35]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+9. EAP
+
+9.1 Overview
+
+   The Extensible Authentication Protocol (EAP) [RFC-2284] is an
+   authentication framework that supports multiple authentication
+   mechanisms.  It is used with link layer protocols such as PPP and the
+   IEEE-802 wired and wireless protocols.
+
+9.2 Terminology
+
+   EAP uses the following terms to describe the entities involved in the
+   authentication exchange [rfc2284bis]:
+
+   Authenticator: The entity that initiates EAP authentication in order
+      to authenticate a Peer.
+
+   Peer: The entity that responds to requests from the Authenticator.
+
+   In this document, the Server corresponds to the Authenticator and the
+   Client corresponds to the Peer.
+
+9.3 Method Details
+
+   The EAP authentication method described in this document has the
+   following properties:
+
+   Method Name: SRP
+
+   Method Type: 7
+
+   As described in section 2 of [rfc2284bis] the EAP authentication
+   exchange is initiated by the Authenticator sending a Request packet
+   to the peer with a Type field indicating the type of request.  The
+   Peer responds with a corresponding Reply packet, and the
+   Authenticator and Peer exchange additional corresponding Request and
+   Reply packets until the Authenticator deems that the authentication
+   exchange is successful and complete, whereafter the Authenticator
+   sends a Success packet.  However, if at any time the Authenticator
+   deems the authentication exchange to be unsuccessful it sends a
+   Failure packet to indicate this.
+
+   When using this authentication method, the Type field in all Request
+   and Reply packets is set to 7 and the Type Data is as described in
+   Section 4 and the rest of this document.  The diagrams below
+   illustrate the EAP packet exchanges for this authentication method.
+
+   The following exchange occurs when a new session is negotiated
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 36]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   between the client and the server.  It will also occur when the
+   client requests re-use of the parameters of a previous session and
+   either the server does not support such re-use or no longer considers
+   the previous session to be valid:
+
+    Peer (client)                            Authenticator (server)
+
+    <------------  Request [ 7, { } ]  ----------------------------
+
+    ----  Reply [ 7, { U, I, sid, cn } ] ------------------------->
+
+    <------------  Request [ 7, { 00, N, g, s, B, L } ]  ----------
+
+    ----  Reply [ 7, { A, M1, o, cIV } ]  ------------------------>
+
+    <------------  Request [ 7, { M2, sIV, sid, ttl } ]  ----------
+
+    ----  Reply [ 7, { } ]  -------------------------------------->
+
+   The following exchange occurs when the client requests that the
+   parameters negotiated in a previous session be re-used in this
+   session, but with a newly derived shared context key, and the server
+   agrees:
+
+    Peer (client)                            Authenticator (server)
+
+    <-----------------------------  Request [ 7, { } ]  -----------
+
+    ---------  Reply [ 7, { U, I, sid, cn } ]  ------------------->
+
+    <-----------------------------  Request [ 7, { FF, sn } ]  ----
+
+    ---------  Reply [ 7, { } ]  --------------------------------->
+
+   If a security layer is negotiated then the payloads of all subsequent
+   lower layer packets sent over the link are protected using the
+   negotiated security services.
+
+9.4 Security Claims
+
+   As required by section 7.2 of [rfc2284bis], these are the security
+   claims made by this authentication method indicating the level of
+   security provided:
+
+   Intended Use: Wired networks, including PPP, PPPOE, and IEEE-802
+      wired media.  Use over the Internet or with wireless media only
+      when the recommended security layer has been negotiated.
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 37]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   Mechanism: Passphrase
+
+   Mutual authentication: Yes.  This mechanism requires mutual
+      authentication.
+
+   Integrity protection: Yes.  The calculations of evidence that the
+      shared context key is known - M1 sent by the client and M2 sent by
+      the server - include the  protocol elements received from the
+      other party, so any modification by a third party will be
+      detected.  SRP itself is resistent to known active and passive
+      attacks - see [SRP].
+
+   Replay protection: Yes.  Both the client and the server randomly
+      generate ephemeral private keys (a and b) that are used in the SRP
+      calculations, but are not publicly revealed.  New ephemeral
+      private keys are generated for each session making replay attacks
+      infeasible.
+
+   Confidentiality: No.
+
+   Key Derivation: No.
+
+   Dictionary attack protection: Yes. From [SRP]: "An attacker with
+      neither the user's password nor the host's password file cannot
+      mount a dictionary attack on the password".
+
+   Fast reconnect: Yes.  An optional, optimised alternate authentication
+      exchange is available where the parameters of a previously
+      negotiated session are re-used, but with a newly derived shared
+      context key - see Section 6.4.
+
+   Man-in-the-Middle resistance: Yes.  The calculations of evidence - M1
+      sent by the client and M2 sent by the server - include the
+      protocol elements received from the other party, so any
+      modification by a third party will be detected.  SRP itself is
+      resistent to known active attacks, including man-in-the-middle
+      attacks - see [SRP].
+
+   Acknowledged result indications: Yes.  When the client receives M2
+      from the server it knows that the server has verified that the
+      evidence (M1) it presented to prove its knowledge of the shared
+      context key is correct, so it knows that it is authenticated to
+      the server. When the server receives the empty response from the
+      client at the end of the authentication exchange, it knows that
+      the client has verified that the evidence (M2) it presented to
+      prove its knowledge of the shared context key is correct, so it
+      knows that it is authenticated to the client.  Similarly for
+      session re-use where the client receives the server nonce (sn)
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 38]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+      from the server, and the server receives the final empty response
+      from the client.
+
+   Key hierarchy: N/A
+
+   Key strength: The shared context key (K) negotiated between the
+      client and server has a length of s, where "s" is the output
+      length of the chosen underlying Message Digest Algorithm used in
+      the SRP calculations (see "mda" option in Section 4.3).  For
+      example, the recommended Message Digest Algorithm SHA-160 has an
+      output length of 160 bits, so in this case the length of K would
+      be 160 bits.  Keys for the confidentiality and integrity
+      protection services are derived from K - see Section 5.1.2 - and
+      have sizes appropriate for the algorithms being used.  Note that
+      all Message Digest Algorithms used with this mechanism MUST have
+      an output of at least 16 bytes (see "mda" option in Section 4.3),
+      which means that the shared context key will always have a length
+      of at least 128 bits.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 39]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+10. Security Considerations
+
+   This mechanism relies on the security of SRP, which bases its
+   security on the difficulty of solving the Diffie-Hellman problem in
+   the multiplicative field modulo a large safe prime.  See section 4
+   "Security Considerations" of [RFC-2945], section 4 "Security
+   analysis" of [SRP], and [SRP-6i].
+
+   This mechanism also relies on the security of the HMAC algorithm and
+   the underlying hash function when integrity protection is used.
+   Section 6 "Security" of [RFC-2104] discusses these security issues in
+   detail.  Weaknesses found in MD5 do not impact HMAC-MD5 [DOBBERTIN].
+
+   U, I, A and o, sent from the client to the server, and N, g, s, B and
+   L, sent from the server to the client, could be modified by an
+   attacker before reaching the other party.  For this reason, these
+   values are included in the respective calculations of evidence (M1
+   and M2) to prove that each party knows the shared context key K.
+   This allows each party to verify that these values were received
+   unmodified.
+
+   The use of integrity protection is RECOMMENDED to detect message
+   tampering and to avoid session hijacking after authentication has
+   taken place.
+
+   Replay attacks may be avoided through the use of sequence numbers,
+   because sequence numbers make each integrity protected message
+   exchanged during a session different, and each session uses a
+   different key.
+
+   Research [KRAWCZYK] shows that the order and way of combining message
+   encryption (Confidentiality Protection) and message authentication
+   (Integrity Protection) are important.  This mechanism follows the EtA
+   (encrypt-then-authenticate) method and is "generically secure".
+
+   This mechanism uses a Pseudo-Random Number Generator (PRNG) for
+   generating some of its parameters.  Section 5.1.1 describes a
+   securely seeded, cryptographically strong PRNG implementation for
+   this purpose.
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 40]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+11. Acknowledgements
+
+   The following people provided valuable feedback in the preparation of
+   this document:
+
+      Stephen Farrell <stephen.farrell at baltimore.ie>
+
+      Sam Hartman <hartmans at mit.edu>
+
+      Timothy Martin <tmartin at andrew.cmu.edu>
+
+      Alexey Melnikov <mel at messagingdirect.com>
+
+      Ken Murchison <ken at oceana.com>
+
+      Magnus Nystrom <magnus at rsasecurity.com>
+
+      David Taylor <DavidTaylor at forge.com.au>
+
+      Thomas Wu <tom at arcot.com>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 41]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Normative References
+
+   [RFC-2078]
+              Linn, J., "Generic Security Service Application Program
+              Interface, Version 2", RFC 2078, January 1997, <http://
+              www.ietf.org/rfc/rfc2078.txt>.
+
+   [RFC-2104]
+              Krawczyk, H., "HMAC: Keyed-Hashing for Message
+              Authentication", RFC 2104, February 1997, <http://
+              www.ietf.org/rfc/rfc2104.txt>.
+
+   [RFC-2119]
+              Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 0014, RFC 2119, March 1997,
+              <http://www.ietf.org/rfc/rfc2119.txt>.
+
+   [RFC-2222]
+              Myers, J., "Simple Authentication and Security Layer
+              (SASL)", RFC 2222, October 1997, <http://www.ietf.org/rfc/
+              rfc2222.txt>.
+
+   [RFC-2284]
+              Blunk, L. and J. Vollbrecht, "PPP Extensible
+              Authentication Protocol (EAP)", RFC 2284, March 1998,
+              <http://www.ietf.org/rfc/rfc2284.txt>.
+
+   [rfc2284bis]
+              Blunk, L., Vollbrecht, J., Aboba, B., Carlson, J. and H.
+              Levkowetz, "Extensible Authentication Protocol (EAP), work
+              in progress", May 2003, <http://www.ietf.org/
+              internet-drafts/draft-ietf-eap-rfc2284bis-03.txt>.
+
+   [RFC-2945]
+              Wu, T., "The SRP Authentication and Key Exchange System",
+              RFC 2945, September 2000, <http://www.ietf.org/rfc/
+              rfc2945.txt>.
+
+   [RFC-3454]
+              Hoffman, P. and M. Blanchet, "Preparation of
+              Internationalized Strings ("stringprep")", RFC 3454,
+              December 2002, <http://www.ietf.org/rfc/rfc3454.txt>.
+
+   [SASL]     Myers, J., "Simple Authentication and Security Layer
+              (SASL)", April 2002, <http://www.ietf.org/internet-drafts/
+              draft-myers-saslrev-02.txt>.
+
+   [SASLprep]
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 42]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+              Zeilenga, K., "SASLprep: Stringprep profile for user names
+              and passwords, work in progress", May 2003, <http://
+              www.ietf.org/internet-drafts/
+              draft-ietf-sasl-saslprep-01.txt>.
+
+   [SRP]      Wu, T., "The Secure Remote Password Protocol, Proceedings
+              of the 1998 Internet Society Network and Distributed
+              System Security Symposium, San Diego, CA, Mar 1998, pp.
+              97-111", March 1998, <http://srp.stanford.edu/ndss.html>.
+
+   [SRP-6i]   Wu, T., "SRP-6: Improvements and Refinements to the Secure
+              Remote Password Protocol", October 2002, <http://
+              srp.stanford.edu/srp6.ps>.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 43]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Informative References
+
+   [AES]      National Institute of Standards and Technology, "Rijndael:
+              NIST's Selection for the AES", December 2000, <http://
+              csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf>.
+
+   [DOBBERTIN]
+              Dobbertin, H., "The Status of MD5 After a Recent Attack",
+              December 1996, <ftp://ftp.rsasecurity.com/pub/cryptobytes/
+              crypto2n2.pdf>.
+
+   [HAC]      Menezes, A., van Oorschot, P. and S. Vanstone, "Handbook
+              of Applied Cryptography", CRC Press, Inc., ISBN
+              0-8493-8523-7, 1997, <http://www.cacr.math.uwaterloo.ca/
+              hac/about/chap7.ps>.
+
+   [ISO-10646]
+              International Standards Organization, "International
+              Standard --Information technology-- Universal
+              Multiple-Octet Coded Character Set (UCS) -- Part 1
+              Architecture and Basic Multilingual Plane. UTF-8 is
+              described in Annex R, adopted but not yet published.
+              UTF-16 is described in Annex Q, adopted but not yet
+              published.", ISO/IEC 10646-1, 1993.
+
+   [KRAWCZYK]
+              Krawczyk, H., "The order of encryption and authentication
+              for protecting communications (Or: how secure is SSL?)",
+              June 2001, <http://eprint.iacr.org/2001/045/>.
+
+   [PKCS7]    RSA Data Security, Inc., "PKCS #7: Cryptographic Message
+              Syntax Standard", Version 1.5, November 1993, <ftp://
+              ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-7.asc>.
+
+   [RFC-1423]
+              Balenson, D., "Privacy Enhancement for Internet Electronic
+              Mail: Part III: Algorithms, Modes, and Identifiers", RFC
+              1423, February 1993, <http://www.ietf.org/rfc/
+              rfc1423.txt>.
+
+   [RFC-2279]
+              Yergeau, F., "UTF-8, a transformation format of Unicode
+              and ISO 10646", RFC 2279, January 1998, <http://
+              www.ietf.org/rfc/rfc2279.txt>.
+
+   [RFC-2440]
+              Callas, J., Donnerhacke, L., Finney, H. and R. Thayer,
+              "OpenPGP Message Format", RFC 2440, November 1998, <http:/
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 44]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+              /www.ietf.org/rfc/rfc2440.txt>.
+
+   [RFC-2554]
+              Myers, J., "SMTP Service Extension for Authentication",
+              RFC 2554, March 1999.
+
+   [RFC-2629]
+              Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
+              June 1999, <http://www.ietf.org/rfc/rfc2629.txt>.
+
+   [RFC-2847]
+              Eisler, M., "LIPKEY - A Low Infrastructure Public Key
+              Mechanism Using SPKM", RFC 2847, June 2000, <http://
+              www.ietf.org/rfc/rfc2847.txt>.
+
+   [SCAN]     Hopwood, D., "Standard Cryptographic Algorithm Naming",
+              June 2000, <http://www.eskimo.com/~weidai/scan-mirror/>.
+
+   [SRP-6]    Wu, T., "SRP Protocol Design", October 2002, <http://
+              srp.stanford.edu/design.html>.
+
+   [SRPimpl]  Wu, T., "SRP: The Open Source Password Authentication
+              Standard", March 1998, <http://srp.stanford.edu/srp/>.
+
+   [UMAC]     Black, J., Halevi, S., Krawczyk, H., Krovetz, T. and P.
+              Rogaway, "UMAC: Fast and Secure Message Authentication,
+              Advances in Cryptology - CRYPTO '99. Lecture Notes in
+              Computer Science, vol. 1666, Springer-Verlag, 1999, pp.
+              216-233", October 2000, <http://www.cs.ucdavis.edu/
+              ~rogaway/umac/umac_proc.pdf>.
+
+   [UNICODE]  The Unicode Consortium, "The Unicode Standard, Version
+              3.2.0, is defined by The Unicode Standard, Version 3.0, as
+              amended by the Unicode Standard Annex #27: Unicode 3.1 and
+              by the Unicode Standard Annex #28: Unicode 3.2.", March
+              2002, <http://www.unicode.org/reports/tr28/tr28-3.html>.
+
+   [UNICODE-KC]
+              Durst, D., "Unicode Standard Annex #15: Unicode
+              Normalization Forms.", March 2001, <http://
+              www.unicode.org/unicode/reports/tr15>.
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 45]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Authors' Addresses
+
+   Keith Burdis
+   Rhodes University
+   Computer Science Department
+   Grahamstown  6139
+   ZA
+
+   EMail: keith at rucus.ru.ac.za
+
+
+   Raif S. Naffah
+   Forge Research Pty. Limited
+   Suite 116, Bay 9
+   Locomotive Workshop,
+   Australian Technology Park
+   Cornwallis Street
+   Eveleigh, NSW  1430
+   AU
+
+   EMail: raif at forge.com.au
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 46]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Appendix A. Modulus and Generator Values
+
+   Modulus N and generator g values for various modulus lengths are
+   given below.  In each case the modulus is a large safe prime and the
+   generator is a primitve root of GF(n) [RFC-2945].  These values are
+   taken from software developed by Tom Wu and Eugene Jhong for the
+   Stanford SRP distribution [SRPimpl].
+
+      [264 bits]
+        Modulus (base 16) =
+          115B8B692E0E045692CF280B436735C77A5A9E8A9E7ED56C965F87DB5B2A2
+          ECE3
+        Generator = 2
+
+      [384 bits]
+        Modulus (base 16) =
+          8025363296FB943FCE54BE717E0E2958A02A9672EF561953B2BAA3BAACC3E
+          D5754EB764C7AB7184578C57D5949CCB41B
+        Generator = 2
+
+      [512 bits]
+        Modulus (base 16) =
+          D4C7F8A2B32C11B8FBA9581EC4BA4F1B04215642EF7355E37C0FC0443EF75
+          6EA2C6B8EEB755A1C723027663CAA265EF785B8FF6A9B35227A52D86633DB
+          DFCA43
+        Generator = 2
+
+      [640 bits]
+        Modulus (base 16) =
+          C94D67EB5B1A2346E8AB422FC6A0EDAEDA8C7F894C9EEEC42F9ED250FD7F0
+          046E5AF2CF73D6B2FA26BB08033DA4DE322E144E7A8E9B12A0E4637F6371F
+          34A2071C4B3836CBEEAB15034460FAA7ADF483
+        Generator = 2
+
+      [768 bits]
+        Modulus (base 16) =
+          B344C7C4F8C495031BB4E04FF8F84EE95008163940B9558276744D91F7CC9
+          F402653BE7147F00F576B93754BCDDF71B636F2099E6FFF90E79575F3D0DE
+          694AFF737D9BE9713CEF8D837ADA6380B1093E94B6A529A8C6C2BE33E0867
+          C60C3262B
+        Generator = 2
+
+      [1024 bits]
+        Modulus (base 16) =
+          EEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256
+          576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE48E495C1D60
+          89DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B297BCF1885C529F56
+          6660E57EC68EDBC3C05726CC02FD4CBF4976EAA9AFD5138FE8376435B9FC6
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 47]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+          1D2FC0EB06E3
+        Generator = 2
+
+      [1280 bits]
+        Modulus (base 16) =
+          D77946826E811914B39401D56A0A7843A8E7575D738C672A090AB1187D690
+          DC43872FC06A7B6A43F3B95BEAEC7DF04B9D242EBDC481111283216CE816E
+          004B786C5FCE856780D41837D95AD787A50BBE90BD3A9C98AC0F5FC0DE744
+          B1CDE1891690894BC1F65E00DE15B4B2AA6D87100C9ECC2527E45EB849DEB
+          14BB2049B163EA04187FD27C1BD9C7958CD40CE7067A9C024F9B7C5A0B4F5
+          003686161F0605B
+        Generator = 2
+
+      [1536 bits]
+        Modulus (base 16) =
+          9DEF3CAFB939277AB1F12A8617A47BBBDBA51DF499AC4C80BEEEA9614B19C
+          C4D5F4F5F556E27CBDE51C6A94BE4607A291558903BA0D0F84380B655BB9A
+          22E8DCDF028A7CEC67F0D08134B1C8B97989149B609E0BE3BAB63D4754838
+          1DBC5B1FC764E3F4B53DD9DA1158BFD3E2B9C8CF56EDF019539349627DB2F
+          D53D24B7C48665772E437D6C7F8CE442734AF7CCB7AE837C264AE3A9BEB87
+          F8A2FE9B8B5292E5A021FFF5E91479E8CE7A28C2442C6F315180F93499A23
+          4DCF76E3FED135F9BB
+        Generator = 2
+
+      [2048 bits]
+        Modulus (base 16) =
+          AC6BDB41324A9A9BF166DE5E1389582FAF72B6651987EE07FC3192943DB56
+          050A37329CBB4A099ED8193E0757767A13DD52312AB4B03310DCD7F48A9DA
+          04FD50E8083969EDB767B0CF6095179A163AB3661A05FBD5FAAAE82918A99
+          62F0B93B855F97993EC975EEAA80D740ADBF4FF747359D041D5C33EA71D28
+          1E446B14773BCA97B43A23FB801676BD207A436C6481F1D2B9078717461A5
+          B9D32E688F87748544523B524B0D57D5EA77A2775D2ECFA032CFBDBF52FB3
+          786160279004E57AE6AF874E7303CE53299CCC041C7BC308D82A5698F3A8D
+          0C38271AE35F8E9DBFBB694B5C803D89F7AE435DE236D525F54759B65E372
+          FCD68EF20FA7111F9E4AFF73
+        Generator = 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 48]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Appendix B. Changes since the previous draft
+
+   Removed specific references to SASL in the main document, instead
+   isolating them to their own section.
+
+   Added sections describing how the mechanism can be used with the
+   GSS-API and EAP authentication frameworks.
+
+   Adopted SRP-6 exchange for the base protocol.
+
+   Mandated the use of SASLprep profile for text based information.
+
+   Added an optional, optimised alternate authentication exchange where
+   the parameters of a previously negotiated session are re-used, but
+   with a newly derived shared context key.
+
+   TODO: Regenerate SASL example.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 49]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+Intellectual Property Statement
+
+   The IETF takes no position regarding the validity or scope of any
+   intellectual property or other rights that might be claimed to
+   pertain to the implementation or use of the technology described in
+   this document or the extent to which any license under such rights
+   might or might not be available; neither does it represent that it
+   has made any effort to identify any such rights. Information on the
+   IETF's procedures with respect to rights in standards-track and
+   standards-related documentation can be found in BCP-11. Copies of
+   claims of rights made available for publication and any assurances of
+   licenses to be made available, or the result of an attempt made to
+   obtain a general license or permission for the use of such
+   proprietary rights by implementors or users of this specification can
+   be obtained from the IETF Secretariat.
+
+   The IETF invites any interested party to bring to its attention any
+   copyrights, patents or patent applications, or other proprietary
+   rights which may cover technology that may be required to practice
+   this standard. Please address the information to the IETF Executive
+   Director.
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (2003). All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works. However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assignees.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 50]
+

+Internet-Draft        SRP Authentication Mechanism              May 2003
+
+
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Burdis & Naffah        Expires November 28, 2003               [Page 51]
+

+
diff --git a/doc/draft-ietf-sasl-anon-xx.txt b/doc/draft-ietf-sasl-anon-xx.txt
new file mode 100644
index 0000000..bcff00a
--- /dev/null
+++ b/doc/draft-ietf-sasl-anon-xx.txt
@@ -0,0 +1,507 @@
+
+
+
+
+
+
+INTERNET-DRAFT                           Editor: Kurt D. Zeilenga
+Intended Category: Standards Track            OpenLDAP Foundation
+Expires in six months                                30 June 2003
+Obsoletes: RFC 2245
+
+
+                       The Anonymous SASL Mechanism
+                      <draft-ietf-sasl-anon-02.txt>
+
+
+Status of Memo
+
+  This document is an Internet-Draft and is in full conformance with all
+  provisions of Section 10 of RFC2026.
+
+  This document is intended to be, after appropriate review and
+  revision, submitted to the RFC Editor as a Standards Track document.
+  Distribution of this memo is unlimited.  Technical discussion of this
+  document will take place on the IETF SASL mailing list
+  <ietf-sasl at imc.org>.  Please send editorial comments directly to the
+  document editor <Kurt at OpenLDAP.org>.
+
+  Internet-Drafts are working documents of the Internet Engineering Task
+  Force (IETF), its areas, and its working groups.  Note that other
+  groups may also distribute working documents as Internet-Drafts.
+  Internet-Drafts are draft documents valid for a maximum of six months
+  and may be updated, replaced, or obsoleted by other documents at any
+  time.  It is inappropriate to use Internet-Drafts as reference
+  material or to cite them other than as ``work in progress.''
+
+  The list of current Internet-Drafts can be accessed at
+  <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
+  Internet-Draft Shadow Directories can be accessed at
+  <http://www.ietf.org/shadow.html>.
+
+  Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+  Please see the Full Copyright section near the end of this document
+  for more information.
+
+
+Abstract
+
+  It is common practice on the Internet to permit anonymous access to
+  various services.  Traditionally, this has been done with a plain text
+  password mechanism using "anonymous" as the user name and optional
+  trace information, such as an email address, as the password.  As
+  plain text login commands are not permitted in new IETF protocols, a
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 1]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+  new way to provide anonymous login is needed within the context of the
+  Simple Authentication and Security Layer (SASL) framework.
+
+
+Conventions
+
+  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+  document are to be interpreted as described in [Keywords].
+
+
+1. Anonymous SASL mechanism
+
+  This document defines an anonymous mechanism for the Simple
+  Authentication and Security Layer ([SASL]) framework.  The name
+  associated with this mechanism is "ANONYMOUS".
+
+  This document replaces RFC 2245.  Changes since RFC 2245 are detailed
+  in Appendix A.
+
+  The mechanism consists of a single message from the client to the
+  server.  The client sends optional trace information in the form of a
+  string of [UTF-8] encoded [Unicode] characters prepared in accordance
+  with [StringPrep] and the "trace" stringprep profile defined in
+  Section 2 of this document.  The trace information, which has no
+  semantical value, should take one of three forms: an Internet email
+  address, an opaque string which does not contain the '@' (U+0040)
+  character and can be interpreted by the system administrator of the
+  client's domain, or nothing.  For privacy reasons, an Internet email
+  address or other information identifying the user should only be used
+  with permission from the user.
+
+  A server which permits anonymous access will announce support for the
+  ANONYMOUS mechanism, and allow anyone to log in using that mechanism,
+  usually with restricted access.
+
+  This mechanism does not provide a security layer.
+
+  A formal grammar for the client message using Augmented BNF [ABNF] is
+  provide below as a tool for understanding this technical
+  specification.
+
+      message     = [ email / token ]
+                       ;; MUST be prepared in accordance with Section 2
+
+      UTF1        = %x00-3F / %x41-7F ;; less '@' (U+0040)
+      UTF2        = %xC2-DF UTF0
+      UTF3        = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) /
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 2]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+                    %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
+      UTF4        = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) /
+                    %xF4 %x80-8F 2(UTF0)
+      UTF0        = %x80-BF
+
+      TCHAR       = UTF1 / UTF2 / UTF3 / UTF4
+                    ;; any UTF-8 encoded Unicode character
+                    ;; except '@' (U+0040)
+
+      email       = addr-spec
+                    ;; as defined in [IMAIL], except with no free
+                    ;; insertion of linear-white-space, and the
+                    ;; local-part MUST either be entirely enclosed in
+                    ;; quotes or entirely unquoted
+
+      token       = 1*255TCHAR
+
+  Note to implementors:
+      The <token> production is restricted to 255 UTF-8 encoded Unicode
+      characters.   As the encoding of a characters uses a sequence of 1
+      to 4 octets, a token may be long as 1020 octets.
+
+
+2. The "trace" profile of "Stringprep"
+
+  This section defines the "trace" profile of [StringPrep].  This
+  profile is designed for use with the SASL ANONYMOUS Mechanism.
+  Specifically, the client MUST prepare the <message> production in
+  accordance with this profile.
+
+  The character repertoire of this profile is Unicode 3.2 [Unicode].
+
+  No mapping is required by this profile.
+
+  No Unicode normalization is required by this profile.
+
+  The list of unassigned code points for this profile is that provided
+  in appendix A of [RFC 3454].  Unassigned code points are not
+  prohibited.
+
+  Characters from the following tables of [StringPrep] are prohibited:
+      - C.2.1 (ASCII control characters)
+      - C.2.2 (Non-ASCII control characters)
+      - C.3 (Private use characters)
+      - C.4 (Non-character code points)
+      - C.5 (Surrogate codes)
+      - C.6 (Inappropriate for plain text)
+      - C.8 (Change display properties are deprecated)
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 3]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+      - C.9 (Tagging characters)
+
+  No additional characters are prohibited.
+
+  This profile requires bidirectional character checking per Section 6
+  of [StringPrep].
+
+
+3. Example
+
+  Here is a sample ANONYMOUS login between an IMAP client and server.
+  In this example, "C:" and "S:" indicate lines sent by the client and
+  server respectively.  If such lines are wrapped without a new "C:" or
+  "S:" label, then the wrapping is for editorial clarity and is not part
+  of the command.
+
+  Note that this example uses the IMAP profile [IMAP4] of SASL.  The
+  base64 encoding of challenges and responses, as well as the "+ "
+  preceding the responses are part of the IMAP4 profile, not part of
+  SASL itself.  Newer profiles of SASL will include the client message
+  with the AUTHENTICATE command itself so the extra round trip below
+  (the server response with an empty "+ ") can be eliminated.
+
+  In this example, the user's opaque identification token is "sirhc".
+
+      S: * OK IMAP4 server ready
+      C: A001 CAPABILITY
+      S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=DIGEST-MD5 AUTH=ANONYMOUS
+      S: A001 OK done
+      C: A002 AUTHENTICATE ANONYMOUS
+      S: +
+      C: c2lyaGM=
+      S: A003 OK Welcome, trace information has been logged.
+
+
+4. Security Considerations
+
+  The ANONYMOUS mechanism grants access to information by anyone.  For
+  this reason it should be disabled by default so the administrator can
+  make an explicit decision to enable it.
+
+  If the anonymous user has any write privileges, a denial of service
+  attack is possible by filling up all available space.  This can be
+  prevented by disabling all write access by anonymous users.
+
+  If anonymous users have read and write access to the same area, the
+  server can be used as a communication mechanism to anonymously
+  exchange information.  Servers which accept anonymous submissions
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 4]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+  should implement the common "drop box" model which forbids anonymous
+  read access to the area where anonymous submissions are accepted.
+
+  If the anonymous user can run many expensive operations (e.g., an IMAP
+  SEARCH BODY command), this could enable a denial of service attack.
+  Servers are encouraged to reduce the priority of anonymous users or
+  limit their resource usage.
+
+  While servers may impose a limit on the number of anonymous users, it
+  is noted that such limits enable denial of service attacks and should
+  be used with caution.
+
+  The trace information is not authenticated so it can be falsified.
+  This can be used as an attempt to get someone else in trouble for
+  access to questionable information.  Administrators trying to trace
+  abuse need to realize this information may be falsified.
+
+  A client which uses the user's correct email address as trace
+  information without explicit permission may violate that user's
+  privacy.  Information about who accesses an anonymous archive on a
+  sensitive subject (e.g., sexual abuse) has strong privacy needs.
+  Clients should not send the email address without explicit permission
+  of the user and should offer the option of supplying no trace token --
+  thus only exposing the source IP address and time.  Anonymous proxy
+  servers could enhance this privacy, but would have to consider the
+  resulting potential denial of service attacks.
+
+  Anonymous connections are susceptible to man in the middle attacks
+  which view or alter the data transferred.  Clients and servers are
+  encouraged to support external integrity and encryption mechanisms.
+
+  Protocols which fail to require an explicit anonymous login are more
+  susceptible to break-ins given certain common implementation
+  techniques.  Specifically, Unix servers which offer user login may
+  initially start up as root and switch to the appropriate user id after
+  an explicit login command.  Normally such servers refuse all data
+  access commands prior to explicit login and may enter a restricted
+  security environment (e.g., the Unix chroot(2) function) for anonymous
+  users.  If anonymous access is not explicitly requested, the entire
+  data access machinery is exposed to external security attacks without
+  the chance for explicit protective measures.  Protocols which offer
+  restricted data access should not allow anonymous data access without
+  an explicit login step.
+
+  General [SASL] security considerations apply to this mechanism.
+
+  [StringPrep] security considerations as well as [Unicode] security
+  considerations discussed in [StringPrep] apply to this mechanism.
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 5]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+  [UTF-8] security considerations also apply.
+
+
+5. IANA Considerations
+
+  It is requested that the SASL Mechanism registry [IANA-SASL] entry for
+  the ANONYMOUS mechanism be updated to reflect that this document now
+  provides its technical specification.
+
+      To: iana at iana.org
+      Subject: Updated Registration of SASL mechanism ANONYMOUS
+
+      SASL mechanism name: ANONYMOUS
+      Security considerations: See RFC XXXX.
+      Published specification (optional, recommended): RFC XXXX
+      Person & email address to contact for further information:
+           Kurt Zeilenga <kurt at openldap.org>
+           Chris Neuman <chris.newman at innosoft.com>
+      Intended usage: COMMON
+      Author/Change controller: IESG <iesg at ietf.org>
+      Note: Updates existing entry for ANONYMOUS
+
+
+  It is requested that the [Stringprep] profile "trace", first defined
+  in this RFC, be registered:
+
+      To: iana at iana.org
+      Subject: Initial Registration of Stringprep "trace" profile
+
+      Stringprep profile: trace
+      Published specification: RFC XXXX
+      Person & email address to contact for further information:
+          Kurt Zeilenga <kurt at openldap.org>
+
+
+6. Acknowledgment
+
+  This document is a revision of RFC 2245 by Chris Newman.  Portions of
+  the grammar defined in Section 1 were borrowed from [UTF-8] by
+  Francois Yergeau.
+
+  This document is a product of the IETF SASL WG.
+
+
+7. Normative References
+
+  [ABNF]        Crocker, D. and P. Overell, "Augmented BNF for Syntax
+                Specifications: ABNF", RFC 2234, November 1997.
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 6]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+  [IMAIL]       Crocker, D., "Standard for the Format of Arpa Internet
+                Text Messages", STD 11, RFC 822, August 1982.
+
+  [Keywords]    Bradner, S., "Key words for use in RFCs to Indicate
+                Requirement Levels", BCP 14, RFC 2119, March 1997
+
+  [SASL]        Myers, J., "Simple Authentication and Security Layer
+                (SASL)", draft-myers-saslrev-xx.txt, a work in progress.
+
+  [StringPrep]  Hoffman P. and M. Blanchet, "Preparation of
+                Internationalized Strings ('stringprep')", RFC 3454,
+                December 2002.
+
+  [Unicode]     The Unicode Consortium, "The Unicode Standard, Version
+                3.2.0" is defined by "The Unicode Standard, Version 3.0"
+                (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
+                as amended by the "Unicode Standard Annex #27: Unicode
+                3.1" (http://www.unicode.org/reports/tr27/) and by the
+                "Unicode Standard Annex #28: Unicode 3.2"
+                (http://www.unicode.org/reports/tr28/).
+
+                [UTF-8]       Yergeau, F., "UTF-8, a transformation
+                format of ISO 10646", draft-yergeau-rfc2279bis, a work
+                in progress.
+
+
+8. Informative References
+
+  [IMAP4]       Crispin, M., "Internet Message Access Protocol - Version
+                4rev1", RFC 2060, December 1996.
+
+  [IANA-SASL]   IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
+                MECHANISMS", http://www.iana.org/assignments/sasl-
+                mechanisms.
+
+
+9. Editor's Address
+
+  Kurt Zeilenga
+  OpenLDAP Foundation
+
+  Email: kurt at OpenLDAP.org
+
+
+Appendix A.  Changes since RFC 2245
+
+  This appendix is non-normative.
+
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 7]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+  RFC 2245 allows the client to send optional trace information in the
+  form of a human readable string.  RFC 2245 restricted this string to
+  US-ASCII.  As the Internet is international, this document uses a
+  string restricted to UTF-8 encoded Unicode characters.  A "stringprep"
+  profile is defined to precisely define which Unicode characters are
+  allowed in this string.  While the string remains restricted to 255
+  characters, the encoded length of each character may now range from 1
+  to 4 octets.
+
+  Additionally, a number of editorial changes were made.
+
+
+
+Intellectual Property Rights
+
+  The IETF takes no position regarding the validity or scope of any
+  intellectual property or other rights that might be claimed to pertain
+  to the implementation or use of the technology described in this
+  document or the extent to which any license under such rights might or
+  might not be available; neither does it represent that it has made any
+  effort to identify any such rights.  Information on the IETF's
+  procedures with respect to rights in standards-track and
+  standards-related documentation can be found in BCP-11.  Copies of
+  claims of rights made available for publication and any assurances of
+  licenses to be made available, or the result of an attempt made to
+  obtain a general license or permission for the use of such proprietary
+  rights by implementors or users of this specification can be obtained
+  from the IETF Secretariat.
+
+  The IETF invites any interested party to bring to its attention any
+  copyrights, patents or patent applications, or other proprietary
+  rights which may cover technology that may be required to practice
+  this standard.  Please address the information to the IETF Executive
+  Director.
+
+
+
+Full Copyright
+
+  Copyright (C) The Internet Society (2003). All Rights Reserved.
+
+  This document and translations of it may be copied and furnished to
+  others, and derivative works that comment on or otherwise explain it
+  or assist in its implmentation may be prepared, copied, published and
+  distributed, in whole or in part, without restriction of any kind,
+  provided that the above copyright notice and this paragraph are
+  included on all such copies and derivative works.  However, this
+  document itself may not be modified in any way, such as by removing
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 8]
+

+INTERNET-DRAFT         draft-ietf-sasl-anon-02.txt          30 June 2003
+
+
+  the copyright notice or references to the Internet Society or other
+  Internet organizations, except as needed for the  purpose of
+  developing Internet standards in which case the procedures for
+  copyrights defined in the Internet Standards process must be followed,
+  or as required to translate it into languages other than English.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Zeilenga                Anonymous SASL Mechanism                [Page 9]
+

diff --git a/doc/draft-ietf-sasl-crammd5-xx.txt b/doc/draft-ietf-sasl-crammd5-xx.txt
new file mode 100644
index 0000000..85bda72
--- /dev/null
+++ b/doc/draft-ietf-sasl-crammd5-xx.txt
@@ -0,0 +1,434 @@
+
+
+Network Working Group                               L. Nerenberg, Editor
+Internet Draft: The CRAM-MD5 SASL Mechanism              Orthanc Systems
+Document: draft-ietf-sasl-crammd5-01.txt                   November 2003
+
+
+
+                      The CRAM-MD5 SASL Mechanism
+
+
+Status of this Memo
+
+     This document is an Internet Draft and is in full conformance with
+     all provisions of Section 10 of RFC 2026.
+
+     Internet Drafts are working documents of the Internet Engineering
+     Task Force (IETF), its areas, and its working groups.  Note that
+     other groups may also distribute working documents as Internet
+     Drafts.
+
+     Internet Drafts are draft documents valid for a maximum of six
+     months and may be updated, replaced, or obsoleted by other docu-
+     ments at any time.  It is inappropriate to use Internet Drafts as
+     reference material or to cite them other than as "work in
+     progress."
+
+     The list of current Internet Drafts can be accessed at
+     http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet
+     Draft Shadow Directories can be accessed at
+     http://www.ietf.org/shadow.html.
+
+     Copyright 2003, The Internet Society.  All Rights Reserved.
+
+     Please see the Copyright section near the end of this document for
+     more information.
+
+Abstract
+
+     This document defines a simple challenge-response authentication
+     mechanism, using a keyed-hash digest, for use with the Simple
+     Authentication and Security Layer (SASL).
+
+1.  Conventions Used in this Document
+
+     The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+     in this document are to be interpreted as defined in [KEYWORD].
+
+
+2.  CRAM-MD5 Authentication Mechanism
+
+     This document defines a simple challenge-response [SASL] authenti-
+     cation mechanism, using a [KEYED-MD5] digest, for use with [SASL].
+     The mechanism name associated with CRAM-MD5 is 'CRAM-MD5'.
+
+     This mechanism does not provide a security layer.
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 1]
+

+Internet Draft           CRAM-MD5 SASL Mechanism           November 2003
+
+
+     The data encoded in the challenge contains a presumptively arbi-
+     trary string of random digits, a time-stamp, and the fully-quali-
+     fied primary host name of the server.
+
+     The client makes note of the data and then responds with a string
+     consisting of the user name, a space, and a "digest."  The latter
+     is computed by applying the keyed MD5 algorithm from [KEYED-MD5]
+     where the key is a shared secret and the digested text is the chal-
+     lenge (including angle-brackets). The client MUST NOT interpret or
+     attempt to validate the contents of the challenge in any way.
+
+     This shared secret is a string known only to the client and server.
+     The "digest" parameter itself is a 16-octet value which is sent in
+     hexadecimal format, using lower-case US-ASCII characters.
+
+     When the server receives this client response, it verifies the
+     digest provided.  Since the user name may contain the space charac-
+     ter, the server MUST scan the client response from right to left;
+     the first space character encountered separates the digest from the
+     user name.  If the digest is correct, the server should consider
+     the client authenticated and respond appropriately.
+
+     The client MUST prepare the user name and shared secret strings
+     using the [SASLPrep] profile of the [StringPrep] algorithm.  The
+     resulting values MUST be encoded as UTF-8 [UTF8].
+
+
+2.1.  Formal Syntax
+
+     The following syntax specification uses the augmented Backus-Naur
+     Form (ABNF) as specified in [ABNF], and incorporates by reference
+     the Core Rules defined in that document.
+
+     challenge  = "<" 1*DIGIT "." 1*DIGIT "@" hostname ">"
+
+     digest     = 32(DIGIT / %x61-66)
+                  ; A hexadecimal string using only lower-case
+                  ; letters
+
+     hostname   = 1*(ALPHA / DIGIT) *("." / "-" / ALPHA / DIGIT)
+
+     response   = user SP digest
+
+     user       = 1*OCTET
+
+
+2.2.  Examples
+
+     The examples in this section do NOT form part of the specification.
+     Where conflicts exist between the examples and the formal grammar
+     or specification text, the latter are authoritative.
+
+     These examples show the use of the CRAM-MD5 mechanism with the
+     IMAP4 AUTHENTICATE command [IMAP4].  The base64 encoding of the
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 2]
+

+Internet Draft           CRAM-MD5 SASL Mechanism           November 2003
+
+
+     challenges and responses is part of the IMAP4 AUTHENTICATE command,
+     not part of the CRAM-MD5 specification itself.
+
+     S: * OK [CAPABILITY IMAP4rev1 STARTTLS LOGINDISABLED AUTH=CRAM-MD5]
+     C: A0001 AUTHENTICATE CRAM-MD5
+     S: + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
+     C: dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
+     S: A0001 OK CRAM-MD5 authentication successful
+
+     In this example, the shared secret is the string
+
+          tanstaaftanstaaf
+
+     Hence, the Keyed MD5 digest is produced by calculating
+
+          MD5((tanstaaftanstaaf XOR opad),
+               MD5((tanstaaftanstaaf XOR ipad),
+               <1896.697170952 at postoffice.example.net>))
+
+     where ipad and opad are as defined in [KEYED-MD5] and the string
+     shown in the challenge is the base64 encoding of
+     <1896.697170952 at postoffice.reston.mci.net>. The shared secret is
+     null-padded to a length of 64 bytes. If the shared secret is longer
+     than 64 bytes, the MD5 digest of the shared secret is used as a 16
+     byte input to the keyed MD5 calculation.
+
+     This produces a digest value (in hexadecimal) of
+
+          b913a602c7eda7a495b4e6e7334d3890
+
+     The user name is then prepended to it, forming
+
+          tim b913a602c7eda7a495b4e6e7334d3890
+
+     Which is then base64 encoded to meet the requirements of the IMAP4
+     AUTHENTICATE command (or the similar POP3 AUTH command), yielding
+
+          dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
+
+
+
+3.  References
+
+3.1.  Normative References
+
+[ABNF]
+     Crocker, D., P. Overell, "Augmented BNF for Syntax Specifications:
+     ABNF", RFC2234, Internet Mail Consortium and Demon Internet Ltd.,
+     November 1997.
+
+[KEYED-MD5]
+     Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message
+     Authentication", RFC 2104, IBM and UCSD, February 1997.
+
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 3]
+

+Internet Draft           CRAM-MD5 SASL Mechanism           November 2003
+
+
+[KEYWORD]
+     Bradner, S., "Key words for use in RFCs to Indicate Requirement
+     Levels", BCP 14, RFC2119, Harvard University, March 1997.
+
+[MD5]
+     Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321, MIT Labo-
+     ratory for Computer Science and RSA Data Security, Inc., April
+     1992.
+
+[SASL]
+     Myers, J., "Simple Authentication and Security Layer (SASL)," RFC
+     2222, Netscape Communications, October 1997.
+
+[SASLPrep]
+     Zeilenga, K., "SASL String Preparation Profiles", draft-ietf-sasl-
+     saslprep (work in progress)
+
+[StringPrep]
+     Hoffman, P., M. Blanchet, "Preparation of Internationalized Strings
+     (stringprep)", RFC 3454, IMC and Viagenie, December 2002.
+
+[UTF8]
+     Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
+     2279, Alis Technologies, January 1998.
+
+3.2.  Informative References
+
+[IMAP4]
+     Crispin, M., "Internet Message Access Protocol - Version 4rev1,"
+     RFC 3501, University of Washington, March 2003.
+
+
+4.  Security Considerations
+
+     It is conjectured that use of the CRAM-MD5 authentication mechanism
+     provides replay protection for a session.
+
+     This mechanism does not obscure the user name in any way.  Accord-
+     ingly, a server that implements both a clear-text password command
+     and this authentication type should not allow both methods of
+     access for a given user name.
+
+     Keyed MD5 is chosen for this application because of the greater
+     security imparted to authentication of short messages. In addition,
+     the use of the techniques described in [KEYED-MD5] for pre-computa-
+     tion of intermediate results make it possible to avoid explicit
+     clear-text storage of the shared secret on the server system by
+     instead storing the intermediate results which are known as "con-
+     texts."  While the saving, on the server, of the MD5 "context" is
+     marginally better than saving the shared secrets in clear-text, it
+     is not sufficient to protect the secrets if the server itself is
+     compromised.  Consequently, servers that store the secrets or con-
+     texts must both be protected to a level appropriate to the poten-
+     tial information value in the data and services protected by this
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 4]
+

+Internet Draft           CRAM-MD5 SASL Mechanism           November 2003
+
+
+     mechanism.  In other words, techniques like this one involve a
+     trade-off between vulnerability to network sniffing and I/O buffer
+     snooping and vulnerability of the server host's databases.  If one
+     believes that the host and its databases are subject to compromise,
+     and the network is not, this technique (and all others like it) is
+     unattractive.  It is perhaps even less attractive than clear-text
+     passwords, which are typically stored on hosts in one-way hash
+     form.  On the other hand, if the server databases are perceived as
+     reasonably secure, and one is concerned about client-side or net-
+     work interception of the passwords (secrets), then this (and simi-
+     lar) techniques are preferable to clear-text passwords by a wide
+     margin.
+
+     As the length of the shared secret increases, so does the diffi-
+     culty of deriving it.
+
+     While there are now suggestions in the literature that the use of
+     MD5 and keyed MD5 in authentication procedures probably has a lim-
+     ited effective lifetime, the technique is now widely deployed and
+     widely understood.  It is believed that this general understanding
+     may assist with the rapid replacement, by CRAM-MD5, of the current
+     uses of permanent clear-text passwords in many protocols.  This
+     document has been deliberately written to permit easy upgrading to
+     use SHA (or whatever alternatives emerge) when they are considered
+     to be widely available and adequately safe.
+
+     Even with the use of CRAM-MD5, users are still vulnerable to active
+     attacks.  An example of an increasingly common active attack is
+     'TCP Session Hijacking' as described in CERT Advisory CA-95:01.
+
+     CRAM-MD5 does not authenticate the server and does not include a
+     client-supplied nonce.  As a result, it is possible to construct a
+     server with a fixed challenge string that has pre-computed the
+     hashes for all possible passwords up to a certain length (or from a
+     dictionary).  Such a server could then immediately determine the
+     user's password if it is sufficiently short.
+
+
+5.  IANA Considerations
+
+     The SASL Mechanism Registry entry for CRAM-MD5 must be updated to
+     reference this specification.
+
+
+6.  Contributors
+
+     The CRAM-MD5 mechanism was originally specified in RFC 2095,
+     IMAP/POP AUTHorize Extension for Simple Challenge/Response.  The
+     authors of that document -- John C. Klensin, Paul Krumviede, and
+     Randy Catoe -- are to be credited with the design and specification
+     of CRAM-MD5. This memo serves only to re-state CRAM-MD5 within the
+     formal context of SASL, which specification it preceded by several
+     months.
+
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 5]
+

+Internet Draft           CRAM-MD5 SASL Mechanism           November 2003
+
+
+7.  Intellectual Property
+
+     The IETF takes no position regarding the validity or scope of any
+     intellectual property or other rights that might be claimed to per-
+     tain to the implementation or use of the technology described in
+     this document or the extent to which any license under such rights
+     might or might not be available; neither does it represent that it
+     has made any effort to identify any such rights.  Information on
+     the IETF's procedures with respect to rights in standards-track and
+     standards-related documentation can be found in BCP-11.  Copies of
+     claims of rights made available for publication and any assurances
+     of licenses to be made available, or the result of an attempt made
+     to obtain a general license or permission for the use of such pro-
+     prietary rights by implementers or users of this specification can
+     be obtained from the IETF Secretariat.
+
+     The IETF invites any interested party to bring to its attention any
+     copyrights, patents or patent applications, or other proprietary
+     rights which may cover technology that may be required to practice
+     this standard.  Please address the information to the IETF Execu-
+     tive Director.
+
+
+8.  Editors' Address
+
+     Lyndon Nerenberg
+     Orthanc Systems
+     1606 - 10770 Winterburn Road
+     Edmonton, Alberta
+     Canada T5S 1T6
+     Email: lyndon+rfc-crammd5 at orthanc.ca
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 6]
+

+Internet Draft           CRAM-MD5 SASL Mechanism           November 2003
+
+
+9.  Full Copyright Statement
+
+     Copyright 2003, The Internet Society. All Rights Reserved.
+
+     This document and translations of it may be copied and furnished to
+     others, and derivative works that comment on or otherwise explain
+     it or assist in its implementation may be prepared, copied, pub-
+     lished and distributed, in whole or in part, without restriction of
+     any kind, provided that the above copyright notice and this para-
+     graph are included on all such copies and derivative works.  How-
+     ever, this document itself may not be modified in any way, such as
+     by removing the copyright notice or references to the Internet
+     Society or other Internet organizations, except as needed for the
+     purpose of developing Internet standards in which case the proce-
+     dures for copyrights defined in the Internet Standards process must
+     be followed, or as required to translate it into languages other
+     than English.  The limited permissions granted above are perpetual
+     and will not be revoked by the Internet Society or its successors
+     or assigns.
+
+     This document and the information contained herein is provided on
+     an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGI-
+     NEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
+     INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
+     INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WAR-
+     RANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nerenberg            draft-ietf-sasl-crammd5-01.txt             [Page 7]
+

+
diff --git a/doc/draft-ietf-sasl-gssapi-xx.txt b/doc/draft-ietf-sasl-gssapi-xx.txt
new file mode 100644
index 0000000..bc37a49
--- /dev/null
+++ b/doc/draft-ietf-sasl-gssapi-xx.txt
@@ -0,0 +1,841 @@
+
+
+SASL Working Group                                           A. Melnikov
+Internet-Draft                                                     Isode
+Expires: May 22, 2004                                  November 22, 2003
+
+
+                         SASL GSSAPI mechanisms
+                       draft-ietf-sasl-gssapi-00
+
+Status of this Memo
+
+   This document is an Internet-Draft and is in full conformance with
+   all provisions of Section 10 of RFC2026.
+
+   Internet-Drafts are working documents of the Internet Engineering
+   Task Force (IETF), its areas, and its working groups.  Note that
+   other groups may also distribute working documents as Internet-
+   Drafts.
+
+   Internet-Drafts are draft documents valid for a maximum of six months
+   and may be updated, replaced, or obsoleted by other documents at any
+   time.  It is inappropriate to use Internet-Drafts as reference
+   material or to cite them other than as "work in progress."
+
+   The list of current Internet-Drafts can be accessed at http://
+   www.ietf.org/ietf/1id-abstracts.txt.
+
+   The list of Internet-Draft Shadow Directories can be accessed at
+   http://www.ietf.org/shadow.html.
+
+   This Internet-Draft will expire on May 22, 2004.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+Abstract
+
+   The Simple Authentication and Security Layer [SASL] is a method for
+   adding authentication support to connection-based protocols.  This
+   document describes the method for using the Generic Security Service
+   Application Program Interface [GSSAPI] in the Simple Authentication
+   and Security Layer [SASL].
+
+   This document replaces section 7.2 of RFC 2222 [SASL], the definition
+   of the "GSSAPI" SASL mechanism.
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 1]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+Table of Contents
+
+   1.  Conventions Used in this Document  . . . . . . . . . . . . . .  3
+   2.  Introduction and Overview  . . . . . . . . . . . . . . . . . .  4
+   2.1 Example  . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
+   3.  SPNEGO . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
+   4.  Specification common to all GSSAPI mechanisms  . . . . . . . .  6
+   4.1 Client side of authentication protocol exchange  . . . . . . .  6
+   4.2 Server side of authentication protocol exchange  . . . . . . .  7
+   4.3 Security layer . . . . . . . . . . . . . . . . . . . . . . . .  8
+   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  9
+   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 11
+   7.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
+       Normative References . . . . . . . . . . . . . . . . . . . . . 13
+       Informative References . . . . . . . . . . . . . . . . . . . . 14
+       Author's Address . . . . . . . . . . . . . . . . . . . . . . . 14
+       Full Copyright Statement . . . . . . . . . . . . . . . . . . . 15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 2]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+1. Conventions Used in this Document
+
+   The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+   in this document are to be interpreted as defined in "Key words for
+   use in RFCs to Indicate Requirement Levels" [KEYWORDS].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 3]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+2. Introduction and Overview
+
+   Each and every GSSAPI mechanism used within SASL is implicitly
+   registered by this specification.
+
+   For backwards compatibility with existing implementations of Kerberos
+   V5 and SPNEGO under SASL, the SASL mechanism name for the Kerberos V5
+   GSSAPI mechanism [KRB5GSS] is "GSSAPI" and the SASL mechanism for the
+   SPNEGO GSSAPI mechanism [SPNEGO] is "GSS-SPNEGO".  The SASL mechanism
+   name for any other GSSAPI mechanism is the concatenation of "GSS-"
+   and the Base32 [BASE-ENCODING] encoding of the first ten bytes of the
+   MD5 hash [MD5] of the ASN.1 DER encoding [ASN1] of the GSSAPI
+   mechanism's OID.  The Base32 rules on padding characters and
+   characters outside of the base32 alphabet are not relevant to this
+   use of Base32.
+
+   SASL mechanism names starting with "GSS-" are reserved for SASL
+   mechanisms which conform to this document.
+
+   The specification of all SASL mechanisms conforming to this document
+   is in the "Specification common to all GSSAPI mechanisms" section of
+   this document.
+
+   The IESG is considered to be the owner of all SASL mechanisms which
+   conform to this document.  This does NOT necessarily imply that the
+   IESG is considered to be the owner of the underlying GSSAPI
+   mechanism.
+
+2.1 Example
+
+   The OID for the SPKM-1 mechanism [SPKM1] is 1.3.6.1.5.5.1.  The ASN.1
+   DER encoding of this OID is 06 06 2b 06 01 05 05 01.  The MD5 hash of
+   the ASN.1 DER encoding is 57 ee 81 82 4e ac 4d b0 e6 50 9f 60 1f 46
+   8a 30.  The Base32 encoding of the first ten bytes of this is
+   "K7XIDASOVRG3BZSQ".  Thus the SASL mechanism name for the SPKM-1
+   GSSAPI mechanism is "GSS-K7XIDASOVRG3BZSQ".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 4]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+3. SPNEGO
+
+   Use of the Simple and Protected GSS-API Negotiation Mechanism
+   [SPNEGO] underneath SASL introduces subtle interoperability problems
+   and security considerations.  To address these, this section places
+   additional requirements on implementations which support SPNEGO
+   underneath SASL.
+
+   A client which supports, for example, the Kerberos V5 GSSAPI
+   mechanism only underneath SPNEGO underneath the "GSS-SPNEGO" SASL
+   mechanism will not interoperate with a server which supports the
+   Kerberos V5 GSSAPI mechanism only underneath the "GSSAPI" SASL
+   mechanism.
+
+   Since SASL is capable of negotiating amongst GSSAPI mechanisms, the
+   only reason for a server or client to support the "GSS-SPNEGO"
+   mechanism is to allow a policy of only using mechanisms below a
+   certain strength if those mechanism's negotiation is protected.  In
+   such a case, a client or server would only want to negotiate those
+   weaker mechanisms through SPNEGO.  In any case, there is no down-
+   negotiation security consideration with using the strongest mechanism
+   and set of options the implementation supports, so for
+   interoperability that mechanism and set of options MUST be negotiable
+   without using the "GSS-SPNEGO" mechanism.
+
+   If a client's policy is to first prefer GSSAPI mechanism X, then non-
+   GSSAPI mechanism Y, then GSSAPI mechanism Z, and if a server supports
+   mechanisms Y and Z but not X, then if the client attempts to
+   negotiate mechanism X by using the "GSS-SPNEGO" SASL mechanism, it
+   may end up using mechanism Z when it should have used mechanism Y.
+   For this reason, implementations MUST exclude from SPNEGO those
+   GSSAPI mechanisms which are weaker than the strongest non-GSSAPI SASL
+   mechanism advertised by the server.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 5]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+4. Specification common to all GSSAPI mechanisms
+
+   Each SASL mechanism which uses a GSSAPI mechanism uses the following
+   specification.
+
+   The implementation MAY set any GSSAPI flags or arguments not
+   mentioned in this specification as is necessary for the
+   implementation to enforce its security policy.
+
+4.1 Client side of authentication protocol exchange
+
+   The client calls GSS_Init_sec_context, passing in
+   input_context_handle of 0 (initially), mech_type of the GSSAPI
+   mechanism for which this SASL mechanism is registered, chan_binding
+   of NULL, and targ_name equal to output_name from GSS_Import_Name
+   called with input_name_type of GSS_C_NT_HOSTBASED_SERVICE and
+   input_name_string of "service at hostname" where "service" is the
+   service name specified in the protocol's profile, and "hostname" is
+   the fully qualified host name of the server.  If the client will be
+   requesting a security layer, it MUST also supply to the
+   GSS_Init_sec_context a mutual_req_flag of TRUE, a sequence_req_flag
+   of TRUE, and an integ_req_flag of TRUE.  If the client will be
+   requesting a security layer providing confidentiality protection, it
+   MUST also supply to the GSS_Init_sec_context a conf_req_flag of TRUE.
+   The client then responds with the resulting output_token.  If
+   GSS_Init_sec_context returns GSS_S_CONTINUE_NEEDED, then the client
+   should expect the server to issue a token in a subsequent challenge.
+   The client must pass the token to another call to
+   GSS_Init_sec_context, repeating the actions in this paragraph.
+
+   When GSS_Init_sec_context returns GSS_S_COMPLETE, the client examines
+   the context to ensure that it provides a level of protection
+   permitted by the client's security policy.  If the context is
+   acceptable, the client takes the following actions: If the last call
+   to GSS_Init_sec_context returned an output_token, then the client
+   responds with the output_token, otherwise the client responds with no
+   data.  The client should then expect the server to issue a token in a
+   subsequent challenge.  The client passes this token to GSS_Unwrap and
+   interprets the first octet of resulting cleartext as a bit-mask
+   specifying the security layers supported by the server and the second
+   through fourth octets as the network byte order maximum size
+   output_message to send to the server (if the resulting cleartext is
+   not 4 octets long, the client fails the negotiation).  The client
+   then constructs data, with the first octet containing the bit-mask
+   specifying the selected security layer, the second through fourth
+   octets containing in network byte order the maximum size
+   output_message the client is able to receive, and the remaining
+   octets containing the authorization identity, encoded according to
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 6]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+   the application profile specification.  The authorization identity is
+   not NUL-terminated.  The client passes the data to GSS_Wrap with
+   conf_flag set to FALSE, and responds with the generated
+   output_message.  The client can then consider the server
+   authenticated.
+
+4.2 Server side of authentication protocol exchange
+
+   The server passes the initial client response to
+   GSS_Accept_sec_context as input_token, setting input_context_handle
+   to 0 (initially), mech_type of the GSSAPI mechanism for which this
+   SASL mechanism is registered, chan_binding of NULL, and
+   acceptor_cred_handle equal to output_cred_handle from
+   GSS_Acquire_cred called with desired_name equal to output_name from
+   GSS_Import_name with input_name_type of GSS_C_NT_HOSTBASED_SERVICE
+   and input_name_string of "service at hostname" where "service" is the
+   service name specified in the protocol's profile, and "hostname" is
+   the fully qualified host name of the server.  If
+   GSS_Accept_sec_context returns GSS_S_CONTINUE_NEEDED, the server
+   returns the generated output_token to the client in challenge and
+   passes the resulting response to another call to
+   GSS_Accept_sec_context, repeating the actions in this paragraph.
+
+   When GSS_Accept_sec_context returns GSS_S_COMPLETE, the server
+   examines the context to ensure that it provides a level of protection
+   permitted by the server's security policy.  If the context is
+   acceptable, the server takes the following actions: If the last call
+   to GSS_Accept_sec_context returned an output_token, the server
+   returns it to the client in a challenge and expects a reply from the
+   client with no data.  Whether or not an output_token was returned
+   (and after receipt of any response from the client to such an
+   output_token), the server then constructs 4 octets of data, with the
+   first octet containing a bit-mask specifying the security layers
+   supported by the server and the second through fourth octets
+   containing in network byte order the maximum size output_token the
+   server is able to receive.  The server must then pass the plaintext
+   to GSS_Wrap with conf_flag set to FALSE and issue the generated
+   output_message to the client in a challenge.  The server must then
+   pass the resulting response to GSS_Unwrap and interpret the first
+   octet of resulting cleartext as the bit-mask for the selected
+   security layer, the second through fourth octets as the network byte
+   order maximum size output_message to send to the client, and the
+   remaining octets as the authorization identity.  The server must
+   verify that the src_name is authorized to authenticate as the
+   authorization identity.  After these verifications, the
+   authentication process is complete.
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 7]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+4.3 Security layer
+
+   The security layers and their corresponding bit-masks are as follows:
+
+         1 No security layer
+         2 Integrity protection.
+           Sender calls GSS_Wrap with conf_flag set to FALSE
+         4 Confidentiality protection.
+           Sender calls GSS_Wrap with conf_flag set to TRUE
+
+   Other bit-masks may be defined in the future; bits which are not
+   understood must be negotiated off.
+
+   Note that SASL negotiates the maximum size of the output_message to
+   send.  Implementations can use the GSS_Wrap_size_limit call to
+   determine the corresponding maximum size input_message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 8]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+5. IANA Considerations
+
+   The IANA is advised that SASL mechanism names starting with "GSS-"
+   are reserved for SASL mechanisms which conform to this document.  The
+   IANA is directed to place a statement to that effect in the sasl-
+   mechanisms registry.
+
+   Family of SASL mechanisms: YES
+
+   Prefix: GSS-
+
+   Security considerations: RFC [THIS-DOC]
+
+   Published Specification: RFC [THIS-DOC]
+
+   Person & email address to contact for further information: Alexey
+      Melnikov <Alexey.Melnikov at isode.com>
+
+   Intended usage: COMMON
+
+   Author/Change controller: iesg at ietf.org
+
+   The IANA is directed to modify the existing registration for "GSSAPI"
+   as follows.
+
+   Family of SASL mechanisms: NO
+
+   SASL mechanism name: GSSAPI
+
+   Security considerations: ?
+
+   Published Specification: RFC [THIS-DOC]
+
+   Person & email address to contact for further information: Alexey
+      Melnikov <Alexey.Melnikov at isode.com>
+
+   Intended usage: COMMON
+
+   Author/Change controller: iesg at ietf.org
+
+   Additional Information: This mechanism is for the Kerberos V5
+      mechanism of GSSAPI.  Other GSSAPI mechanisms use other SASL
+      mechanism names, as described in this mechanism's published
+      specification.
+
+   The IANA is directed to modify the existing registration for "GSS-
+   SPNEGO" as follows.
+
+
+
+
+Melnikov                  Expires May 22, 2004                  [Page 9]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+   Family of SASL mechanisms: NO
+
+   SASL mechanism name: GSS-SPNEGO
+
+   Security considerations: See the "SPNEGO" section of RFC [THIS-DOC].
+
+   Published Specification: RFC [THIS-DOC]
+
+   Person & email address to contact for further information: Alexey
+      Melnikov <Alexey.Melnikov at isode.com>
+
+   Intended usage: LIMITED USE
+
+   Author/Change controller: iesg at ietf.org
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                 [Page 10]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+6. Security Considerations
+
+   Security issues are discussed throughout this memo.
+
+   When a server or client supports multiple authentication mechanisms,
+   each of which has a different security strength, it is possible for
+   an active attacker to cause a party to use the least secure mechanism
+   supported.  To protect against this sort of attack, a client or
+   server which supports mechanisms of different strengths should have a
+   configurable minimum strength that it will use.  It is not sufficient
+   for this minimum strength check to only be on the server, since an
+   active attacker can change which mechanisms the client sees as being
+   supported, causing the client to send authentication credentials for
+   its weakest supported mechanism.
+
+   The client's selection of a SASL mechanism is done in the clear and
+   may be modified by an active attacker.  It is important for any new
+   SASL mechanisms to be designed such that an active attacker cannot
+   obtain an authentication with weaker security properties by modifying
+   the SASL mechanism name and/or the challenges and responses.
+
+   [SPNEGO] has protection against many of these down-negotiation
+   attacks, SASL does not itself have such protection.  The section
+   titled "SPNEGO" mentions considerations of choosing negotiation
+   through SASL versus SPNEGO.
+
+   The integrity protection provided by the security layer is useless to
+   the client unless the client also requests mutual authentication.
+   Therefore, a client wishing to benefit from the integrity protection
+   of a security layer MUST pass to the GSS_Init_sec_context call a
+   mutual_req_flag of TRUE.
+
+   When constructing the input_name_string, the client should not
+   canonicalize the server's fully qualified domain name using an
+   insecure or untrusted directory service.
+
+   Additional security considerations are in the [SASL] and [GSSAPI]
+   specifications.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                 [Page 11]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+7. Acknowledgements
+
+   This document is a revision of RFC 2222 written by John G.  Myers.
+   He also contributed significantly to this revision.
+
+   Thank you to Lawrence Greenfield for converting text of this draft to
+   XML format.
+
+   Contributions of many members of the SASL mailing list are gratefully
+   acknowledged.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                 [Page 12]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+Normative References
+
+   [ASN1]           International Organization for Standardization,
+                    "Information Processing Systems - Open Systems
+                    Interconnection - Specification of Abstract Syntax
+                    Notation One (ASN.1)", ISO Standard 8824, December
+                    1990.
+
+   [BASE-ENCODING]  Josefsson, S., "The Base16, Base32, and Base64 Data
+                    Encodings", RFC 3548, July 2003.
+
+   [GSSAPI]         Linn, J., "Generic Security Service Application
+                    Program Interface Version 2, Update 1", RFC 2743,
+                    January 2000.
+
+   [KEYWORDS]       Bradner, S., "Key words for use in RFCs to Indicate
+                    Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [KRB5GSS]        Linn, J., "The Kerberos Version 5 GSS-API
+                    Mechanism", RFC 1964, June 1996.
+
+   [MD5]            Rivest, R., "The MD5 Message-Digest Algorithm", RFC
+                    1321, April 1992.
+
+   [SASL]           Myers, J., "Simple Authentication and Security Layer
+                    (SASL)", RFC 2222, October 1997.
+
+   [SASL(rev)]      Melnikov, A., "Simple Authentication and Security
+                    Layer (SASL)", draft-ietf-sasl-rfc2222bis (work in
+                    progress), October 2003.
+
+   [SPNEGO]         Baize, E. and D. Pinkas, "The Simple and Protected
+                    GSS-API Negotiation Mechanism", RFC 2478, December
+                    1998.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                 [Page 13]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+Informative References
+
+   [SPKM1]  Adams, C., "The Simple Public-Key GSS-API Mechanism (SPKM)",
+            RFC 2025, October 1996.
+
+   [UTF8]   Yergeau, F., "UTF-8, a transformation format of ISO 10646",
+            RFC 2279, January 1998.
+
+
+Author's Address
+
+   Alexey Melnikov (Ed.)
+   Isode Limited
+   5 Castle Business Village
+   36 Station Road
+   Hampton, Middlesex  TW12 2BX
+   UK
+
+   EMail: Alexey.Melnikov at isode.com
+   URI:   http://www.melnikov.ca/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                 [Page 14]
+

+Internet-Draft           SASL GSSAPI mechanisms            November 2003
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Melnikov                  Expires May 22, 2004                 [Page 15]
+

+
diff --git a/doc/draft-ietf-sasl-plain-xx.txt b/doc/draft-ietf-sasl-plain-xx.txt
new file mode 100644
index 0000000..fa1fbce
--- /dev/null
+++ b/doc/draft-ietf-sasl-plain-xx.txt
@@ -0,0 +1,507 @@
+
+
+
+
+
+
+INTERNET-DRAFT                           Editor: Kurt D. Zeilenga
+Intended Category: Standards Track            OpenLDAP Foundation
+Expires in six months                             27 October 2003
+Updates: RFC 2595
+
+
+                         The Plain SASL Mechanism
+                      <draft-ietf-sasl-plain-03.txt>
+
+
+Status of Memo
+
+  This document is an Internet-Draft and is in full conformance with all
+  provisions of Section 10 of RFC2026.
+
+  This document is intended to be, after appropriate review and
+  revision, submitted to the RFC Editor as a Standards Track document.
+  Distribution of this memo is unlimited.  Technical discussion of this
+  document will take place on the IETF SASL mailing list
+  <ietf-sasl at imc.org>.  Please send editorial comments directly to the
+  document editor <Kurt at OpenLDAP.org>.
+
+  Internet-Drafts are working documents of the Internet Engineering Task
+  Force (IETF), its areas, and its working groups.  Note that other
+  groups may also distribute working documents as Internet-Drafts.
+  Internet-Drafts are draft documents valid for a maximum of six months
+  and may be updated, replaced, or obsoleted by other documents at any
+  time.  It is inappropriate to use Internet-Drafts as reference
+  material or to cite them other than as ``work in progress.''
+
+  The list of current Internet-Drafts can be accessed at
+  <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
+  Internet-Draft Shadow Directories can be accessed at
+  <http://www.ietf.org/shadow.html>.
+
+  Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+  Please see the Full Copyright section near the end of this document
+  for more information.
+
+
+Abstract
+
+  This document defines a simple clear-text user/password Simple
+  Authentication and Security Layer (SASL) mechanism called the PLAIN
+  mechanism.  The PLAIN mechanism is intended to be used, in combination
+  with data confidentiality services provided by a lower layer, in
+  protocols which lack a simple password authentication command.
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 1]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+Conventions
+
+  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+  document are to be interpreted as described in [Keywords].
+
+
+1. Background and Intended Usage
+
+  Clear-text passwords are simple, interoperate with almost all existing
+  operating system authentication databases, and are useful for a smooth
+  transition to a more secure password-based authentication mechanism.
+  The drawback is that they are unacceptable for use over an unencrypted
+  network connection.
+
+  This document defines the PLAIN Simple Authentication and Security
+  Layer ([SASL]) mechanism for use in protocols with no clear-text login
+  command (e.g., [ACAP] or [SMTP-AUTH]).
+
+  The name associated with this mechanism is "PLAIN".
+
+  The PLAIN SASL mechanism does not provide a security layer.  This
+  mechanism MUST NOT be used without adequate security protection as the
+  mechanism affords no integrity nor confidentiality protection itself.
+  The PLAIN SASL mechanism MUST NOT be advertised unless a strong
+  encryption layer, such as provided by Transport Layer Security
+  ([TLS]), is active or backwards compatibility dictates otherwise.
+
+  This document updates RFC 2595, replacing Section 6.  Changes since
+  RFC 2595 are detailed in Appendix A.
+
+
+2. PLAIN SASL mechanism
+
+  The mechanism consists of a single message from the client to the
+  server.  The client sends the authorization identity (identity to
+  login as), followed by a NUL (U+0000) character, followed by the
+  authentication identity (identity whose password will be used),
+  followed by a NUL (U+0000) character, followed by the clear-text
+  password.   The client leaves the authorization identity empty if it
+  wishes the server to derive the authorization identity from the
+  authentication identity.
+
+  The formal grammar for the client message using Augmented BNF [ABNF]
+  follows.
+
+      message   = [authzid] NUL authcid NUL passwd
+      authcid   = 1*SAFE ; MUST accept up to 255 octets
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 2]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+      authzid   = 1*SAFE ; MUST accept up to 255 octets
+      passwd    = 1*SAFE ; MUST accept up to 255 octets
+      NUL       = %x00
+
+      SAFE      = UTF1 / UTF2 / UTF3 / UTF4
+                  ;; any UTF-8 encoded Unicode character except NUL
+
+      UTF1      = %x01-7F ;; except NULL
+      UTF2      = %xC2-DF UTF0
+      UTF3      = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) /
+                  %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
+      UTF4      = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) /
+                  %xF4 %x80-8F 2(UTF0)
+      UTF0      = %x80-BF
+
+  The authorization identity (authzid), authentication identity
+  (authcid) and password (passwd) SHALL be transferred as [UTF-8]
+  encoded strings of [Unicode] characters.  As NUL (U+0000) is used as a
+  deliminator, the NUL (U+0000) MUST NOT appear in authzid, authcid, or
+  passwd productions.
+
+  The form of the authzid production is specific to the
+  application-level protocol's SASL profile [SASL].  The authcid and
+  passwd productions are form-free.  Use of non-visible characters or
+  characters which a user may be unable to enter on some keyboards is
+  discouraged.
+
+  Servers MUST be capable of accepting authzid, authcid, and passwd
+  productions up to and including 255 octets.  It is noted that the
+  UTF-8 encoding of a Unicode character may be as long as 4 octets.
+
+  Upon receipt of the message, the server will verify the presented
+  authentication identity (authcid) and password (passwd) with the
+  system authentication database and verify the authentication
+  credentials permit the client to login as the (presented or derived)
+  authorization identity.  If both steps succeed, the user is
+  authenticated.
+
+  The presented authentication identity and password strings are not to
+  be compared directly with stored strings.  The server SHALL first
+  prepare authentication identity and password strings using the
+  [SASLPrep] profile of the [StringPrep] algorithm.  If preparation
+  fails or results in an empty string, verification SHALL fail.  If the
+  server stores only the hash of expected string, that string MUST be
+  prepared before generation of the hash.
+
+  When the no authorization identity is provided, the server SHALL
+  derive the authorization identity from the prepared representation of
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 3]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+  the provided authentication identity string.  This ensures that the
+  derivation of different representations of the authentication identity
+  produce the same authorization identity.
+
+  The verification function (using hashed password) can be written (in
+  pseudo-code):
+
+      boolean Verify(string authzid, string authcid, string passwd) {
+        string pAuthcid = SASLprep(authcid); # prepare authcid
+        string pPasswd = SASLprep(passwd);   # prepare passwd
+        if (pAuthcid == NULL || pPasswd == NULL) {
+          return false;     # preparation failed
+        }
+        if (pAuthcid == "" || pPasswd == "") {
+          return false;     # empty prepared string
+        }
+
+        storedHash = FetchPasswordHash(pAuthcid);
+        if (storedHash == NULL || storedHash == "") {
+          return false;     # error or unknown authcid
+        }
+
+        if (!Compare(storedHash, Hash(pPassword))) {
+          return false;     # incorrect password
+        }
+
+        if (authzid == NULL) {
+          authzid = DeriveAuthzid(pAuthcid);
+          if (authzid == NULL || authzid == "") {
+              return false; # could not derive authzid
+          }
+        }
+
+        if (!Authorize(pAuthcid, authzid)) {
+          return false;     # not authorized
+        }
+
+        return true;
+      }
+
+  Also note that the second parameter provided to the Authorize function
+  is not prepared by this code.  The application-level SASL profile
+  should be consulted to determine what, if any, preparation is
+  necessary.
+
+  The server MAY also use the credentials to initialize any new
+  authentication database, such as one suitable for [CRAM-MD5] or
+  [DIGEST-MD5].
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 4]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+4. Example
+
+  Here is an example of how this might be used to initialize a CRAM-MD5
+  authentication database using the Application Configuration Access
+  Protocol ([ACAP]).  "C:" and "S:" indicate lines sent by the client
+  and server respectively and <NUL> represents a single NUL (U+0000)
+  character.
+
+      S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
+      C: a001 AUTHENTICATE "CRAM-MD5"
+      S: + "<1896.697170952 at postoffice.reston.mci.net>"
+      C: "tim b913a602c7eda7a495b4e6e7334d3890"
+      S: a001 NO (TRANSITION-NEEDED)
+         "Please change your password, or use TLS to login"
+      C: a002 STARTTLS
+      S: a002 OK "Begin TLS negotiation now"
+      <TLS negotiation, further commands are under TLS layer>
+      S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL")
+      C: a003 AUTHENTICATE "PLAIN" {21+}
+      C: <NUL>tim<NUL>tanstaaftanstaaf
+      S: a003 OK CRAM-MD5 password initialized
+
+
+
+5. Security Considerations
+
+  The PLAIN mechanism relies on the TLS encryption layer for security.
+  When used without TLS, it is vulnerable to a common network
+  eavesdropping attack.  Therefore PLAIN MUST NOT be advertised or used
+  unless a suitable TLS encryption layer is active or backwards
+  compatibility dictates otherwise.
+
+  When the PLAIN mechanism is used, the server gains the ability to
+  impersonate the user to all services with the same password regardless
+  of any encryption provided by TLS or other network privacy mechanisms.
+  While many other authentication mechanisms have similar weaknesses,
+  stronger SASL mechanisms address this issue.  Clients are encouraged
+  to have an operational mode where all mechanisms which are likely to
+  reveal the user's password to the server are disabled.
+
+  General SASL security considerations apply to this mechanism.
+  "stringprep" and Unicode [StringPrep] security considerations also
+  apply, as do [UTF-8] security considerations.
+
+
+6. IANA Considerations
+
+  It is requested that the SASL Mechanism registry [IANA-SASL] entry for
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 5]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+  the PLAIN mechanism be updated to reflect that this document now
+  provides its technical specification.
+
+      To: iana at iana.org
+      Subject: Updated Registration of SASL mechanism PLAIN
+
+      SASL mechanism name: PLAIN
+      Security considerations: See RFC XXXX.
+      Published specification (optional, recommended): RFC XXXX
+      Person & email address to contact for further information:
+          Kurt Zeilenga <kurt at openldap.org>
+           IETF SASL WG <ietf-sasl at imc.org>
+      Intended usage: COMMON
+      Author/Change controller: IESG <iesg at ietf.org>
+      Note: Updates existing entry for PLAIN
+
+
+7. Acknowledgment
+
+  This document is a revision of RFC 2595 by Chris Newman.  Portions of
+  the grammar defined in Section 2 were borrowed from [UTF-8] by
+  Francois Yergeau.
+
+  This document is a product of the IETF SASL WG.
+
+
+8. Normative References
+
+  [ABNF]        Crocker, D. and P. Overell, "Augmented BNF for Syntax
+                Specifications: ABNF", RFC 2234, November 1997.
+
+  [Keywords]    Bradner, S., "Key words for use in RFCs to Indicate
+                Requirement Levels", BCP 14, RFC 2119, March 1997
+
+  [SASL]        Melnikov, A. (Editor), "Simple Authentication and
+                Security Layer (SASL)",
+                draft-ietf-sasl-rfc2222bis-xx.txt, a work in progress.
+
+  [StringPrep]  Hoffman P. and M. Blanchet, "Preparation of
+                Internationalized Strings ('stringprep')",
+                draft-hoffman-rfc3454bis-xx.txt, a work in progress.
+
+  [Unicode]     The Unicode Consortium, "The Unicode Standard, Version
+                3.2.0" is defined by "The Unicode Standard, Version 3.0"
+                (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
+                as amended by the "Unicode Standard Annex #27: Unicode
+                3.1" (http://www.unicode.org/reports/tr27/) and by the
+                "Unicode Standard Annex #28: Unicode 3.2"
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 6]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+                (http://www.unicode.org/reports/tr28/).
+
+  [UTF-8]       Yergeau, F., "UTF-8, a transformation format of ISO
+                10646", draft-yergeau-rfc2279bis-xx.txt, a work in
+                progress.
+
+  [TLS]         Dierks, T. and, E. Rescorla, "The TLS Protocol Version
+                1.1", draft-ietf-tls-rfc2246-bis-xx.txt, a work in
+                progress.
+
+
+9. Informative References
+
+  [ACAP]        Newman, C. and J. Myers, "ACAP -- Application
+                Configuration Access Protocol", RFC 2244, November 1997.
+  [CRAM-MD5]    Nerenberg, L., "The CRAM-MD5 SASL Mechanism",
+                draft-ietf-sasl-crammd5-xx.txt, a work in progress.
+
+  [DIGEST-MD5]  Leach, P., C. Newman, and A. Melnikov, "Using Digest
+                Authentication as a SASL Mechanism",
+                draft-ietf-sasl-rfc2831bis-xx.txt, a work in progress.
+
+  [IANA-SASL]   IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
+                MECHANISMS", http://www.iana.org/assignments/sasl-
+                mechanisms.
+
+  [SMTP-AUTH]   Myers, J., "SMTP Service Extension for Authentication",
+                RFC 2554, March 1999.
+
+
+
+10. Editor's Address
+
+  Kurt Zeilenga
+  OpenLDAP Foundation
+
+  Email: kurt at OpenLDAP.org
+
+
+Appendix A.  Changes since RFC 2595
+
+  This appendix is non-normative.
+
+  This document replaces Section 6 of RFC 2595.
+
+  The specification details how the server is to compare client-provided
+  character strings with stored character strings.
+
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 7]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+  The ABNF grammar was updated.  In particular, the grammar now allows
+  LINE FEED (U+000A) and CARRIAGE RETURN (U+000D) characters in the
+  authzid, authcid, passwd productions.   However, whether these control
+  characters may be used depends on the string preparation rules
+  applicable to the production.   For passwd and authcid productions,
+  control characters are prohibited.  For authzid, one must consult the
+  application-level SASL profile.
+
+
+
+Intellectual Property Rights
+
+  The IETF takes no position regarding the validity or scope of any
+  intellectual property or other rights that might be claimed to pertain
+  to the implementation or use of the technology described in this
+  document or the extent to which any license under such rights might or
+  might not be available; neither does it represent that it has made any
+  effort to identify any such rights.  Information on the IETF's
+  procedures with respect to rights in standards-track and
+  standards-related documentation can be found in BCP-11.  Copies of
+  claims of rights made available for publication and any assurances of
+  licenses to be made available, or the result of an attempt made to
+  obtain a general license or permission for the use of such proprietary
+  rights by implementors or users of this specification can be obtained
+  from the IETF Secretariat.
+
+  The IETF invites any interested party to bring to its attention any
+  copyrights, patents or patent applications, or other proprietary
+  rights which may cover technology that may be required to practice
+  this standard.  Please address the information to the IETF Executive
+  Director.
+
+
+
+Full Copyright
+
+  Copyright (C) The Internet Society (2003). All Rights Reserved.
+
+  This document and translations of it may be copied and furnished to
+  others, and derivative works that comment on or otherwise explain it
+  or assist in its implmentation may be prepared, copied, published and
+  distributed, in whole or in part, without restriction of any kind,
+  provided that the above copyright notice and this paragraph are
+  included on all such copies and derivative works.  However, this
+  document itself may not be modified in any way, such as by removing
+  the copyright notice or references to the Internet Society or other
+  Internet organizations, except as needed for the  purpose of
+  developing Internet standards in which case the procedures for
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 8]
+

+INTERNET-DRAFT        draft-ietf-sasl-plain-03.txt       27 October 2003
+
+
+  copyrights defined in the Internet Standards process must be followed,
+  or as required to translate it into languages other than English.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Zeilenga                  Plain SASL Mechanism                  [Page 9]
+

diff --git a/doc/draft-ietf-sasl-rfc2222bis-xx.txt b/doc/draft-ietf-sasl-rfc2222bis-xx.txt
new file mode 100644
index 0000000..ecadd4b
--- /dev/null
+++ b/doc/draft-ietf-sasl-rfc2222bis-xx.txt
@@ -0,0 +1,1320 @@
+
+
+
+
+
+
+Network Working Group                                        A. Melnikov
+Internet Draft                                                    Editor
+Document: draft-ietf-sasl-rfc2222bis-03.txt                 October 2003
+                                                   Expires in six months
+
+
+            Simple Authentication and Security Layer (SASL)
+
+Status of this Memo
+
+   This document is an Internet Draft and is in full conformance with
+   all provisions of Section 10 of RFC 2026.
+
+   Internet Drafts are working documents of the Internet Engineering
+   Task Force (IETF), its Areas, and its Working Groups.  Note that
+   other groups may also distribute working documents as Internet
+   Drafts. Internet Drafts are draft documents valid for a maximum of
+   six months.  Internet Drafts may be updated, replaced, or obsoleted
+   by other documents at any time.  It is not appropriate to use
+   Internet Drafts as reference material or to cite them other than as
+   ``work in progress''.
+
+   The list of current Internet-Drafts can be accessed at
+   http://www.ietf.org/ietf/1id-abstracts.txt
+
+   The list of Internet-Draft Shadow Directories can be accessed at
+   http://www.ietf.org/shadow.html.
+
+   A revised version of this draft document will be submitted to the RFC
+   editor as a Draft Standard for the Internet Community.  Discussion
+   and suggestions for improvement are requested.  Distribution of this
+   draft is unlimited.
+
+   When published as an RFC this document will obsolete RFC 2222.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+A. Melnikov                                             FORMFEED[Page i]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+1.    Abstract
+
+   The Simple Authentication and Security Layer (SASL) provides a method
+   for adding authentication support with an optional security layer to
+   connection-based protocols.  It also describes a structure for
+   authentication mechanisms.  The result is an abstraction layer
+   between protocols and authentication mechanisms such that any SASL-
+   compatible authentication mechanism can be used with any SASL-
+   compatible protocol.
+
+   This document describes how a SASL authentication mechanism is
+   structured, describes how a protocol adds support for SASL, defines
+   the protocol for carrying a security layer over a connection, and
+   defines the EXTERNAL SASL authentication mechanism.
+
+2.    Organization of this document
+
+2.1.  How to read this document
+
+   This document is written to serve two different audiences, protocol
+   designers using this specification to support authentication in their
+   protocol, and implementors of clients or servers for those protocols
+   using this specification.
+
+   The sections "Overview", "Authentication Mechanisms", "Protocol
+   Profile Requirements", "Specific Issues", and "Security
+   Considerations" cover issues that protocol designers need to
+   understand and address in profiling this specification for use in a
+   specific protocol.
+
+   Implementors of a protocol using this specification need the
+   protocol-specific profiling information in addition to the
+   information in this document.
+
+2.2.  Conventions used in this document
+
+   In examples, "C:" and "S:" indicate lines sent by the client and
+   server respectively.
+
+   The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+   in this document are to be interpreted as defined in "Key words for
+   use in RFCs to Indicate Requirement Levels" [KEYWORDS].
+
+   Character names in this document use the notation for code points and
+   names from the Unicode Standard [Unicode].  For example, the letter
+   "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
+
+
+
+
+
+A. Melnikov                                             FORMFEED[Page 2]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+3.    Overview
+
+   The Simple Authentication and Security Layer (SASL) is a method for
+   adding authentication support to connection-based protocols.
+
+   The SASL specification has three layers, as indicated in the diagram
+   below.  At the top, a protocol definition using SASL specifies a
+   profile, including a command for identifying and authenticating a
+   user to a server and for optionally negotiating a security layer for
+   subsequent protocol interactions.  At the bottom, a SASL mechanism
+   definition specifies an authentication mechanism.  The SASL
+   framework, specified by this document, constrains the behavior of
+   protocol profiles and mechanisms, separating protocol from mechanism
+   and defining how they interact.
+
+                SMTP Protocol     LDAP Protocol          Etc
+                   Profile           Profile            . . .
+                          -----        |       -----//
+                                       |      //
+                                 SASL framework
+                                /       |      \
+                          /-----        |       -----\
+                   EXTERNAL         DIGEST-MD5           Etc
+                SASL mechanism    SASL mechanism        . . .
+
+   This separation between the definition of protocols and the
+   definition of authentication mechanisms is crucial.  It permits an
+   authentication mechanism to be defined once, making it usable by any
+   SASL protocol profile.  In many implementations, the same SASL
+   mechanism code is used for multiple protocols.
+
+4.    Authentication mechanisms
+
+   SASL mechanisms are named by strings, from 1 to 20 characters in
+   length, consisting of upper-case ASCII [ASCII] letters, digits,
+   hyphens, and/or underscores.  SASL mechanism names must be registered
+   with the Internet Assigned Numbers Authority (IANA). IETF standards
+   track documents may direct the IANA to reserve a portion of the SASL
+   mechanism namespace and may specify different registration criteria
+   for the reserved portion; the GSSAPI mechanism specification [SASL-
+   GSSAPI] does this. Procedures for registering new SASL mechanisms are
+   given in the section 8.
+
+   The "sasl-mech" rule below defines the syntax of a SASL mechanism
+   name.  This uses the Augmented Backus-Naur Form (ABNF) notation as
+   specified in [ABNF] and the ABNF core rules as specified in Appendix
+   A of the ABNF specification [ABNF].
+
+
+
+
+A. Melnikov                                             FORMFEED[Page 3]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   sasl-mech    = 1*20mech-char
+   mech-char    = %x41-5A / DIGIT / "-" / "_"
+                  ; mech names restricted to uppercase ASCII letters,
+                  ; digits, "-" and "_"
+
+
+4.1.  Authentication protocol exchange
+
+   A SASL mechanism is responsible for conducting an authentication
+   protocol exchange.  This consists of a series of server challenges
+   and client responses, the contents of which are specific to and
+   defined by the mechanism.  To the protocol, the challenges and
+   responses are opaque binary tokens of arbitrary length.  The
+   protocol's profile then specifies how these binary tokens are then
+   encoded for transfer over the connection.
+
+   After receiving an authentication command or any client response, a
+   server mechanism may issue a challenge, indicate failure, or indicate
+   completion.  The server mechanism may return additional data with a
+   completion indication.  The protocol's profile specifies how each of
+   these is then represented over the connection.
+
+   After receiving a challenge, a client mechanism may issue a response
+   or abort the exchange.  The protocol's profile specifies how each of
+   these is then represented over the connection.
+
+   During the authentication protocol exchange, the mechanism performs
+   authentication, transmits an authorization identity (frequently known
+   as a userid) from the client to server, and negotiates the use of a
+   mechanism-specific security layer.  If the use of a security layer is
+   agreed upon, then the mechanism must also define or negotiate the
+   maximum security layer buffer size that each side is able to receive.
+
+4.2.  Authorization identities and proxy authentication
+
+   An authorization identity is a string of zero or more ISO 10646
+   [ISO-10646] coded characters.  The NUL <U+0000> character is not
+   permitted in authorization identities. The meaning of an
+   authorization identity of the empty string (zero length) is defined
+   below in this section. The authorization identity is used by the
+   server as the primary identity for making access policy decisions.
+
+   The character encoding scheme used (see [CHARSET-POLICY] for IETF
+   policy regarding character sets in IETF protocols) for transmitting
+   an authorization identity over protocol is specified in each
+   authentication mechanism (with the authentication mechanism's data
+   being further restricted/encoded by the protocol profile).
+   Authentication mechanisms SHOULD encode these and other strings in
+
+
+
+A. Melnikov                                             FORMFEED[Page 4]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   UTF-8 [UTF-8]. While some legacy mechanisms are incapable of
+   transmitting an authorization identity other than the empty string,
+   newly defined mechanisms are expected to be capable of carrying the
+   entire Unicode repertoire (with the exception of the NUL character).
+   An authorization identity of the empty string and an absent
+   authorization identity MUST be treated as equivalent.  However,
+   mechanisms SHOULD NOT allow both. That is, a mechanism which provides
+   an optional field for an authorization identity, SHOULD NOT allow
+   that field, when present, to be empty.
+
+   The identity derived from the client's authentication credentials is
+   known as the "authentication identity".  With any mechanism,
+   transmitting an authorization identity of the empty string directs
+   the server to derive an authorization identity from the client's
+   authentication identity.
+
+   If the authorization identity transmitted during the authentication
+   protocol exchange is not the empty string, this is typically referred
+   to as "proxy authentication".  This feature permits agents such as
+   proxy servers to authenticate using their own credentials, yet
+   request the access privileges of the identity for which they are
+   proxying.
+
+   The server makes an implementation defined policy decision as to
+   whether the authentication identity is permitted to have the access
+   privileges of the authorization identity and whether the
+   authorization identity is permitted to receive service.  If it is
+   not, the server indicates failure of the authentication protocol
+   exchange.
+
+   As a client might not have the same information as the server,
+   clients SHOULD NOT derive authorization identities from
+   authentication identities. Instead, clients SHOULD provide no (or
+   empty) authorization identity when the user has not provided an
+   authorization identity.
+
+   The server MUST verify that a received authorization identity is in
+   the correct form. Profiles whose authorization identities are simple
+   user names (e.g. IMAP [RFC 3501]) SHOULD use "SASLPrep" profile
+   [SASLPrep] of the "stringprep" algorithm [StringPrep] to prepare
+   these names for matching. The profiles MAY use a stringprep profile
+   that is more strict than "SASLPrep". If the preparation of the
+   authorization identity fails or results in an empty string, the
+   server MUST fail the authentication exchange. The only exception to
+   this rule is when the received authorization identity is already the
+   empty string.
+
+
+
+
+
+A. Melnikov                                             FORMFEED[Page 5]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+4.3.  Security layers
+
+   If use of a security layer is negotiated by the authentication
+   protocol exchange, the security layer is applied to all subsequent
+   data sent over the connection (until another security layer or no
+   security layer is negotiated; see also section 6.3). The security
+   layer takes effect immediately following the last response of the
+   authentication exchange for data sent by the client and the
+   completion indication for data sent by the server.
+
+   Once the security layer is in effect, the protocol stream is
+   processed by the security layer into buffers of security encoded
+   data.  Each buffer of security encoded data is transferred over the
+   connection as a stream of octets prepended with a four octet field in
+   network byte order that represents the length of the following
+   buffer.  The length of the security encoded data buffer MUST be no
+   larger than the maximum size that was either defined in the mechanism
+   specification or negotiated by the other side during the
+   authentication protocol exchange.  Upon the receipt of a data buffer
+   which is larger than the defined/negotiated maximal buffer size, the
+   receiver SHOULD close the connection.  This might be a sign of an
+   attack or a buggy implementation.
+
+4.4.  Character string issues
+
+   Authentication mechanisms SHOULD encode character strings in UTF-8
+   [UTF-8] (see [CHARSET-POLICY] for IETF policy regarding character
+   sets in IETF protocols).  In order to avoid noninteroperability due
+   to differing normalizations, when a mechanism specifies that a string
+   authentication identity or password used as input to a cryptographic
+   function (or used for comparison) it SHOULD specify that the string
+   first be prepared using the "SASLPrep" profile [SASLPrep] of the
+   "stringprep" algorithm [StringPrep].  There are three entities that
+   has to deal with this issue: a client (upon getting user input or
+   retrieving a value from configuration), a server (upon receiving the
+   value from the client) and a utility that is able to store
+   passwords/hashes in a database that can be later used by the server.
+   The preparation must be done by the client and the utility and may be
+   done by the server. If preparation fails or results in an empty
+   string, the entity doing the preparation SHALL fail the
+   authentication exchange.
+
+
+5.    Protocol profile requirements
+
+   In order to use this specification, a protocol definition MUST supply
+   the following information:
+
+
+
+
+A. Melnikov                                             FORMFEED[Page 6]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   A service name, to be selected from the IANA registry of "service"
+   elements for the GSSAPI host-based service name form [GSSAPI]. This
+   service name is made available to the authentication mechanism.
+
+   The registry is available at the URL
+   <http://www.iana.org/assignments/gssapi-service-names>.
+
+   A definition of the command to initiate the authentication protocol
+   exchange.  This command must have as a parameter the name of the
+   mechanism being selected by the client.
+
+   The command SHOULD have an optional parameter giving an initial
+   response.  This optional parameter allows the client to avoid a round
+   trip when using a mechanism which is defined to have the client send
+   data first.  When this initial response is sent by the client and the
+   selected mechanism is defined to have the server start with an
+   initial challenge, the command fails.  See section 6.1 of this
+   document for further information.
+
+   A definition of the method by which the authentication protocol
+   exchange is carried out, including how the challenges and responses
+   are encoded, how the server indicates completion or failure of the
+   exchange, how the client aborts an exchange, and how the exchange
+   method interacts with any line length limits in the protocol.
+
+   The exchange method SHOULD allow the server to include an optional
+   data ("optional challenge") with a success notification.  This allows
+   the server to avoid a round trip when using a mechanism which is
+   defined to have the server send additional data along with the
+   indication of successful completion.  See section 6.2 of this
+   document for further information.
+
+   In addition, a protocol profile SHOULD specify a mechanism through
+   which a client may obtain the names of the SASL mechanisms available
+   to it.  This is typically done through the protocol's extensions or
+   capabilities mechanism.
+
+   Identification of the octet where any negotiated security layer
+   starts to take effect, in both directions.
+
+   Specify if the protocol supports "multiple authentications" (see
+   section 6.3).
+
+   If both TLS and SASL security layer are allowed to be negotiated by
+   the protocol, the protocol profile MUST define in which order they
+   are applied to a cleartext data sent over the connection.
+
+   A protocol profile MAY further refine the definition of an
+
+
+
+A. Melnikov                                             FORMFEED[Page 7]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   authorization identity by adding additional syntactic restrictions
+   and protocol-specific semantics. A protocol profile MUST specify the
+   form of the authorization identity (since it is protocol specific, as
+   opposed to the authentication identity, which is mechanism specific)
+   and how authorization identities are to be compared. Profiles whose
+   authorization identities are simple user names (e.g. IMAP [RFC 3501])
+   SHOULD use "SASLPrep" profile [SASLPrep] of the "stringprep"
+   algorithm [StringPrep] to prepare these names for matching. The
+   profiles MAY use a stringprep profile that is more strict than
+   SASLPrep.
+
+   A protocol profile SHOULD NOT attempt to amend the definition of
+   mechanisms or make mechanism-specific encodings.  This breaks the
+   separation between protocol and mechanism that is fundamental to the
+   design of SASL. Likewise, SASL mechanisms SHOULD be profile neutral.
+
+6.    Specific issues
+
+6.1.  Client sends data first
+
+   Some mechanisms specify that the first data sent in the
+   authentication protocol exchange is from the client to the server.
+
+   If a protocol's profile permits the command which initiates an
+   authentication protocol exchange to contain an initial client
+   response, this parameter SHOULD be used with such mechanisms.
+
+   If the initial client response parameter is not given, or if a
+   protocol's profile does not permit the command which initiates an
+   authentication protocol exchange to contain an initial client
+   response, then the server issues a challenge with no data.  The
+   client's response to this challenge is then used as the initial
+   client response.  (The server then proceeds to send the next
+   challenge, indicates completion, or indicates failure.)
+
+6.2.  Server returns success with additional data
+
+   Some mechanisms may specify that additional data be sent to the
+   client along with an indication of successful completion of the
+   exchange.  This data would, for example, authenticate the server to
+   the client.
+
+   If a protocol's profile does not permit this additional data to be
+   returned with a success indication, then the server issues the data
+   as a server challenge, without an indication of successful
+   completion.  The client then responds with no data.  After receiving
+   this empty response, the server then indicates successful completion
+   (with no additional data).
+
+
+
+A. Melnikov                                             FORMFEED[Page 8]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   Client implementors should be aware of an additional failure case
+   that might occur when the profile supports sending the additional
+   data with success. Imagine that an active attacker is trying to
+   impersonate the server and sends faked data, which should be used to
+   authenticate the server to the client, with success.  (A similar
+   situation can happen when either the server and/or the client has a
+   bug and they calculate different responses.) After checking the data,
+   the client will think that the authentication exchange has failed,
+   however the server will think that the authentication exchange has
+   completed successfully.  At this point the client can not abort the
+   authentication exchange, it SHOULD close the connection instead.
+   However, if the profile did not support sending of additional data
+   with success, the client could have aborted the exchange at the very
+   last step of the authentication exchange.
+
+6.3.  Multiple authentications
+
+   Unless otherwise stated by the protocol's profile, only one
+   successful SASL negotiation may occur in a protocol session.  In this
+   case, once an authentication protocol exchange has successfully
+   completed, further attempts to initiate an authentication protocol
+   exchange fail.
+
+   If a profile explicitly permits multiple successful SASL negotiations
+   to occur, then in no case may multiple security layers be
+   simultaneously in effect.  If a security layer is in effect and a
+   subsequent SASL negotiation selects a second security layer, then the
+   second security layer replaces the first. If a security layer is in
+   effect and a subsequent SASL negotiation selects no security layer,
+   the original security layer MUST be removed. The next paragraphs
+   explain why this is important.
+
+   Let's assume that the protected resources on a server are partitioned
+   into a set of protection spaces, each with its own authentication
+   mechanisms and/or authorization database. Let's use the term "realm"
+   to reference any such protected space. Conceptually, realm is a named
+   collection of user's accounts. For example, a proxy/frontend can use
+   different realms for different servers/backends it represents.
+
+   Now consider the following scenario. A client has already
+   authenticated and established a security layer with "Realm A" which
+   is managed by the server AA.  Now the same client authenticates to
+   "Realm B" (managed by the server BB) without negotiating a new
+   security layer, while the security layer negotiated with "Realm A"
+   remains in effect. The server BB is now able observe how known
+   cleartext is encrypted. This scenario enables the server BB to make
+   guesses about previously observed ciphertext between the client and
+   the server AA using the server's SASL engine as an oracle.  This
+
+
+
+A. Melnikov                                             FORMFEED[Page 9]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   scenario is illustrated below:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 10]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+              +---------+                   +---------+
+              |         |                   |         |
+              | Realm B |                   | Realm A |
+              |         |                   |         |
+              +---------+                   +---------+
+                  |  ^                           |
+                  |  :      +-----------+        |
+     Traffic from |  :      | Encryption|        | Traffic from A
+      B to client +-------->| end point |<-------+ to client
+                     :      | (SSL/SASL)|
+                     :      +-----------+
+                     :            |
+                     :            |
+                     :          +---+
+                     :          |   |
+                     :          |   |
+                     :          |   | Encryption tunnel, e.g. SASL or SSL,
+                     :          |   | between the server
+       (1) Recording +---------:|   | and a single client only.
+           encrypted            |   | Separate tunnels to different
+           traffic between      |   | clients.
+           Realm A and client   +---+
+                                  |
+                                  |
+                                  +-----------> Traffic to clients
+
+7.    The EXTERNAL mechanism
+
+   The mechanism name associated with external authentication is
+   "EXTERNAL".
+
+   The client sends an initial response with the UTF-8 encoding of the
+   authorization identity. The form of the authorization identity is
+   further restricted by the application-level protocol's SASL profile.
+
+   The server uses information, external to SASL, to determine whether
+   the client is authorized to authenticate as the authorization
+   identity.  If the client is so authorized, the server indicates
+   successful completion of the authentication exchange; otherwise the
+   server indicates failure.
+
+   The system providing this external information may be, for example,
+   IPSec or TLS. However, the client can make no assumptions as to what
+   information the server can use in determining client authorization.
+   E.g., just because TLS was established, doesn't mean that the server
+   will use the information provided by TLS.
+
+   If the client sends the empty string as the authorization identity
+
+
+
+A. Melnikov                                            FORMFEED[Page 11]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   (thus requesting that the authorization identity be derived from the
+   client's authentication credentials), the authorization identity is
+   to be derived from authentication credentials which exist in the
+   system that is providing the external authentication.
+
+7.1.  Formal syntax
+
+   The following syntax specification uses the augmented Backus-Naur
+   Form (BNF) notation as specified in [ABNF].  This uses the ABNF core
+   rules as specified in Appendix A of the ABNF specification [ABNF].
+   Non-terminals referenced but not defined below are as defined by
+   [UTF-8].
+
+   The "extern-init-resp" rule below defines the initial response sent
+   from client to server.
+
+   extern-init-resp  = *( UTF8-char-no-nul )
+
+   UTF8-char-no-nul  = UTF8-1-no-nul / UTF8-2 / UTF8-3 / UTF8-4
+
+   UTF8-1-no-nul     = %x01-7F
+
+
+7.2.  Example
+
+   The following is an example of an EXTERNAL authentication in the SMTP
+   protocol [SMTP].  In this example, the client is proxy
+   authenticating, sending the authorization id "fred".  The server has
+   determined the client's identity through IPsec and has a security
+   policy that permits that identity to proxy authenticate as any other
+   identity.
+
+   To the protocol profile, the four octet sequence "fred" is an opaque
+   binary data. The SASL protocol profile for SMTP [SMTP-AUTH] specifies
+   that server challenges and client responses are encoded in BASE64
+   [BASE64]; the BASE64 encoding of "fred" is "ZnJlZA==".
+
+      S: 220 smtp.example.com ESMTP server ready
+      C: EHLO jgm.example.com
+      S: 250-smtp.example.com
+      S: 250 AUTH DIGEST-MD5 EXTERNAL
+      C: AUTH EXTERNAL ZnJlZA==
+      S: 235 Authentication successful.
+
+8.    IANA Considerations
+
+
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 12]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+8.1.  Guidelines for IANA
+
+
+   It is requested that IANA updates the SASL mechanisms registry as
+   follows:
+
+
+      Change the "Intended usage" of the KERBEROS_V4 and SKEY mechanism
+      registrations to OBSOLETE.  Change the "Published specification"
+      of the EXTERNAL mechanism to this document. Updated registration
+      is provided in Section 8.6.
+
+8.2.  Registration procedure
+
+
+   Registration of a SASL mechanism is done by filling in the template
+   in section 8.5 and sending it via electronic mail to <iana at iana.org>.
+   IANA has the right to reject obviously bogus registrations, but will
+   perform no review of claims made in the registration form.  SASL
+   mechanism registrations are currently available at the URL
+   <http://www.iana.org/assignments/sasl-mechanisms>.
+
+   There is no naming convention for SASL mechanisms; any name that
+   conforms to the syntax of a SASL mechanism name can be registered.
+   An IETF Standards Track document may reserve a portion of the SASL
+   mechanism namespace ("family of SASL mechanisms") for its own use,
+   amending the registration rules for that portion of the namespace.
+   Each family of SASL mechanisms MUST be identified by a prefix.
+
+   While the registration procedures do not require it, authors of SASL
+   mechanisms are encouraged to seek community review and comment
+   whenever that is feasible.  Authors may seek community review by
+   posting a specification of their proposed mechanism as an Internet-
+   Draft.  SASL mechanisms intended for widespread use should be
+   standardized through the normal IETF process, when appropriate.
+
+8.3.  Comments on SASL mechanism registrations
+
+   Comments on registered SASL mechanisms should first be sent to the
+   "owner" of the mechanism and/or to the SASL WG mailing list.
+   Submitters of comments may, after a reasonable attempt to contact the
+   owner, request IANA to attach their comment to the SASL mechanism
+   registration itself.  If IANA approves of this, the comment will be
+   made accessible in conjunction with the SASL mechanism registration
+   itself.
+
+
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 13]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+8.4.  Change control
+
+   Once a SASL mechanism registration has been published by IANA, the
+   author may request a change to its definition.  The change request
+   follows the same procedure as the registration request.
+
+   The owner of a SASL mechanism may pass responsibility for the SASL
+   mechanism to another person or agency by informing IANA; this can be
+   done without discussion or review.
+
+   The IESG may reassign responsibility for a SASL mechanism. The most
+   common case of this will be to enable changes to be made to
+   mechanisms where the author of the registration has died, moved out
+   of contact or is otherwise unable to make changes that are important
+   to the community.
+
+   SASL mechanism registrations may not be deleted; mechanisms which are
+   no longer believed appropriate for use can be declared OBSOLETE by a
+   change to their "intended use" field; such SASL mechanisms will be
+   clearly marked in the lists published by IANA.
+
+   The IESG is considered to be the owner of all SASL mechanisms which
+   are on the IETF standards track.
+
+8.5.  Registration template
+
+
+     Subject: Registration of SASL mechanism X
+
+     Family of SASL mechanisms: (YES or NO)
+
+     SASL mechanism name (or prefix for the family):
+
+     Security considerations:
+
+     Published specification (optional, recommended):
+
+     Person & email address to contact for further information:
+
+     Intended usage:
+
+     (One of COMMON, LIMITED USE or OBSOLETE)
+
+     Owner/Change controller:
+
+     (Any other information that the author deems interesting may be
+     added below this line.)
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 14]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+8.6.  The EXTERNAL mechanism registration
+
+   It is requested that the SASL Mechanism registry [IANA-SASL] entry
+   for the EXTERNAL mechanism be updated to reflect that this document
+   now provides its technical specification.
+
+
+      Subject: Updated Registration of SASL mechanism EXTERNAL
+
+      Family of SASL mechanisms: NO
+
+      SASL mechanism name: EXTERNAL
+
+      Security considerations: See RFC XXXX, section 9.
+
+      Published specification (optional, recommended): RFC XXXX
+
+      Person & email address to contact for further information:
+        Alexey Melnikov <Alexey.Melnikov at isode.com>
+
+      Intended usage: COMMON
+
+      Owner/Change controller: IESG <iesg at ietf.org>
+
+      Note: Updates existing entry for EXTERNAL
+
+9.   Security considerations
+
+   Security issues are discussed throughout this memo.
+
+   The mechanisms that support integrity protection are designed such
+   that the negotiation of the security layer and authorization identity
+   is integrity protected.  When the client selects a security layer
+   with at least integrity protection, this protects against an active
+   attacker hijacking the connection and modifying the authentication
+   exchange to negotiate a plaintext connection.
+
+   When a server or client supports multiple authentication mechanisms,
+   each of which has a different security strength, it is possible for
+   an active attacker to cause a party to use the least secure mechanism
+   supported.  To protect against this sort of attack, a client or
+   server which supports mechanisms of different strengths should have a
+   configurable minimum strength that it will use.  It is not sufficient
+   for this minimum strength check to only be on the server, since an
+   active attacker can change which mechanisms the client sees as being
+   supported, causing the client to send authentication credentials for
+   its weakest supported mechanism.
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 15]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   The client's selection of a SASL mechanism is done in the clear and
+   may be modified by an active attacker.  It is important for any new
+   SASL mechanisms to be designed such that an active attacker cannot
+   obtain an authentication with weaker security properties by modifying
+   the SASL mechanism name and/or the challenges and responses.
+
+   Any protocol interactions prior to authentication are performed in
+   the clear and may be modified by an active attacker.  In the case
+   where a client selects integrity protection, it is important that any
+   security-sensitive protocol negotiations be performed after
+   authentication is complete.  Protocols should be designed such that
+   negotiations performed prior to authentication should be either
+   ignored or revalidated once authentication is complete.
+
+   When use of a security layer is negotiated by the authentication
+   protocol exchange, the receiver should handle gracefully any security
+   encoded data buffer larger than the defined/negotiated maximal size.
+   In particular, it must not blindly allocate the amount of memory
+   specified in the buffer size field, as this might cause the "out of
+   memory" condition. If the receiver detects a large block, it SHOULD
+   close the connection.
+
+   "stringprep" and Unicode security considerations apply to
+   authentication identities, authorization identities and passwords.
+
+   The EXTERNAL mechanism provides no security protection; it is
+   vulnerable to spoofing by either client or server, active attack, and
+   eavesdropping.  It should only be used when external security
+   mechanisms are present and have sufficient strength.
+
+10.    References
+
+10.1.  Normative References
+
+   [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
+   ABNF", RFC 2234, November 1997
+
+   [ASCII] American National Standards Institute, "Code Extension
+   Techniques for Use with the 7-bit Coded Character Set of American
+   National Standard Code (ASCII) for Information Interchange", FIPS PUB
+   35, 1974
+
+   [CHARSET-POLICY] Alvestrand, "IETF Policy on Character Sets and
+   Languages", RFC 2277, January 1998
+
+   [GSSAPI] Linn, "Generic Security Service Application Program
+   Interface, Version 2, Update 1", RFC 2743, January 2000
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 16]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   [ISO-10646] "Universal Multiple-Octet Coded Character Set (UCS) -
+   Architecture and Basic Multilingual Plane", ISO/IEC 10646-1 : 1993.
+
+   [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
+   Requirement Levels", RFC 2119, March 1997
+
+   [Unicode] The Unicode Consortium, "The Unicode Standard, Version
+   3.2.0" is defined by "The Unicode Standard, Version 3.0" (Reading,
+   MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), as amended by the
+   "Unicode Standard Annex #27: Unicode 3.1"
+   (http://www.unicode.org/reports/tr27/) and by the "Unicode Standard
+   Annex #28: Unicode 3.2" (http://www.unicode.org/reports/tr28/).
+
+   [Stringprep] P. Hoffman, M. Blanchet, "Preparation of
+   Internationalized Strings ("stringprep")", RFC 3454, December 2002.
+
+   [SASLPrep] Zeilenga, K., "SASLprep: Stringprep profile for user names
+   and passwords", Work in progress, draft-ietf-sasl-saslprep-XX.txt.
+
+   [UTF-8] Yergeau, "UTF-8, a transformation format of ISO 10646", work
+   in progress (draft-yergeau-rfc2279bis-XX) that replaces RFC 2279,
+   Janyary 1998
+
+10.2.  Informative References
+
+   <<Update the reference below>> [SASL-GSSAPI] Myers, J., "SASL GSSAPI
+   mechanisms", work in progress, draft-ietf-cat-sasl-gssapi-XX.txt,
+   September 2000
+
+   [SASL-DIGEST] Leach, P., Newman, C., Melnikov, A., "Using Digest
+   Authentication as a SASL Mechanism", work in progress, draft-ietf-
+   sasl-rfc2831bis-XX.txt, replaces RFC 2831
+
+   [SASL-OTP] Newman, C., "The One-Time-Password SASL Mechanism", RFC
+   2444, October 1998
+
+   [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, April
+   2001
+
+   [SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication",
+   RFC 2554, March 1999
+
+   [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data
+   Encodings", RFC 3548, July 2003
+
+   [RFC-INSTRUCTIONS] Postel, Reynolds, "Instructions to RFC Authors",
+   RFC 2223, October 1997
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 17]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   [IANA-SASL]  IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
+   MECHANISMS", http://www.iana.org/assignments/sasl-mechanisms.
+
+11.   Editor's Address
+
+     Alexey Melnikov
+     Isode
+
+     Email: Alexey.Melnikov at isode.com
+
+12.   Acknowledgments
+
+   This document is a revision of RFC 2222 written by John G. Myers.  He
+   also contributed significantly to this revision.
+
+   Magnus Nystrom provided the ASCII art used in Section 6.3.
+
+   Definition of realm was extracted from RFC 2617 ("HTTP
+   Authentication: Basic and Digest Access Authentication").
+
+   Contributions of many members of the SASL mailing list are gratefully
+   acknowledged, in particular Kurt D. Zeilenga, Peter Saint-Andre, Rob
+   Siemborski, Jeffrey Hutzelman and  Hallvard B Furuseth for
+   proofreading the document and various editorial suggestions.
+
+
+13.   Full Copyright Statement
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+
+
+
+A. Melnikov                                            FORMFEED[Page 18]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+Appendix A. Relation of SASL to transport security
+
+   Questions have been raised about the relationship between SASL and
+   various services (such as IPsec and TLS) which provide a secured
+   connection.
+
+   Two of the key features of SASL are:
+
+      The separation of the authorization identity from the identity in
+      the client's credentials.  This permits agents such as proxy
+      servers to authenticate using their own credentials, yet request
+      the access privileges of the identity for which they are proxying.
+
+      Upon successful completion of an authentication exchange, the
+      server knows the authorization identity the client wishes to use.
+      This allows servers to move to a "user is authenticated" state in
+      the protocol.
+
+   These features are extremely important to some application protocols,
+   yet Transport Security services do not always provide them.  To
+   define SASL mechanisms based on these services would be a very messy
+   task, as the framing of these services would be redundant with the
+   framing of SASL and some method of providing these important SASL
+   features would have to be devised.
+
+   Sometimes it is desired to enable within an existing connection the
+   use of a security service which does not fit the SASL model.  (TLS is
+   an example of such a service.)  This can be done by adding a command,
+   for example "STARTTLS", to the protocol.  Such a command is outside
+   the scope of SASL, and should be different from the command which
+   starts a SASL authentication protocol exchange.
+
+   In certain situations, it is reasonable to use SASL underneath one of
+   these Transport Security services.  The transport service would
+   secure the connection, either service would authenticate the client,
+   and SASL would negotiate the authorization identity.  The SASL
+   negotiation would be what moves the protocol from "unauthenticated"
+
+
+
+A. Melnikov                                            FORMFEED[Page 19]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   to "authenticated" state.  The "EXTERNAL" SASL mechanism is
+   explicitly intended to handle the case where the transport service
+   secures the connection and authenticates the client and SASL
+   negotiates the authorization identity.
+
+Appendix B. Changes since RFC 2222
+
+   The GSSAPI mechanism was removed.  It is now specified in a separate
+   document [SASL-GSSAPI].
+
+   The "KERBEROS_V4" mechanism defined in RFC 2222 is obsolete and has
+   been removed.
+
+   The "SKEY" mechanism described in RFC 2222 is obsolete and has been
+   removed.  It has been replaced by the OTP mechanism [SASL-OTP].
+
+   The overview has been substantially reorganized and clarified.
+
+   Clarified the definition and semantics of the authorization identity.
+
+   Prohibited the NUL character in authorization identities.
+
+   Added a section on character string issues.
+
+   The word "must" in the first paragraph of the "Protocol profile
+   requirements" section was changed to "MUST".
+
+   Specified that protocol profiles SHOULD provide a way for clients to
+   discover available SASL mechanisms.
+
+   Made the requirement that protocol profiles specify the semantics of
+   the authorization identity optional to the protocol profile.
+   Clarified that such a specification is a refinement of the definition
+   in the base SASL spec.
+
+   Added a requirement discouraging protocol profiles from breaking the
+   separation between protocol and mechanism.
+
+   Mentioned that standards track documents may carve out their own
+   portions of the SASL mechanism namespace and may amend registration
+   rules for the portion. However registration of individual SASL
+   mechanisms is still required.
+
+   Specified that the authorization identity in the EXTERNAL mechanism
+   is encoded in UTF-8.
+
+   Added a statement that a protocol profile SHOULD allow challenge data
+   to be sent with a success indication.
+
+
+
+A. Melnikov                                            FORMFEED[Page 20]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   Added a security consideration for the EXTERNAL mechansim.
+
+   Clarified sections concerning success with additional data.
+
+   Cleaned up IANA considerations/registrations and assembled them in
+   one place.
+
+   Updated references and split them into Informative and Normative.
+
+   Added text to the Security Considerations section regarding handling
+   of extremely large SASL blocks.
+
+   Replaced UTF-8 ABNF with the reference to the UTF-8 document.
+
+   Added text about SASLPrep for authentication identities and
+   passwords.  Described where SASLPrep preparation should take place.
+
+   Added paragraph about verifying authorization identities.
+
+   This document requires to drop a security layer on reauthentication
+   when no security layer is negotiated. This differs from RFC 2222,
+   which required to keep the last security layer in this case.
+
+   Added a protocol profile requirement to specify interaction between
+   SASL and TLS security layers.
+
+   Added a protocol profile requirement to specify if it supports
+   reauthentication.
+
+   Removed the text that seemed to suggest that SASL security layer must
+   not be used when TLS is available.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+A. Melnikov                                            FORMFEED[Page 21]
+
+
+
+
+
+Internet DRAFT                    SASL                   18 October 2003
+
+
+   Status of this Memo .......................................... i
+   1.    Abstract ............................................... 2
+   2.    Organization of this document .......................... 2
+   2.1.  How to read this document .............................. 2
+   2.2.  Conventions used in this document ...................... 2
+   3.    Overview ............................................... 3
+   4.    Authentication mechanisms .............................. 3
+   4.1.  Authentication protocol exchange ....................... 4
+   4.2.  Authorization identities and proxy authentication ...... 4
+   4.3.  Security layers ........................................ 6
+   4.4.  Character string issues ................................ 6
+   5.    Protocol profile requirements .......................... 6
+   6.    Specific issues ........................................ 8
+   6.1.  Client sends data first ................................ 8
+   6.2.  Server returns success with additional data ............ 8
+   6.3.  Multiple authentications ............................... 9
+   7.    The EXTERNAL mechanism ................................ 11
+   7.1.  Formal syntax ......................................... 12
+   7.2.  Example ............................................... 12
+   8.    IANA Considerations ................................... 12
+   8.1.  Guidelines for IANA ................................... 13
+   8.2.  Registration procedure ................................ 13
+   8.3.  Comments on SASL mechanism registrations .............. 13
+   8.4.  Change control ........................................ 14
+   8.5.  Registration template ................................. 14
+   8.6.  The EXTERNAL mechanism registration ................... 15
+   9.   Security considerations ................................ 15
+   10.    References ........................................... 16
+   10.1.  Normative References ................................. 16
+   10.2.  Informative References ............................... 17
+   11.   Editor's Address ...................................... 18
+   12.   Acknowledgments ....................................... 18
+   13.   Full Copyright Statement .............................. 18
+   Appendix A. Relation of SASL to transport security .......... 19
+   Appendix B. Changes since RFC 2222 .......................... 20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+A. Melnikov                                            FORMFEED[Page ii]
+
+
diff --git a/doc/draft-ietf-sasl-rfc2831bis-xx.txt b/doc/draft-ietf-sasl-rfc2831bis-xx.txt
new file mode 100644
index 0000000..dd3b9b0
--- /dev/null
+++ b/doc/draft-ietf-sasl-rfc2831bis-xx.txt
@@ -0,0 +1,2340 @@
+
+
+
+
+
+
+INTERNET-DRAFT                                                  P. Leach
+Obsoletes: 2831                                                Microsoft
+Intended category: Standards track                             C. Newman
+                                                        Sun Microsystems
+                                                             A. Melnikov
+                                                                   Isode
+                                                               June 2003
+
+            Using Digest Authentication as a SASL Mechanism
+                   draft-ietf-sasl-rfc2831bis-02.txt
+
+Status of this Memo
+
+   This document is an Internet-Draft and is in full conformance with
+   all provisions of Section 10 of RFC 2026.
+
+   Internet-Drafts are working documents of the Internet Engineering
+   Task Force (IETF), its areas, and its working groups. Note that other
+   groups may also distribute working documents as Internet-Drafts.
+
+   Internet-Drafts are draft documents valid for a maximum of six months
+   and may be updated, replaced, or obsoleted by other documents at any
+   time. It is inappropriate to use Internet-Drafts as reference
+   material or to cite them other than as "work in progress."
+
+   The list of current Internet-Drafts can be accessed at
+   http://www.ietf.org/ietf/1id-abstracts.txt
+
+   The list of Internet-Draft Shadow Directories can be accessed at
+   http://www.ietf.org/shadow.html.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+Abstract
+
+   This specification defines how HTTP Digest Authentication [Digest]
+   can be used as a SASL [RFC 2222] mechanism for any protocol that has
+   a SASL profile. It is intended both as an improvement over CRAM-MD5
+   [RFC 2195] and as a convenient way to support a single authentication
+   mechanism for web, mail, LDAP, and other protocols.
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 1]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+Table of Contents
+
+   1 INTRODUCTION.....................................................3
+    1.1 CONVENTIONS AND NOTATION......................................3
+    1.2 REQUIREMENTS..................................................4
+   2 AUTHENTICATION...................................................5
+    2.1 INITIAL AUTHENTICATION........................................5
+     2.1.1 Step One...................................................5
+     2.1.2 Step Two...................................................9
+     2.1.3 Step Three................................................16
+    2.2 SUBSEQUENT AUTHENTICATION....................................17
+     2.2.1 Step one..................................................17
+     2.2.2 Step Two..................................................17
+    2.3 INTEGRITY PROTECTION.........................................18
+    2.4 CONFIDENTIALITY PROTECTION...................................18
+   3 SECURITY CONSIDERATIONS.........................................21
+    3.1 AUTHENTICATION OF CLIENTS USING DIGEST AUTHENTICATION........21
+    3.2 COMPARISON OF DIGEST WITH PLAINTEXT PASSWORDS................21
+    3.3 REPLAY ATTACKS...............................................21
+    3.4 ONLINE DICTIONARY ATTACKS....................................22
+    3.5 OFFLINE DICTIONARY ATTACKS...................................22
+    3.6 MAN IN THE MIDDLE............................................22
+    3.7 CHOSEN PLAINTEXT ATTACKS.....................................22
+    3.8 CBC MODE ATTACKS.............................................
+    3.9 SPOOFING BY COUNTERFEIT SERVERS..............................23
+    3.10 STORING PASSWORDS...........................................23
+    3.11 MULTIPLE REALMS.............................................24
+    3.12 SUMMARY.....................................................24
+   4 EXAMPLE.........................................................24
+   5 REFERENCES......................................................26
+    5.1 NORMATIVE REFERENCES.........................................26
+    5.2 INFORMATIVE REFERENCES.......................................27
+   6 AUTHORS' ADDRESSES..............................................28
+   7 ABNF............................................................29
+    7.1 AUGMENTED BNF................................................29
+    7.2 BASIC RULES..................................................31
+   8 SAMPLE CODE.....................................................33
+   9 INTEROPERABILITY CONSIDERATIONS.................................34
+    9.1 Implementing DES cipher in CBC mode..........................34
+   10  ACKNOWLEDGEMENTS..............................................34
+   11 FULL COPYRIGHT STATEMENT.......................................35
+   Appendix A: Changes from 2831.....................................36
+   Appendix B: Open Issues...........................................37
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 2]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+1  Introduction
+
+   This specification describes the use of HTTP Digest Access
+   Authentication as a SASL mechanism. The authentication type
+   associated with the Digest SASL mechanism is "DIGEST-MD5".
+
+   This specification is intended to be upward compatible with the
+   "md5-sess" algorithm of HTTP/1.1 Digest Access Authentication
+   specified in [Digest]. The only difference in the "md5-sess"
+   algorithm is that some directives not needed in a SASL mechanism have
+   had their values defaulted.
+
+   There is one new feature for use as a SASL mechanism: integrity
+   protection on application protocol messages after an authentication
+   exchange.
+
+   Also, compared to CRAM-MD5, DIGEST-MD5 prevents chosen plaintext
+   attacks, and permits the use of third party authentication servers,
+   mutual authentication, and optimized reauthentication if a client has
+   recently authenticated to a server.
+
+1.1  Conventions and Notation
+
+   This specification uses the same ABNF notation and lexical
+   conventions as HTTP/1.1 specification; see section 7.
+
+   Let { a, b, ... } be the concatenation of the octet strings a, b, ...
+
+   Let ** denote the power operation.
+
+   Let H(s) be the 16 octet MD5 hash [RFC 1321] of the octet string s.
+
+   Let KD(k, s) be H({k, ":", s}), i.e., the 16 octet hash of the string
+   k, a colon and the string s.
+
+   Let HEX(n) be the representation of the 16 octet MD5 hash n as a
+   string of 32 hex digits (with alphabetic characters always in lower
+   case, since MD5 is case sensitive).
+
+   Let HMAC(k, s) be the 16 octet HMAC-MD5 [RFC 2104] of the octet
+   string s using the octet string k as a key.
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 3]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   Let unq(X) be the value of the quoted-string X without the
+   surrounding quotes and with all escape characters "\\" removed. For
+   example for the quoted-string "Babylon" the value of unq("Babylon")
+   is Babylon; for the quoted string "ABC\"123\\" the value of
+   unq("ABC\"123\\") is ABC"123\.
+
+   The value of a quoted string constant as an octet string does not
+   include any terminating null character.
+
+1.2  Requirements
+
+   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+   document are to be interpreted as described in RFC 2119 [RFC 2119].
+
+   An implementation is not compliant if it fails to satisfy one or more
+   of the MUST level requirements for the protocols it implements. An
+   implementation that satisfies all the MUST level and all the SHOULD
+   level requirements for its protocols is said to be "unconditionally
+   compliant"; one that satisfies all the MUST level requirements but
+   not all the SHOULD level requirements for its protocols is said to be
+   "conditionally compliant."
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 4]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+2  Authentication
+
+   The following sections describe how to use Digest as a SASL
+   authentication mechanism.
+
+2.1  Initial Authentication
+
+   If the client has not recently authenticated to the server, then it
+   must perform "initial authentication", as defined in this section. If
+   it has recently authenticated, then a more efficient form is
+   available, defined in the next section.
+
+2.1.1  Step One
+
+   The server starts by sending a challenge. The data encoded in the
+   challenge contains a string formatted according to the rules for a
+   "digest-challenge" defined as follows:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 5]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   digest-challenge  =
+         1#( realm | nonce | qop-options | stale | server_maxbuf | charset
+               algorithm | cipher-opts | auth-param )
+
+        realm             = "realm" "=" <"> realm-value <">
+        realm-value       = qdstr-val
+        nonce             = "nonce" "=" <"> nonce-value <">
+        nonce-value       = *qdtext
+        qop-options       = "qop" "=" <"> qop-list <">
+        qop-list          = 1#qop-value
+        qop-value         = "auth" | "auth-int" | "auth-conf" |
+                             token
+        stale             = "stale" "=" "true"
+        server_maxbuf     = "maxbuf" "=" maxbuf-value
+        maxbuf-value      = 1*DIGIT
+        charset           = "charset" "=" "utf-8"
+        algorithm         = "algorithm" "=" "md5-sess"
+        cipher-opts       = "cipher" "=" <"> 1#cipher-value <">
+        cipher-value      = "3des" | "des" | "rc4-40" | "rc4" |
+                            "rc4-56" | "aes" | token
+        auth-param        = token "=" ( token | quoted-string )
+
+   The meanings of the values of the directives used above are as
+   follows:
+
+   realm
+      Mechanistically, a string which can enable users to know which
+      username and password to use, in case they might have different
+      ones for different servers. Conceptually, it is the name of a
+      collection of accounts that might include the user's account. This
+      string should contain at least the name of the host performing the
+      authentication and might additionally indicate the collection of
+      users who might have access. An example might be
+      "registered_users at gotham.news.example.com".  This directive is
+      optional; if not present, the client SHOULD solicit it from the
+      user or be able to compute a default; a plausible default might be
+      the realm supplied by the user when they logged in to the client
+      system.  Multiple realm directives are allowed, in which case the
+      user or client must choose one as the realm for which to supply to
+      username and password.
+
+      If at least one realm is present and the charset directive is also
+      specified (which means that realm(s) are encoded as UTF-8), the
+      client should prepare each instance of realm using the "SASLPrep"
+      profile [SASLPrep] of the "stringprep" algorithm [StringPrep]. If
+      preparation of a realm instance fails or results in an empty
+      string, the client should abort the authentication exchange.
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 6]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   nonce
+      A server-specified data string which MUST be different each time a
+      digest-challenge is sent as part of initial authentication.  It is
+      recommended that this string be base64 or hexadecimal data. Note
+      that since the string is passed as a quoted string, the
+      double-quote character is not allowed unless escaped (see section
+      7.2). The contents of the nonce are implementation dependent. The
+      security of the implementation depends on a good choice. It is
+      RECOMMENDED that it contain at least 64 bits of entropy. The nonce
+      is opaque to the client. This directive is required and MUST
+      appear exactly once; if not present, or if multiple instances are
+      present, the client should abort the authentication exchange.
+
+   qop-options
+      A quoted string of one or more tokens indicating the "quality of
+      protection" values supported by the server.  The value "auth"
+      indicates authentication; the value "auth-int" indicates
+      authentication with integrity protection; the value "auth-conf"
+      indicates authentication with integrity protection and encryption.
+      This directive is optional; if not present it defaults to "auth".
+      The client MUST ignore unrecognized options; if the client
+      recognizes no option, it should abort the authentication exchange.
+
+   stale
+      The "stale" directive is not used in initial authentication. See
+      the next section for its use in subsequent authentications. This
+      directive may appear at most once; if multiple instances are
+      present, the client should abort the authentication exchange.
+
+   server_maxbuf ("maximal ciphertext buffer size")
+      A number indicating the size of the largest buffer the server is
+      able to receive when using "auth-int" or "auth-conf". The value
+      MUST be bigger than 16 and smaller or equal to 16777215 (i.e.
+      2**24-1). If this directive is missing, the default value is
+      65536. This directive may appear at most once; if multiple
+      instances are present, the client MUST abort the authentication
+      exchange.
+
+      Let call "maximal cleartext buffer size" (or "maximal sender
+      size") the maximal size of a cleartext buffer that, after being
+      transformed by integrity (section 2.3) or confidentiality (section
+      2.4) protection function, will produce a SASL block of the maxbuf
+      size.  As it should be clear from the name, the sender MUST never
+      pass a block of data bigger than the "maximal sender size" through
+      the selected protection function.  This will guaranty that the
+      receiver will never get a block bigger than the maxbuf.
+
+
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 7]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   charset
+      This directive, if present, specifies that the server supports
+      UTF-8 [UTF-8] encoding for the username, realm and password. If
+      present, the username, realm and password are in Unicode, prepared
+      using the "SASLPrep" profile [SASLPrep] of the "stringprep"
+      algorithm [StringPrep] and than encoded as UTF-8 [UTF-8].  If not
+      present, the username, realm and password MUST be encoded in ISO
+      8859-1 [ISO-8859] (of which US-ASCII [USASCII] is a subset). The
+      directive is needed for backwards compatibility with HTTP Digest,
+      which only supports ISO 8859-1.  This directive may appear at most
+      once; if multiple instances are present, the client should abort
+      the authentication exchange.
+
+      Note, that this directive doesn't affect authorization id
+      ("authzid").
+
+   algorithm
+      This directive is required for backwards compatibility with HTTP
+      Digest, which supports other algorithms. This directive is
+      required and MUST appear exactly once; if not present, or if
+      multiple instances are present, the client should abort the
+      authentication exchange.
+
+   cipher-opts
+      A list of ciphers that the server supports. This directive must be
+      present exactly once if "auth-conf" is offered in the
+      "qop-options" directive, in which case the "3des" cipher is
+      mandatory-to-implement. The client MUST ignore unrecognized
+      options; if the client recognizes no option, it should abort the
+      authentication exchange. See section 2.4 for more detailed
+      description of the ciphers.
+
+      des
+         the Data Encryption Standard (DES) cipher [FIPS] in cipher
+         block chaining (CBC) mode with a 56 bit key.
+
+      3des
+         the "triple DES" cipher in CBC mode with EDE
+         (Encrypt,Decrypt,Encrypt) with the same key for each E stage
+         (aka "two keys mode") for a total key length of 112 bits.
+
+      rc4, rc4-40, rc4-56
+         the RC4 cipher with a 128 bit, 40 bit, and 56 bit key,
+         respectively.
+
+      aes
+         the Advanced Encryption Standard (AES) cipher [AES] in cipher
+         block chaining (CBC) mode with a 128 bit key. This mode
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 8]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+         requires an Initialization Vector (IV) that has the same size
+         as the block size.
+
+   auth-param
+      This construct allows for future extensions; it may appear more
+      than once. The client MUST ignore any unrecognized directives.
+
+   For use as a SASL mechanism, note that the following changes are made
+   to "digest-challenge" from HTTP: the following Digest options (called
+   "directives" in HTTP terminology) are unused (i.e., MUST NOT be sent,
+   and MUST be ignored if received):
+
+    opaque
+    domain
+
+   The size of a digest-challenge MUST be less than 2048 bytes.
+
+2.1.2  Step Two
+
+   The client makes note of the "digest-challenge" and then responds
+   with a string formatted and computed according to the rules for a
+   "digest-response" defined as follows:
+
+   digest-response  = 1#( username | realm | nonce | cnonce |
+                          nonce-count | qop | digest-uri | response |
+                          client_maxbuf | charset | cipher | authzid |
+                          auth-param )
+
+       username         = "username" "=" <"> username-value <">
+       username-value   = qdstr-val
+       cnonce           = "cnonce" "=" <"> cnonce-value <">
+       cnonce-value     = *qdtext
+       nonce-count      = "nc" "=" nc-value
+       nc-value         = 8LHEX
+       client_maxbuf    = "maxbuf" "=" maxbuf-value
+       qop              = "qop" "=" qop-value
+       digest-uri       = "digest-uri" "=" <"> digest-uri-value <">
+       digest-uri-value  = serv-type "/" host [ "/" serv-name ]
+       serv-type        = 1*ALPHA
+       serv-name        = host
+       response         = "response" "=" response-value
+       response-value   = 32LHEX
+       LHEX             = "0" | "1" | "2" | "3" |
+                          "4" | "5" | "6" | "7" |
+                          "8" | "9" | "a" | "b" |
+                          "c" | "d" | "e" | "f"
+       cipher           = "cipher" "=" cipher-value
+       authzid          = "authzid" "=" <"> authzid-value <">
+
+
+
+Leach & Newman           Expires: December 2003                 [Page 9]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+       authzid-value    = qdstr-val
+
+   The 'host' non-terminal is defined in [RFC 2732] as
+
+       host          = hostname | IPv4address | IPv6reference
+       ipv6reference = "[" IPv6address "]"
+
+   where IPv6address and IPv4address are defined in [RFC 2373]
+   and 'hostname' is defined in [RFC 2396].
+
+   username
+      The user's name in the specified realm, encoded according to the
+      value of the "charset" directive. This directive is required and
+      MUST be present exactly once; otherwise, authentication fails.
+
+      Upon the receipt of this value and if the charset directive is
+      also specified (which means that the username is encoded as
+      UTF-8), the server MUST prepare the username using the "SASLPrep"
+      profile [SASLPrep] of the "stringprep" algorithm [StringPrep]. If
+      preparation of the username fails or results in an empty string,
+      the server MUST fail the authentication exchange.
+
+   realm
+      The realm containing the user's account, encoded according to the
+      value of the "charset" directive. This directive is required if
+      the server provided any realms in the
+      "digest-challenge", in which case it may appear exactly once and
+      its value SHOULD be one of those realms. If the directive is
+      missing, "realm-value" will set to the empty string when computing
+      A1 (see below for details).
+
+      If realm was provided by the client and if the charset directive
+      was also specified (which means that the realm is encoded as
+      UTF-8), the server MUST prepare the realm using the "SASLPrep"
+      profile [SASLPrep] of the "stringprep" algorithm [StringPrep]. If
+      preparation of the realm fails or results in an empty string, the
+      server MUST fail the authentication exchange.
+
+   nonce
+      The server-specified data string received in the preceding digest-
+      challenge.  This directive is required and MUST be present exactly
+      once; otherwise, authentication fails.
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 10]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   cnonce
+      A client-specified data string which MUST be different each time a
+      digest-response is sent as part of initial authentication. The
+      cnonce-value is an opaque quoted string value provided by the
+      client and used by both client and server to avoid chosen
+      plaintext attacks, and to provide mutual authentication. The
+      security of the implementation depends on a good choice. It is
+      RECOMMENDED that it contain at least 64 bits of entropy. This
+      directive is required and MUST be present exactly once; otherwise,
+      authentication fails.
+
+   nonce-count
+      The nc-value is the hexadecimal count of the number of requests
+      (including the current request) that the client has sent with the
+      nonce value in this request.  For example, in the first request
+      sent in response to a given nonce value, the client sends
+      "nc=00000001".  The purpose of this directive is to allow the
+      server to detect request replays by maintaining its own copy of
+      this count - if the same nc-value is seen twice, then the request
+      is a replay. See the description below of the construction of the
+      response value. This directive is required and MUST be present
+      exactly once; otherwise, authentication fails.
+
+   qop
+      Indicates what "quality of protection" the client accepted. If
+      present, it may appear exactly once and  its value MUST be one of
+      the alternatives in qop-options. If not present, it defaults to
+      "auth".  These values affect the computation of the response. Note
+      that this is a single token, not a quoted list of alternatives.
+
+   serv-type
+      Indicates the type of service, such as "http" for web service,
+      "ftp" for FTP service, "smtp" for mail delivery service, etc. The
+      service name as defined in the SASL profile for the protocol see
+      section 4 of [RFC 2222], registered in the IANA registry of
+      "service" elements for the GSSAPI host-based service name form
+      [RFC 2078].
+
+   host
+      The DNS host name or IP (IPv4 or IPv6) address for the service
+      requested.  The DNS host name must be the fully-qualified
+      canonical name of the host.  The DNS host name is the preferred
+      form; see notes on server processing of the digest-uri.
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 11]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   serv-name
+      Indicates the name of the service if it is replicated. The service
+      is considered to be replicated if the client's service-location
+      process involves resolution using standard DNS lookup operations,
+      and if these operations involve DNS records (such as SRV [RFC
+      2052], or MX) which resolve one DNS name into a set of other DNS
+      names. In this case, the initial name used by the client is the
+      "serv-name", and the final name is the "host" component. For
+      example, the incoming mail service for "example.com" may be
+      replicated through the use of MX records stored in the DNS, one of
+      which points at an SMTP server called "mail3.example.com"; it's
+      "serv-name" would be "example.com", it's "host" would be
+      "mail3.example.com". If the service is not replicated, or the
+      serv-name is identical to the host, then the serv-name component
+      MUST be omitted.
+
+   digest-uri
+      Indicates the principal name of the service with which the client
+      wishes to connect, formed from the serv-type, host, and serv-name.
+      For example, the FTP service on "ftp.example.com" would have a
+      "digest-uri" value of "ftp/ftp.example.com"; the SMTP server from
+      the example above would have a "digest-uri" value of
+      "SMTP/mail3.example.com/example.com".
+
+   Servers SHOULD check that the supplied value is correct. This will
+   detect accidental connection to the incorrect server, as well as some
+   redirection attacks. It is also so that clients will be trained to
+   provide values that will work with implementations that use a shared
+   back-end authentication service that can provide server
+   authentication.
+
+   The serv-type component should match the service being offered. The
+   host component should match one of the host names of the host on
+   which the service is running, or it's IP address. Servers SHOULD NOT
+   normally support the IP address form, because server authentication
+   by IP address is not very useful; they should only do so if the DNS
+   is unavailable or unreliable. The serv-name component should match
+   one of the service's configured service names.
+
+   This directive may appear at most once; if multiple instances are
+   present, the client should abort the authentication exchange.
+
+   Note: In the HTTP use of Digest authentication, the digest-uri is the
+   URI (usually a URL) of the resource requested -- hence the name of
+   the directive.
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 12]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   response
+      A string of 32 hex digits computed as defined below, which proves
+      that the user knows a password. This directive is required and
+      MUST be present exactly once; otherwise, authentication fails.
+
+   client_maxbuf
+      A number indicating the size of the largest ciphertext buffer the
+      client is able to receive when using "auth-int" or "auth-conf". If
+      this directive is missing, the default value is 65536. This
+      directive may appear at most once; if multiple instances are
+      present, the server MUST abort the authentication exchange. If the
+      value is less or equal to 16 or bigger than 16777215 (i.e.
+      2**24-1), the server MUST abort the authentication exchange.
+
+      Upon processing/sending of the client_maxbuf value both the server
+      and the client calculate their "maximal ciphertext buffer size" as
+      the minimum of the server_maxbuf (Step One) and the client_maxbuf
+      (Step Two).  The "maximal sender size" can be calculated by
+      subtracting 16 from the calculated "maximal ciphertext buffer
+      size".
+
+      When sending a block of data the client/server MUST NOT pass more
+      than the "maximal sender size" bytes of data to the selected
+      protection function (2.3 or 2.4).
+
+   charset
+      This directive, if present, specifies that the client has used
+      UTF-8 [UTF-8] encoding for the username, realm and password. If
+      present, the username, realm and password are in Unicode, prepared
+      using the "SASLPrep" profile [SASLPrep] of the "stringprep"
+      algorithm [StringPrep] and than encoded as UTF-8 [UTF-8].  If not
+      present, the username and password must be encoded in ISO 8859-1
+      [ISO-8859] (of which
+      US-ASCII [USASCII] is a subset). The client should send this
+      directive only if the server has indicated it supports UTF-8
+      [UTF-8]. The directive is needed for backwards compatibility with
+      HTTP Digest, which only supports ISO 8859-1.
+
+      Note, that this directive doesn't affect authorization id
+      ("authzid").
+
+   LHEX
+      32 hex digits, where the alphabetic characters MUST be lower case,
+      because MD5 is not case insensitive.
+
+   cipher
+      The cipher chosen by the client. This directive MUST appear
+      exactly once if "auth-conf" is negotiated; if required and not
+
+
+
+Leach & Newman           Expires: December 2003                [Page 13]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+      present, authentication fails.
+
+   authzid
+      The "authorization ID" directive is optional. If present, and the
+      authenticating user has sufficient privilege, and the server
+      supports it, then after authentication the server will use this
+      identity for making all accesses and access checks. If the client
+      specifies it, and the server does not support it, then the
+      response-value calculated on the server will not match the one
+      calculated on the client and authentication will fail.
+
+      The authzid MUST NOT be an empty string.
+
+      The authorization identifier MUST NOT be converted to ISO 8859-1
+      even if the authentication identifier ("username") is converted
+      for compatibility as directed by "charset" directive.
+
+      The server SHOULD verify the correctness of an authzid as
+      specified by the corresponding SASL protocol profile.
+
+   The size of a digest-response MUST be less than 4096 bytes.
+
+2.1.2.1   Response-value
+
+   The definition of "response-value" above indicates the encoding for
+   its value -- 32 lower case hex characters. The following definitions
+   show how the value is computed.
+
+   Although qop-value and components of digest-uri-value may be
+   case-insensitive, the case which the client supplies in step two is
+   preserved for the purpose of computing and verifying the
+   response-value.
+
+      response-value  =
+         HEX( KD ( HEX(H(A1)),
+                 { nonce-value, ":" nc-value, ":",
+                   cnonce-value, ":", qop-value, ":", HEX(H(A2)) }))
+
+   If authzid is specified, then A1 is
+
+
+      A1 = { H( { unq(username-value), ":", unq(realm-value), ":", passwd } ),
+           ":", nonce-value, ":", cnonce-value, ":", unq(authzid-value) }
+
+   If authzid is not specified, then A1 is
+
+
+      A1 = { H( { unq(username-value), ":", unq(realm-value), ":", passwd } ),
+
+
+
+Leach & Newman           Expires: December 2003                [Page 14]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+           ":", nonce-value, ":", cnonce-value }
+
+   where
+
+         passwd   = *OCTET
+
+   The "username-value", "realm-value" and "passwd" are encoded
+   according to the value of the "charset" directive. If "charset=UTF-8"
+   is present, and all the characters of "username-value" are, after
+   preparing using the "SASLPrep" profile [SASLPrep] of the "stringprep"
+   algorithm [StringPrep], in the ISO 8859-1 character set, then it must
+   be converted to ISO 8859-1 before being hashed. The same
+   transformation has to be done for "realm-value" and "passwd". This is
+   so that authentication databases that store the hashed username,
+   realm and password (which is common) can be shared compatibly with
+   HTTP, which specifies ISO 8859-1. A sample implementation of this
+   conversion is in section 8.
+
+   If the "qop" directive's value is "auth", then A2 is:
+
+      A2       = { "AUTHENTICATE:", digest-uri-value }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 15]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   If the "qop" value is "auth-int" or "auth-conf" then A2 is:
+
+      A2       = { "AUTHENTICATE:", digest-uri-value,
+               ":00000000000000000000000000000000" }
+
+   Note that "AUTHENTICATE:" must be in upper case, and the second
+   string constant is a string with a colon followed by 32 zeros.
+
+   These apparently strange values of A2 are for compatibility with
+   HTTP; they were arrived at by setting "Method" to "AUTHENTICATE" and
+   the hash of the entity body to zero in the HTTP digest calculation of
+   A2.
+
+   Also, in the HTTP usage of Digest, several directives in the
+   "digest-challenge" sent by the server have to be returned by the
+   client in the "digest-response". These are:
+
+    opaque
+    algorithm
+
+   These directives are not needed when Digest is used as a SASL
+   mechanism (i.e., MUST NOT be sent, and MUST be ignored if received).
+
+2.1.3  Step Three
+
+   The server receives and validates the "digest-response". The server
+   checks that the nonce-count is "00000001". If it supports subsequent
+   authentication (see section 2.2), it saves the value of the nonce and
+   the nonce-count. It sends a message formatted as follows:
+
+    response-auth = "rspauth" "=" response-value
+
+   where response-value is calculated as above, using the values sent in
+   step two, except that if qop is "auth", then A2 is
+
+       A2 = { ":", digest-uri-value }
+
+   And if qop is "auth-int" or "auth-conf" then A2 is
+
+       A2 = { ":", digest-uri-value, ":00000000000000000000000000000000" }
+
+   Compared to its use in HTTP, the following Digest directives in the
+   "digest-response" are unused:
+
+       nextnonce
+       qop
+       cnonce
+       nonce-count
+
+
+
+Leach & Newman           Expires: December 2003                [Page 16]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+2.2  Subsequent Authentication
+
+   If the client has previously authenticated to the server, and
+   remembers the values of username, realm, nonce, nonce-count, cnonce,
+   and qop that it used in that authentication, and the SASL profile for
+   a protocol permits an initial client response, then it MAY perform
+   "subsequent authentication", as defined in this section.
+
+2.2.1  Step one
+
+   The client uses the values from the previous authentication and sends
+   an initial response with a string formatted and computed according to
+   the rules for a "digest-response", as defined above, but with a
+   nonce-count one greater than used in the last "digest-response".
+
+2.2.2  Step Two
+
+   The server receives the "digest-response". If the server does not
+   support subsequent authentication, then it sends a
+   "digest-challenge", and authentication proceeds as in initial
+   authentication. If the server has no saved nonce and nonce-count from
+   a previous authentication, then it sends a "digest-challenge", and
+   authentication proceeds as in initial authentication. Otherwise, the
+   server validates the "digest-response", checks that the nonce-count
+   is one greater than that used in the previous authentication using
+   that nonce, and saves the new value of nonce-count.
+
+   If the response is invalid, then the server sends a
+   "digest-challenge", and authentication proceeds as in initial
+   authentication (and should be configurable to log an authentication
+   failure in some sort of security audit log, since the failure may be
+   a symptom of an attack). The nonce-count MUST NOT be incremented in
+   this case: to do so would allow a denial of service attack by sending
+   an out-of-order nonce-count.
+
+   If the response is valid, the server MAY choose to deem that
+   authentication has succeeded. However, if it has been too long since
+   the previous authentication, or for any o including the next
+   subsequent authentication, between the client and the server MUST be
+   integrity protected. Using as a base session key the value of H(A1)
+   as defined above the client and server calculate a pair of message
+   integrity keys as follows.
+
+   The key for integrity protecting messages from client to server is:
+
+   Kic = MD5({H(A1),
+   "Digest session key to client-to-server signing key magic constant"})
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 17]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   The key for integrity protecting messages from server to client is:
+
+   Kis = MD5({H(A1),
+   "Digest session key to server-to-client signing key magic constant"})
+
+   where MD5 is as specified in [RFC 1321]. If message integrity is
+   negotiated, a MAC block for each message is appended to the message.
+   The MAC block is 16 bytes: the first 10 bytes of the HMAC-MD5 [RFC
+   2104] of the message, a 2-byte message type number in network byte
+   order with value 1, and the 4-byte sequence number in network byte
+   order. The message type is to allow for future extensions such as
+   rekeying.
+
+   MAC(Ki, SeqNum, msg) = (HMAC(Ki, {SeqNum, msg})[0..9], 0x0001,
+   SeqNum)
+
+   where Ki is Kic for messages sent by the client and Kis for those
+   sent by the server. The sequence number (SeqNum) is an unsigned
+   number initialized to zero after initial or subsequent
+   authentication, and incremented by one for each message
+   sent/successfully verified. (Note, that there are two independent
+   counters for sending and receiving.) The sequence number wraps around
+   to 0 after 2**32-1.
+
+   Upon receipt, MAC(Ki, SeqNum, msg) is computed and compared with the
+   received value; the message is discarded if they differ. The
+   receiver's sequence counter is incremented if they match.
+
+2.4   Confidentiality Protection
+
+   If the server sent a "cipher-opts" directive and the client responded
+   with a "cipher" directive, then subsequent messages between the
+   client and the server MUST be confidentiality protected. Using as a
+   base session key the value of H(A1) as defined above the client and
+   server calculate a pair of message integrity keys as follows.
+
+   The key for confidentiality protecting messages from client to server
+   is:
+
+   Kcc = MD5({H(A1)[0..n-1],
+   "Digest H(A1) to client-to-server sealing key magic constant"})
+
+   The key for confidentiality protecting messages from server to client
+   is:
+
+   Kcs = MD5({H(A1)[0..n-1],
+   "Digest H(A1) to server-to-client sealing key magic constant"})
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 18]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   where MD5 is as specified in [RFC 1321]. For cipher "rc4-40" n is 5;
+   for "rc4-56" n is 7; for the rest n is 16. The key for the "rc4-*"
+   and "aes" ciphers is all 16 bytes of Kcc or Kcs; the key for "des" is
+   the first 7 bytes; the key for "3des" is the first 14 bytes.
+
+   The IV used to send/receive the initial buffer of security encoded
+   data for "des" and "3des" is the last 8 bytes of Kcc or Kcs. For all
+   subsequent buffers the last 8 bytes of the ciphertext of the buffer
+   NNN is used as the IV for the buffer (NNN + 1).
+
+   The IV for the "aes" cipher in CBC mode for messages going from the
+   client to the server (IVc) consists of 16 bytes calculated as
+   follows:
+
+   IVc = MD5({Kcc, "aes-128"})
+
+   The IV for the "aes" cipher in CBC mode for messages going from the
+   server to the client (IVs) consists of 16 bytes calculated as
+   follows:
+
+   IVs = MD5({Kcs, "aes-128"})
+
+   The IV is XOR'd with the first plaintext block before it is encrypted
+   with "aes".  Then for successive blocks, the previous ciphertext
+   block is XOR'd with the current plaintext, before it is encrypted.
+
+   rc4 cipher state MUST NOT be reset before sending/receiving a next
+   buffer of security encoded data.
+
+   The MAC block is a variable length padding prefix followed by 16
+   bytes formatted as follows: the first 10 bytes of the HMAC-MD5 [RFC
+   2104] of the message, a 2-byte message type number in network byte
+   order with value 1, and the 4-byte sequence number in network byte
+   order. If the blocksize of the chosen cipher is not 1 byte, the
+   padding prefix is one or more octets each containing the number of
+   padding bytes, such that total length of the encrypted part of the
+   message is a multiple of the blocksize. The padding and first 10
+   bytes of the MAC block are encrypted with the chosen cipher along
+   with the message.
+
+   SEAL(Ki, Kc, SeqNum, msg) =
+         {CIPHER(Kc, {msg, pad, HMAC(Ki, {SeqNum, msg})[0..9]}), 0x0001,
+          SeqNum}
+
+   where CIPHER is the chosen cipher, Ki and Kc are Kic and Kcc for
+   messages sent by the client and Kis and Kcs for those sent by the
+   server. The sequence number (SeqNum) is an unsigned number
+   initialized to zero after initial or subsequent authentication, and
+
+
+
+Leach & Newman           Expires: December 2003                [Page 19]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   incremented by one for each message sent/successfully verified.
+   (Note, that there are two independent counters for sending and
+   receiving.) The sequence number wraps around to 0 after 2**32-1.
+
+   Upon receipt, the message is decrypted, HMAC(Ki, {SeqNum, msg}) is
+   computed and compared with the received value; the padding is
+   verified.  The message is discarded if the received and the
+   calculated HMACs differ and/or the padding is invalid. See also
+   section 3.8 for important information about MAC and padding
+   verification. The receiver's sequence counter is then compared with
+   the received SeqNum value; the message is discarded if they differ.
+   The receiver's sequence counter is incremented if they match.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 20]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+3  Security Considerations
+
+   General SASL security considerations apply to this mechanism.
+   "stringprep" and Unicode security considerations also apply.
+
+   Detailed discussion of other DIGEST-MD5 specific security issues is
+   below.
+
+3.1   Authentication of Clients using Digest Authentication
+
+   Digest Authentication does not provide a strong authentication
+   mechanism, when compared to public key based mechanisms, for example.
+   However, since it prevents chosen plaintext attacks, it is stronger
+   than (e.g.) CRAM-MD5, which has been proposed for use with ACAP [RFC
+   2244], POP and IMAP [RFC 2195]. It is intended to replace the much
+   weaker and even more dangerous use of plaintext passwords; however,
+   since it is still a password based mechanism it avoids some of the
+   potential deployabilty issues with public-key, OTP or similar
+   mechanisms.
+
+   Digest Authentication offers no confidentiality protection beyond
+   protecting the actual password. All of the rest of the challenge and
+   response are available to an eavesdropper, including the user's name
+   and authentication realm.
+
+3.2   Comparison of Digest with Plaintext Passwords
+
+   The greatest threat to the type of transactions for which these
+   protocols are used is network snooping. This kind of transaction
+   might involve, for example, online access to a mail service whose use
+   is restricted to paying subscribers. With plaintext password
+   authentication an eavesdropper can obtain the password of the user.
+   This not only permits him to access anything in the database, but,
+   often worse, will permit access to anything else the user protects
+   with the same password.
+
+3.3   Replay Attacks
+
+   Replay attacks are defeated if the client or the server chooses a
+   fresh nonce for each authentication, as this specification requires.
+
+   As a security precaution, the server, when verifying a response from
+   the client, must use the original server nonce ("nonce") it sent, not
+   the one returned by the client in the response, as it might have been
+   modified by an attacker.
+
+   To prevent some redirection attacks it is recommended that the server
+   verifies that the "serv-type" part of the "digest-uri" matches the
+
+
+
+Leach & Newman           Expires: December 2003                [Page 21]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   service name and that the hostname/IP address belongs to the server.
+
+3.4  Online dictionary attacks
+
+   If the attacker can eavesdrop, then it can test any overheard
+   nonce/response pairs against a (potentially very large) list of
+   common words. Such a list is usually much smaller than the total
+   number of possible passwords. The cost of computing the response for
+   each password on the list is paid once for each challenge.
+
+   The server can mitigate this attack by not allowing users to select
+   passwords that are in a dictionary.
+
+3.5  Offline dictionary attacks
+
+   If the attacker can choose the challenge, then it can precompute the
+   possible responses to that challenge for a list of common words. Such
+   a list is usually much smaller than the total number of possible
+   passwords. The cost of computing the response for each password on
+   the list is paid just once.
+
+   Offline dictionary attacks are defeated if the client chooses a fresh
+   nonce for each authentication, as this specification requires.
+
+3.6  Man in the Middle
+
+   Digest authentication is vulnerable to "man in the middle" (MITM)
+   attacks. Clearly, a MITM would present all the problems of
+   eavesdropping. But it also offers some additional opportunities to
+   the attacker.
+
+   A possible man-in-the-middle attack would be to substitute a weaker
+   qop scheme for the one(s) sent by the server; the server will not be
+   able to detect this attack. For this reason, the client should always
+   use the strongest scheme that it understands from the choices
+   offered, and should never choose a scheme that does not meet its
+   minimum requirements.
+
+   A man-in-the-middle attack may also make the client and the server
+   that agreed to use confidentiality protection to use different (and
+   possibly weaker) cipher's. This is because the chosen cipher is not
+   used in the shared secret calculation.
+
+3.7  Chosen plaintext attacks
+
+   A chosen plaintext attack is where a MITM or a malicious server can
+   arbitrarily choose the challenge that the client will use to compute
+   the response. The ability to choose the challenge is known to make
+
+
+
+Leach & Newman           Expires: December 2003                [Page 22]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   cryptanalysis much easier [MD5].
+
+   However, Digest does not permit the attack to choose the challenge as
+   long as the client chooses a fresh nonce for each authentication, as
+   this specification requires.
+
+3.8  CBC Mode attacks
+
+   The following attack can be launched when the connection uses
+   Confidentiality protection with ciphers in CBC mode. If bad padding
+   is treated differently from bad MACs when decrypting a DIGEST-MD5
+   buffer of security encoded data, the attacker may be able to launch
+   Vaudenay's attack on padding.
+
+   An error logfile will suffice to launch the attack if it reveals the
+   type of error -- even if file permissions prevent the attacker from
+   actually reading the file (the file length increase cause by the
+   attack is likely to reveal which of the two errors occured).
+
+   A different approach to distinguish these two error cases and launch
+   the attack is to examine the timing of error responses: if the MAC
+   verification is skipped when bad padding has been found, the error
+   will appear quicker in the case of incorrect block cipher padding
+   than in the case of an incorrect MAC.
+
+   A countermeasure is to compute a MAC of the plaintext anyway, even if
+   the usual padding removal step fails because of incorrect padding, to
+   obtain (nearly) uniform timing.
+
+3.9  Spoofing by Counterfeit Servers
+
+   If a user can be led to believe that she is connecting to a host
+   containing information protected by a password she knows, when in
+   fact she is connecting to a hostile server, then the hostile server
+   can obtain challenge/response pairs where it was able to partly
+   choose the challenge. There is no known way that this can be
+   exploited.
+
+3.10  Storing passwords
+
+   Digest authentication requires that the authenticating agent (usually
+   the server) store some data derived from the user's name and password
+   in a "password file" associated with a given realm. Normally this
+   might contain pairs consisting of username and H({ username-value,
+   ":", realm-value, ":", passwd }), which is adequate to compute H(A1)
+   as described above without directly exposing the user's password.
+
+   The security implications of this are that if this password file is
+
+
+
+Leach & Newman           Expires: December 2003                [Page 23]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   compromised, then an attacker gains immediate access to documents on
+   the server using this realm. Unlike, say a standard UNIX password
+   file, this information need not be decrypted in order to access
+   documents in the server realm associated with this file. On the other
+   hand, decryption, or more likely a brute force attack, would be
+   necessary to obtain the user's password. This is the reason that the
+   realm is part of the digested data stored in the password file. It
+   means that if one Digest authentication password file is compromised,
+   it does not automatically compromise others with the same username
+   and password (though it does expose them to brute force attack).
+
+   There are two important security consequences of this. First the
+   password file must be protected as if it contained plaintext
+   passwords, because for the purpose of accessing documents in its
+   realm, it effectively does.
+
+   A second consequence of this is that the realm string should be
+   unique among all realms that any single user is likely to use. In
+   particular a realm string should include the name of the host doing
+   the authentication.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 24]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+3.11  Multiple realms
+
+   Use of multiple realms may mean both that compromise of a the
+   security database for a single realm does not compromise all
+   security, and that there are more things to protect in order to keep
+   the whole system secure.
+
+3.11  Summary
+
+   By modern cryptographic standards Digest Authentication is weak,
+   compared to (say) public key based mechanisms. But for a large range
+   of purposes it is valuable as a replacement for plaintext passwords.
+   Its strength may vary depending on the implementation.
+
+
+4  Example
+
+   This example shows the use of the Digest SASL mechanism with the
+   IMAP4 AUTHENTICATE command [RFC 3501].
+
+   In this example, "C:" and "S:" represent a line sent by the client or
+   server respectively including a CRLF at the end.  Linebreaks and
+   indentation within a "C:" or "S:" are editorial and not part of the
+   protocol. The password in this example was "secret".  Note that the
+   base64 encoding of the challenges and responses is part of the IMAP4
+   AUTHENTICATE command, not part of the Digest specification itself.
+
+    S: * OK elwood.innosoft.com PMDF IMAP4rev1 V6.0-9
+    C: c CAPABILITY
+    S: * CAPABILITY IMAP4 IMAP4rev1 ACL LITERAL+ NAMESPACE QUOTA
+                UIDPLUS AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=PLAIN
+    S: c OK Completed
+    C: a AUTHENTICATE DIGEST-MD5
+    S: + cmVhbG09ImVsd29vZC5pbm5vc29mdC5jb20iLG5vbmNlPSJPQTZNRzl0
+         RVFHbTJoaCIscW9wPSJhdXRoIixhbGdvcml0aG09bWQ1LXNlc3MsY2hh
+         cnNldD11dGYtOA==
+    C: Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iY2hyaXMiLHJlYWxtPSJlbHdvb2
+       QuaW5ub3NvZnQuY29tIixub25jZT0iT0E2TUc5dEVRR20yaGgiLG5jPTAw
+       MDAwMDAxLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLGRpZ2VzdC11cmk9Im
+       ltYXAvZWx3b29kLmlubm9zb2Z0LmNvbSIscmVzcG9uc2U9ZDM4OGRhZDkw
+       ZDRiYmQ3NjBhMTUyMzIxZjIxNDNhZjcscW9wPWF1dGg=
+    S: + cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
+    C:
+    S: a OK User logged in
+    ---
+
+    The base64-decoded version of the SASL exchange is:
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 25]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+    S: realm="elwood.innosoft.com",nonce="OA6MG9tEQGm2hh",qop="auth",
+       algorithm=md5-sess,charset=utf-8
+    C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
+       nonce="OA6MG9tEQGm2hh",nc=00000001,cnonce="OA6MHXh6VqTrRk",
+       digest-uri="imap/elwood.innosoft.com",
+       response=d388dad90d4bbd760a152321f2143af7,qop=auth
+    S: rspauth=ea40f60335c427b5527b84dbabcdfffd
+
+    The password in this example was "secret".
+
+   This example shows the use of the Digest SASL mechanism with the
+   ACAP, using the same notational conventions and password as in the
+   previous example. Note that ACAP does not base64 encode and uses
+   fewer round trips that IMAP4.
+
+    S: * ACAP (IMPLEMENTATION "Test ACAP server") (SASL "CRAM-MD5"
+               "DIGEST-MD5" "PLAIN")
+    C: a AUTHENTICATE "DIGEST-MD5"
+    S: + {94}
+    S: realm="elwood.innosoft.com",nonce="OA9BSXrbuRhWay",qop="auth",
+       algorithm=md5-sess,charset=utf-8
+    C: {206}
+    C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
+       nonce="OA9BSXrbuRhWay",nc=00000001,cnonce="OA9BSuZWMSpW8m",
+       digest-uri="acap/elwood.innosoft.com",
+       response=6084c6db3fede7352c551284490fd0fc,qop=auth
+    S: a OK (SASL {40}
+    S: rspauth=2f0b3d7c3c2e486600ef710726aa2eae) "AUTHENTICATE
+    Completed"
+    ---
+
+   The server uses the values of all the directives, plus knowledge of
+   the users password (or the hash of the user's name, server's realm
+   and the user's password) to verify the computations above. If they
+   check, then the user has authenticated.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 26]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+5   References
+
+5.1   Normative references
+
+   [Digest]   Franks, J., et al., "HTTP Authentication: Basic and Digest
+              Access Authentication", RFC 2617, June 1999.
+
+   [ISO-8859] ISO-8859. International Standard--Information Processing--
+              8-bit Single-Byte Coded Graphic Character Sets --
+              Part 1: Latin alphabet No. 1, ISO-8859-1:1987.
+              Part 2: Latin alphabet No. 2, ISO-8859-2, 1987.
+              Part 3: Latin alphabet No. 3, ISO-8859-3, 1988.
+              Part 4: Latin alphabet No. 4, ISO-8859-4, 1988.
+              Part 5: Latin/Cyrillic alphabet, ISO-8859-5, 1988.
+              Part 6: Latin/Arabic alphabet, ISO-8859-6, 1987.
+              Part 7: Latin/Greek alphabet, ISO-8859-7, 1987.
+              Part 8: Latin/Hebrew alphabet, ISO-8859-8, 1988.
+              Part 9: Latin alphabet No. 5, ISO-8859-9, 1990.
+
+   [RFC 822]  Crocker, D., "Standard for The Format of ARPA Internet
+              Text Messages," STD 11, RFC 822, August 1982.
+
+   [RFC 1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
+              April 1992.
+
+   [RFC 2052] Gulbrandsen, A. and P. Vixie, "A DNS RR for specifying the
+              location of services (DNS SRV)", RFC 2052, October 1996.
+
+   [RFC 2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-
+              Hashing for  Message Authentication", RFC 2104, February
+              1997.
+
+   [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [RFC 2222] Myers, J., "Simple Authentication and Security Layer
+              (SASL)", RFC 2222, October 1997.
+
+   [Stringprep] Hoffman, P., Blanchet, M., "Preparation of
+              Internationalized Strings ("stringprep")", RFC 3454,
+              December 2002.
+
+   [Unicode] The Unicode Consortium, "The Unicode Standard, Version
+              3.2.0", defined by: The Unicode Standard, Version 3.0
+              (Reading, MA, Addison-Wesley, 2000.  ISBN 0-201-61633-5),
+              as amended by the Unicode Standard Annex #28: Unicode 3.2
+              (http://www.unicode.org/reports/tr28/tr28-3.html).
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 27]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   [UTF-8] Yergeau, "UTF-8, a transformation format of ISO 10646", RFC
+              2279, Janyary 1998.
+
+   [USASCII]  US-ASCII. Coded Character Set - 7-Bit American Standard
+              Code for Information Interchange. Standard ANSI X3.4-1986,
+              ANSI, 1986.
+
+   [SASLPrep] Zeilenga, K., "SASLprep: Stringprep profile for user names
+              and passwords", Work in progress, draft-ietf-sasl-
+              saslprep-XX.txt.
+
+   [RFC 2732]  Hinden, R., Carpenter, B., Masinter, L., "Format for
+              Literal IPv6 Addresses in URL's", RFC 2732, December 1999.
+
+   [RFC 2373] Hinden, R., Deering, S., "IP Version 6 Addressing
+              Architecture", RFC 2373, July 1998.
+
+   [RFC 2396] Berners-Lee, T., Fielding, R., Masinter, L., "Uniform
+              Resource Identifiers (URI): Generic Syntax", RFC 2396,
+              August 1998.
+
+   [FIPS] National Institute of Standards and Technology, "DES Modes of
+              Operation", http://www.itl.nist.gov/fipspubs/fip81.htm,
+              December 1980.
+
+   [AES] Daemen, J., Rijmen, V., "The Rijndael Block Cipher",
+              http://csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf,
+              3rd September 1999.
+
+
+5.2   Informative references
+
+   [RFC 2195] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
+              AUTHorize Extension for Simple Challenge/Response", RFC
+              2195, September 1997.
+
+   [MD5]  Kaliski, B.,Robshaw, M., "Message Authentication with MD5",
+              CryptoBytes, Sping 1995, RSA Inc,
+              (http://www.rsa.com/rsalabs/pubs/cryptobytes/spring95/md5.htm)
+
+   [RFC 2078] Linn, J., "Generic Security Service Application Program
+              Interface, Version 2", RFC 2078, January 1997.
+
+   [RFC 3501] Crispin, M., "Internet Message Access Protocol - Version
+              4rev1", RFC 3501, March 2003.
+
+   [RFC 2244] Newman, C., Myers, J., "ACAP -- Application Configuration
+              Access Protocol", RFC 2244, November 1997.
+
+
+
+Leach & Newman           Expires: December 2003                [Page 28]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   [RFC 2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
+              Masinter, L., Leach, P., Berners-Lee, T., "Hypertext
+              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
+
+   [TLS-CBC] Moeller, B., "Security of CBC Ciphersuites in SSL/TLS:
+              Problems and Countermeasures",
+              http://www.openssl.org/~bodo/tls-cbc.txt.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 29]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+6  Authors' Addresses
+
+   Paul Leach
+   Microsoft
+   1 Microsoft Way
+   Redmond, WA 98052, USA
+
+   EMail: paulle at microsoft.com
+
+
+   Chris Newman
+   Sun Microsystems
+   1050 Lakes Drive
+   West Covina, CA 91790, USA
+
+   EMail: Chris.Newman at Sun.COM
+
+
+   Alexey Melnikov
+   Isode
+   28 Gloucester Road,
+   Teddington, Middlesex, TW11 0NU, UK
+
+   Email: mel at isode.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 30]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+7  ABNF
+
+   What follows is the definition of the notation as is used in the
+   HTTP/1.1 specification [RFC 2616] and the HTTP authentication
+   specification [Digest]; it is reproduced here for ease of reference.
+   Since it is intended that a single Digest implementation can support
+   both HTTP and SASL-based protocols, the same notation is used in both
+   to facilitate comparison and prevention of unwanted differences.
+   Since it is cut-and-paste from the HTTP specifications, not all
+   productions may be used in this specification. It is also not quite
+   legal ABNF; again, the errors were copied from the HTTP
+   specifications.
+
+7.1   Augmented BNF
+
+   All of the mechanisms specified in this document are described in
+   both prose and an augmented Backus-Naur Form (BNF) similar to that
+   used by RFC 822 [RFC 822]. Implementers will need to be familiar with
+   the notation in order to understand this specification.
+
+   The augmented BNF includes the following constructs:
+
+   name = definition
+      The name of a rule is simply the name itself (without any
+      enclosing "<" and ">") and is separated from its definition by the
+      equal "=" character. White space is only significant in that
+      indentation of continuation lines is used to indicate a rule
+      definition that spans more than one line. Certain basic rules are
+      in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle
+      brackets are used within definitions whenever their presence will
+      facilitate discerning the use of rule names.
+
+   "literal"
+      Quotation marks surround literal text. Unless stated otherwise,
+      the text is case-insensitive.
+
+   rule1 | rule2
+      Elements separated by a bar ("|") are alternatives, e.g., "yes |
+      no" will accept yes or no.
+
+   (rule1 rule2)
+      Elements enclosed in parentheses are treated as a single element.
+      Thus, "(elem (foo | bar) elem)" allows the token sequences
+      "elem foo elem" and "elem bar elem".
+
+   *rule
+      The character "*" preceding an element indicates repetition. The
+      full form is "<n>*<m>element" indicating at least <n> and at most
+
+
+
+Leach & Newman           Expires: December 2003                [Page 31]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+      <m> occurrences of element. Default values are 0 and infinity so
+      that "*(element)" allows any number, including zero; "1*element"
+      requires at least one; and "1*2element" allows one or two.
+
+   [rule]
+      Square brackets enclose optional elements; "[foo bar]" is
+      equivalent to "*1(foo bar)".
+
+   N rule
+      Specific repetition: "<n>(element)" is equivalent to
+      "<n>*<n>(element)"; that is, exactly <n> occurrences of (element).
+      Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three
+      alphabetic characters.
+
+   #rule
+      A construct "#" is defined, similar to "*", for defining lists of
+      elements. The full form is "<n>#<m>element" indicating at least
+      <n> and at most <m> elements, each separated by one or more commas
+      (",") and OPTIONAL linear white space (LWS). This makes the usual
+      form of lists very easy; a rule such as
+        ( *LWS element *( *LWS "," *LWS element ))
+      can be shown as
+        1#element
+      Wherever this construct is used, null elements are allowed, but do
+      not contribute to the count of elements present. That is,
+      "(element), , (element) " is permitted, but counts as only two
+      elements.  Therefore, where at least one element is required, at
+      least one non-null element MUST be present. Default values are 0
+      and infinity so that "#element" allows any number, including zero;
+      "1#element" requires at least one; and "1#2element" allows one or
+      two.
+
+   ; comment
+      A semi-colon, set off some distance to the right of rule text,
+      starts a comment that continues to the end of line. This is a
+      simple way of including useful notes in parallel with the
+      specifications.
+
+   implied *LWS
+      The grammar described by this specification is word-based. Except
+      where noted otherwise, linear white space (LWS) can be included
+      between any two adjacent words (token or quoted-string), and
+      between adjacent words and separators, without changing the
+      interpretation of a field. At least one delimiter (LWS and/or
+      separators) MUST exist between any two tokens (for the definition
+      of "token" below), since they would otherwise be interpreted as a
+      single token.
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 32]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+7.2   Basic Rules
+
+   The following rules are used throughout this specification to
+   describe basic parsing constructs. The US-ASCII coded character set
+   is defined by ANSI X3.4-1986 [USASCII].
+
+       OCTET          = <any 8-bit character>
+       CHAR           = <any US-ASCII character (octets 0 - 127)>
+       UPALPHA        = <any US-ASCII uppercase letter "A".."Z">
+       LOALPHA        = <any US-ASCII lowercase letter "a".."z">
+       ALPHA          = UPALPHA | LOALPHA
+       DIGIT          = <any US-ASCII digit "0".."9">
+       CTL            = <any US-ASCII control character
+                        (octets 0 - 31) and DEL (127)>
+       CR             = <US-ASCII CR, carriage return (13)>
+       LF             = <US-ASCII LF, linefeed (10)>
+       SP             = <US-ASCII SP, space (32)>
+       HT             = <US-ASCII HT, horizontal-tab (9)>
+       <">            = <US-ASCII double-quote mark (34)>
+       TEXTCHAR       = <any OCTET except CTLs, but including HT>
+       CRLF           = CR LF
+
+   All linear white space, including folding, has the same semantics as
+   SP.  A recipient MAY replace any linear white space with a single SP
+   before interpreting the field value or forwarding the message
+   downstream.
+
+       LWS            = [CRLF] 1*( SP | HT )
+
+   The TEXT rule is only used for descriptive field contents and values
+   that are not intended to be interpreted by the message parser. Words
+   of TEXT contains characters either from ISO-8859-1 [ISO-8859]
+   character set or UTF-8 [UTF-8].
+
+       TEXT           = <any *OCTET except CTLs,
+                        but including LWS>
+
+   A CRLF is allowed in the definition of TEXT only as part of a header
+   field continuation. It is expected that the folding LWS will be
+   replaced with a single SP before interpretation of the TEXT value.
+
+   Hexadecimal numeric characters are used in several protocol elements.
+
+       HEX            = "A" | "B" | "C" | "D" | "E" | "F"
+                      | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
+
+   Many HTTP/1.1 header field values consist of words separated by LWS
+   or special characters. These special characters MUST be in a quoted
+
+
+
+Leach & Newman           Expires: December 2003                [Page 33]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   string to be used within a parameter value.
+
+       token          = 1*TOKENCHAR
+       separators     = "(" | ")" | "<" | ">" | "@"
+                      | "," | ";" | ":" | "\" | <">
+                      | "/" | "[" | "]" | "?" | "="
+                      | "{" | "}" | SP | HT
+       TOKENCHAR      = <any CHAR except CTLs or separators>
+
+   A string of text is parsed as a single word if it is quoted using
+   double-quote marks.
+
+       quoted-string  = ( <"> qdstr-val <"> )
+       qdstr-val      = *( qdtext | quoted-pair )
+       qdtext         = <any TEXTCHAR except <"> and "\">
+
+   Note that LWS is NOT implicit between the double-quote marks (<">)
+   surrounding a qdstr-val and the qdstr-val; any LWS will be considered
+   part of the qdstr-val.  This is also the case for quotation marks
+   surrounding any other construct.
+
+   The backslash character ("\") MAY be used as a single-character
+   quoting mechanism only within qdstr-val and comment constructs.
+
+       quoted-pair    = "\" CHAR
+
+   The value of this construct is CHAR. Note that an effect of this rule
+   is that backslash itself MUST be quoted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 34]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+8  Sample Code
+
+   The sample implementation in [Digest] also applies to DIGEST-MD5.
+
+   The following code implements the conversion from UTF-8 to 8859-1 if
+   necessary.
+
+    /* if the string is entirely in the 8859-1 subset of UTF-8, then
+     * translate to 8859-1 prior to MD5
+     */
+    void MD5_UTF8_8859_1(MD5_CTX *ctx, const unsigned char *base,
+        int len)
+    {
+        const unsigned char *scan, *end;
+        unsigned char cbuf;
+
+        end = base + len;
+        for (scan = base; scan < end; ++scan) {
+            if (*scan > 0xC3) break; /* abort if outside 8859-1 */
+            if (*scan >= 0xC0 && *scan <= 0xC3) {
+                if (++scan == end || *scan < 0x80 || *scan > 0xBF)
+                    break;
+            }
+        }
+        /* if we found a character outside 8859-1, don't alter string
+         */
+        if (scan < end) {
+            MD5Update(ctx, base, len);
+            return;
+        }
+
+        /* convert to 8859-1 prior to applying hash
+         */
+        do {
+            for (scan = base; scan < end && *scan < 0xC0; ++scan)
+                ;
+            if (scan != base) MD5Update(ctx, base, scan - base);
+            if (scan + 1 >= end) break;
+            cbuf = ((scan[0] & 0x3) << 6) | (scan[1] & 0x3f);
+            MD5Update(ctx, &cbuf, 1);
+            base = scan + 2;
+        } while (base < end);
+    }
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 35]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+9   Interoperability considerations
+
+   9.1 Implementing DES cipher in CBC mode
+
+   Several cryptographic libraries (Ebones, OpenSSL) provide a convenience
+   function des_cbc_encrypt for implementing DES cipher in CBC mode.
+   There is a documented bug in this function: the function doesn't update
+   IV before returning. If an implementation uses this function to implement
+   DES cipher in CBC mode, it MUST update IV by copying the last 8 bytes of
+   the des_cbc_encrypt's output to the IV buffer.
+   Note that the function des_ede2_cbc_encrypt that may be used to implement
+   3DES (in "two keys mode") in CBC mode works as expected.
+
+   Care must be taken when configuring the DES keys for most DES
+   libraries. This specification gives 56 bits for the DES key (or 112
+   bits for the 3DES key); libraries generally expect the key to be given
+   in a 64 bit (128 bit for 3DES) form.
+
+   The following C function can be used to convert a 56 bit DES key into a
+   form acceptable for the libraries. The low order bit in each byte
+   would contain parity information and will be corrected by the library.
+
+   /* slide the first 7 bytes of 'inbuf' into the high seven bits of the
+      first 8 bytes of 'keybuf'. 'keybuf' better be 8 bytes long or longer. */
+   void slidebits(unsigned char *keybuf, unsigned char *inbuf)
+   {
+       keybuf[0] = inbuf[0];
+       keybuf[1] = (inbuf[0]<<7) | (inbuf[1]>>1);
+       keybuf[2] = (inbuf[1]<<6) | (inbuf[2]>>2);
+       keybuf[3] = (inbuf[2]<<5) | (inbuf[3]>>3);
+       keybuf[4] = (inbuf[3]<<4) | (inbuf[4]>>4);
+       keybuf[5] = (inbuf[4]<<3) | (inbuf[5]>>5);
+       keybuf[6] = (inbuf[5]<<2) | (inbuf[6]>>6);
+       keybuf[7] = (inbuf[6]<<1);
+   }
+
+10  Acknowledgements
+
+   The following people had substantial contributions to the development
+   and/or refinement of this document:
+
+   Lawrence Greenfield John Gardiner Myers Simon Josefsson RL Bob Morgan
+   Jeff Hodges Claus Assmann Tony Hansen Sam Hartman
+
+   as well as other members of the SASL mailing list.
+
+   The text used is section 3.8 was taken from [TLS-CBC] by Bodo
+   Moeller.
+
+
+
+Leach & Newman           Expires: December 2003                [Page 36]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+11  Full Copyright Statement
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 37]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+Appendix A: Changes from 2831
+
+   1). Fixed various typos in formulas.
+
+   2). Dropped DES as mandatory to implement cipher (3DES is mandatory
+   to implement).
+
+   3). Tighten ABNF. Fixed some bugs.
+
+   4). Clarified nc-value verification and which side is aborting
+   exchange.
+
+   5). Added text saying that for interoperability
+   username/password/realm MUST be prepared using the "SASLPrep" profile
+   [SASLPrep] of the "stringprep" algorithm [StringPrep].
+
+   6). Clarified that unquoted version of the username, etc. used in A1
+   calculation.
+
+   7). Various cleanup to References section. Split all references to
+   Normative and Informative.
+
+   8). Added minimal and maximal limits on maxbuf. Clarified how to
+   calculate max sender size.
+
+   9). Change ABNF for host to allow for IPv6 addresses. ABNF now
+   references RFC 2373 and RFC 2396.
+
+   10). Added DES cipher interoperability section.
+
+   11). Added man-in-the-middle considerations for ciphers.
+
+   12). Clarified how sequence counters are modified.
+
+   13). Addition warnings about preventing reply/redirection attacks.
+
+   14). Specified that "charset" directive affects "realm" and doesn't
+   affect
+        "authzid".
+
+   15). Removed text that described that "authzid" is in Unicode in
+   Normalization
+        Form KC, encoded as UTF-8.
+
+   16). Clarified that rc4 state is not reset between two sent/received
+   buffers
+        of encoded data.
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 38]
+
+
+
+
+
+INTERNET DRAFT            Digest SASL Mechanism                June 2003
+
+
+   17). Clarified that for DES/3DES the IV for the next buffer of
+   encoded data is
+        the last 8 bytes of the ciphertext.
+
+   18). Clarified how "maximal sender size" is calculated.
+
+   19). Prohibit an empty authzid.
+
+   20). Added AES cipher defined in "AES Ciphersuite for DIGEST-MD5 SASL
+   mechanism"
+        document (expired draft-ietf-sasl-digest-aes-00.txt).
+
+   21). Minor text clarifications.
+
+Appendix B: Open Issues/ToDo List
+
+   1). The latest revision prohibits escaped characters in nonce/cnonce.
+   This is different
+       from HTTP Digest. Any objections?
+
+   2). Do we need/want a new stringprep profile for "realm"?
+
+   3). What to do about CBC mode attack that affects TLS document and
+   DIGEST-MD5 as well?
+
+   One of the proposals is to drop DES/3DES ciphers and define a new one
+   (e.g. AES) in such a way that is not susceptible to this kind of
+   attack.
+
+   AES cipher has to be fixed to prevent this attack.
+
+   4). Add reference to CBC mode attack:
+
+   This problem is described in LASEC Memo "Password Interception in a
+   SSL/TLS Channel" by Brice Canvel, published 2003-02-20:
+   http://lasecwww.epfl.ch/memo_ssl.shtml
+
+   5). Normative vs. Informative references must be carefully rechecked.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman           Expires: December 2003                [Page 39]
+
+
diff --git a/doc/draft-ietf-sasl-saslprep-xx.txt b/doc/draft-ietf-sasl-saslprep-xx.txt
new file mode 100644
index 0000000..fd0f6b8
--- /dev/null
+++ b/doc/draft-ietf-sasl-saslprep-xx.txt
@@ -0,0 +1,339 @@
+
+
+
+
+
+
+INTERNET-DRAFT                                   Kurt D. Zeilenga
+Intended Category: Standards Track            OpenLDAP Foundation
+Expires in six months                             27 October 2003
+
+
+        SASLprep: Stringprep profile for user names and passwords
+                    <draft-ietf-sasl-saslprep-04.txt>
+
+
+Status of Memo
+
+  This document is an Internet-Draft and is in full conformance with all
+  provisions of Section 10 of RFC 2026.
+
+  This document is intended to be, after appropriate review and
+  revision, submitted to the RFC Editor as a Standards Track document.
+  Distribution of this memo is unlimited.  Technical discussion of this
+  document will take place on the IETF SASL mailing list
+  <ietf-sasl at imc.org>.  Please send editorial comments directly to the
+  document editor <Kurt at OpenLDAP.org>.
+
+  Internet-Drafts are working documents of the Internet Engineering Task
+  Force (IETF), its areas, and its working groups.  Note that other
+  groups may also distribute working documents as Internet-Drafts.
+  Internet-Drafts are draft documents valid for a maximum of six months
+  and may be updated, replaced, or obsoleted by other documents at any
+  time.  It is inappropriate to use Internet-Drafts as reference
+  material or to cite them other than as ``work in progress.''
+
+  The list of current Internet-Drafts can be accessed at
+  <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
+  Internet-Draft Shadow Directories can be accessed at
+  <http://www.ietf.org/shadow.html>.
+
+  Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+  Please see the Full Copyright section near the end of this document
+  for more information.
+
+
+Abstract
+
+  This document describes how to prepare Unicode strings representing
+  user names and passwords for comparison.  The document defines the
+  "SASLprep" profile of the "stringprep" algorithm to be used for both
+  user names and passwords.  This profile is intended to be used by
+  Simple Authentication and Security Layer (SASL) mechanisms (such as
+  PLAIN, CRAM-MD5, and DIGEST-MD5) as well as other protocols exchanging
+
+
+
+Zeilenga                        SASLprep                        [Page 1]
+

+INTERNET-DRAFT       draft-ietf-sasl-saslprep-04.txt     27 October 2003
+
+
+  user names and/or passwords.
+
+
+1. Introduction
+
+  The use of simple user names and passwords in authentication and
+  authorization is pervasive on the Internet.  To increase the
+  likelihood that user name and password input and comparison work in
+  ways that make sense for typical users throughout the world, this
+  document defines rules for preparing internationalized user names and
+  passwords for comparison.  For simplicity and implementation ease, a
+  single algorithm is defined for both user names and passwords.
+
+  This document defines the "SASLprep" profile of the "stringprep"
+  algorithm [StringPrep].
+
+  The profile is designed for use in Simple Authentication and Security
+  Layer ([SASL]) mechanisms such as [PLAIN].  It may be applicable
+  elsewhere simple user names and passwords are used.  This profile is
+  not intended to be used for arbitrary text.  This profile is also not
+  intended to be used to prepare identity strings which are not simple
+  user names (e.g., e-mail addresses, domain names, distinguished
+  names).
+
+
+2. The SASLprep profile
+
+  This section defines the "SASLprep" profile.  This profile is intended
+  to be used to prepare strings representing simple user names and
+  passwords.
+
+  This profile uses Unicode 3.2, as defined in [StringPrep, A.1].
+
+  Character names in this document use the notation for code points and
+  names from the Unicode Standard [Unicode].  For example, the letter
+  "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
+  In the lists of mappings and the prohibited characters, the "U+" is
+  left off to make the lists easier to read.  The comments for character
+  ranges are shown in square brackets (such as "[CONTROL CHARACTERS]")
+  and do not come from the standard.
+
+  Note: a glossary of terms used in Unicode can be found in [Glossary].
+  Information on the Unicode character encoding model can be found in
+  [CharModel].
+
+
+2.1. Mapping
+
+
+
+
+Zeilenga                        SASLprep                        [Page 2]
+

+INTERNET-DRAFT       draft-ietf-sasl-saslprep-04.txt     27 October 2003
+
+
+  This profile specifies:
+    - non-ASCII space characters [StringPrep, C.1.2] be mapped to SPACE
+      (U+0020), and
+
+    - the "commonly mapped to nothing" characters [StringPrep, B.1] be
+      mapped to nothing.
+
+
+
+2.2. Normalization
+
+  This profile specifies using Unicode normalization form KC, as
+  described in Section 4 of [StringPrep].
+
+
+2.3. Prohibited Output
+
+  This profile specifies the following characters:
+
+    - Non-ASCII space characters [StringPrep, C.1.2],
+    - ASCII control characters [StringPrep, C.2.1],
+    - Non-ASCII control characters [StringPrep, C.2.2],
+    - Private Use [StringPrep, C.3],
+    - Non-character code points [StringPrep, C.4],
+    - Surrogate code points [StringPrep, C.5],
+    - Inappropriate for plain text [StringPrep, C.6],
+    - Inappropriate for canonical representation [StringPrep, C.7],
+    - Change display properties or are deprecated [StringPrep, C.8], and
+    - Tagging characters [StringPrep, C.9].
+
+  are prohibited output.
+
+
+2.4. Bidirectional characters
+
+  This profile specifies checking bidirectional strings as described in
+  [StringPrep, Section 6].
+
+
+2.5. Unassigned Code Points
+
+  This profile specifies [StringPrep, A.1] table as its list of
+  unassigned code points.
+
+
+3. Security Considerations
+
+  This profile is intended to used to prepare simple user names and
+
+
+
+Zeilenga                        SASLprep                        [Page 3]
+

+INTERNET-DRAFT       draft-ietf-sasl-saslprep-04.txt     27 October 2003
+
+
+  passwords for comparison.  It is not intended to be used for to
+  prepare identities which are not simple user names (e.g.,
+  distinguished names and domain names).  Nor is the profile intended to
+  be used for simple user names which require different handling.
+  Protocols (or applications of those protocols) which have
+  application-specific identity forms and/or comparison algorithms
+  should use mechanisms specifically designed for these forms and
+  algorithms.
+
+  User names and passwords should be protected from eavesdropping.
+
+  General "stringprep" and Unicode security considerations apply.  Both
+  are discussed in [StringPrep].
+
+
+4. IANA Considerations
+
+  This document details the "SASLprep" profile of [StringPrep] protocol.
+  Upon Standards Action the profile should be registered in the
+  stringprep profile registry.
+
+      Name of this profile: SASLprep
+      RFC in which the profile is defined: This RFC
+      Indicator whether or not this is the newest version of the
+      profile: This is the first version of the SASPprep profile.
+
+
+5. Acknowledgment
+
+  This document borrows text from "Preparation of Internationalized
+  Strings ('stringprep')" and "Nameprep: A Stringprep Profile for
+  Internationalized Domain Names", both by Paul Hoffman and Marc
+  Blanchet.
+
+  This document is a product of the IETF SASL WG.
+
+
+6. Normative References
+
+  [StringPrep]  Hoffman P. and M. Blanchet, "Preparation of
+                Internationalized Strings ('stringprep')",
+                draft-hoffman-rfc3454bis-xx.txt, a work in progress.
+
+  [SASL]        Melnikov, A. (Editor), "Simple Authentication and
+                Security Layer (SASL)",
+                draft-ietf-sasl-rfc2222bis-xx.txt, a work in progress.
+
+  [Unicode]     The Unicode Consortium, "The Unicode Standard, Version
+
+
+
+Zeilenga                        SASLprep                        [Page 4]
+

+INTERNET-DRAFT       draft-ietf-sasl-saslprep-04.txt     27 October 2003
+
+
+                3.2.0" is defined by "The Unicode Standard, Version 3.0"
+                (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
+                as amended by the "Unicode Standard Annex #27: Unicode
+                3.1" (http://www.unicode.org/reports/tr27/) and by the
+                "Unicode Standard Annex #28: Unicode 3.2"
+                (http://www.unicode.org/reports/tr28/).
+
+
+7. Informative References
+
+  [Glossary]    The Unicode Consortium, "Unicode Glossary",
+                <http://www.unicode.org/glossary/>.
+
+  [CharModel]   Whistler, K. and M. Davis, "Unicode Technical Report
+                #17, Character Encoding Model", UTR17,
+                <http://www.unicode.org/unicode/reports/tr17/>, August
+                2000.
+
+  [CRAM-MD5]    Nerenberg, L., "The CRAM-MD5 SASL Mechanism",
+                draft-ietf-sasl-crammd5-xx.txt, a work in progress.
+
+  [DIGEST-MD5]  Leach, P., C. Newman, and A. Melnikov, "Using Digest
+                Authentication as a SASL Mechanism",
+                draft-ietf-sasl-rfc2831bis-xx.txt, a work in progress.
+
+  [PLAIN]       Zeilenga, K. (Editor), "The Plain SASL Mechanism",
+                draft-ietf-sasl-plain-xx.txt, a work in progress.
+
+
+8. Editor's Address
+
+  Kurt Zeilenga
+  OpenLDAP Foundation
+
+  Email: kurt at OpenLDAP.org
+
+
+Intellectual Property Rights
+
+  The IETF takes no position regarding the validity or scope of any
+  intellectual property or other rights that might be claimed to pertain
+  to the implementation or use of the technology described in this
+  document or the extent to which any license under such rights might or
+  might not be available; neither does it represent that it has made any
+  effort to identify any such rights.  Information on the IETF's
+  procedures with respect to rights in standards-track and
+  standards-related documentation can be found in BCP-11.  Copies of
+  claims of rights made available for publication and any assurances of
+
+
+
+Zeilenga                        SASLprep                        [Page 5]
+

+INTERNET-DRAFT       draft-ietf-sasl-saslprep-04.txt     27 October 2003
+
+
+  licenses to be made available, or the result of an attempt made to
+  obtain a general license or permission for the use of such proprietary
+  rights by implementors or users of this specification can be obtained
+  from the IETF Secretariat.
+
+  The IETF invites any interested party to bring to its attention any
+  copyrights, patents or patent applications, or other proprietary
+  rights which may cover technology that may be required to practice
+  this standard.  Please address the information to the IETF Executive
+  Director.
+
+
+Full Copyright
+
+  Copyright (C) The Internet Society (2003). All Rights Reserved.
+
+  This document and translations of it may be copied and furnished to
+  others, and derivative works that comment on or otherwise explain it
+  or assist in its implmentation may be prepared, copied, published and
+  distributed, in whole or in part, without restriction of any kind,
+  provided that the above copyright notice and this paragraph are
+  included on all such copies and derivative works.  However, this
+  document itself may not be modified in any way, such as by removing
+  the copyright notice or references to the Internet Society or other
+  Internet organizations, except as needed for the  purpose of
+  developing Internet standards in which case the procedures for
+  copyrights defined in the Internet Standards process must be followed,
+  or as required to translate it into languages other than English.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Zeilenga                        SASLprep                        [Page 6]
+

diff --git a/doc/draft-murchison-sasl-login-xx.txt b/doc/draft-murchison-sasl-login-xx.txt
new file mode 100644
index 0000000..e6ffc29
--- /dev/null
+++ b/doc/draft-murchison-sasl-login-xx.txt
@@ -0,0 +1,396 @@
+
+
+
+
+
+
+
+Internet Draft                                               K. Murchison
+Category: Informational                                        M. Crispin
+Expires: March 2, 2004                                     28 August 2003
+
+
+                          The LOGIN SASL Mechanism
+
+                     <draft-murchison-sasl-login-00.txt>
+
+
+Status of this Memo
+
+    This document is an Internet-Draft and is subject to all provisions
+    of Section 10 of RFC2026.
+
+    Internet-Drafts are working documents of the Internet Engineering
+    Task Force (IETF), its areas, and its working groups.  Note that
+    other groups may also distribute working documents as
+    Internet-Drafts.
+
+    Internet-Drafts are draft documents valid for a maximum of six months
+    and may be updated, replaced, or obsoleted by other documents at any
+    time.  It is inappropriate to use Internet-Drafts as reference
+    material or to cite them other than as "work in progress."
+
+    The list of current Internet-Drafts can be accessed at
+    http://www.ietf.org/1id-abstracts.html
+
+    The list of Internet-Draft Shadow Directories can be accessed at
+    http://www.ietf.org/shadow.html
+
+
+Copyright Notice
+
+    Copyright (C) The Internet Society 2003. All Rights Reserved.
+
+
+Abstract
+
+    This document documents the obsolete clear-text user/password Simple
+    Authentication and Security Layer (SASL) mechanism called the LOGIN
+    mechanism.  The LOGIN mechanism was intended to be used, in
+    combination with data confidentiality services provided by a lower
+    layer, in protocols which lack a simple password authentication
+    command.
+
+
+
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 1]
+

+Internet Draft            LOGIN SASL Mechanism           August 28, 2004
+
+
+
+Conventions Used in the Document
+
+    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+    document are to be interpreted as described in [KEYWORDS].
+
+
+1.  Background and Intended Usage
+
+    This document documents the obsolete LOGIN Simple Authentication and
+    Security Layer ([SASL]) mechanism which was in use in protocols with
+    no clear-text login command (e.g., [SMTP-AUTH]).
+
+    Note: The LOGIN SASL mechanism is obsoleted in favor of the PLAIN
+    SASL mechanism ([PLAIN]).  The LOGIN mechanism is documented here
+    only for the purpose of backwards compatibility with legacy software.
+    Clients SHOULD implement the PLAIN SASL mechanism and use it whenever
+    offered by a server.  The LOGIN SASL mechanism SHOULD NOT be used by
+    a client when other plaintext mechanisms are offered by a server.
+
+    The name associated with this mechanism is "LOGIN".
+
+    The LOGIN SASL mechanism does not provide a security layer.  This
+    mechanism MUST NOT be used without adequate security protection as
+    the mechanism affords no integrity nor confidentiality protection
+    itself.  The LOGIN SASL mechanism MUST NOT be advertised or used in
+    any configuration that prohibits the PLAIN mechanism or plaintext
+    LOGIN (or USER/PASS) command that sends passwords in the clear.
+
+
+2.  LOGIN SASL Mechanism
+
+    The authorization identity is the same string as the "username" in
+    the traditional (non-SASL) LOGIN or USER commands; the authorization
+    authenticator is the same string as the traditional "password".  The
+    authentication identity is the same as the authorization identity in
+    this mechanism.
+
+    Only US-ASCII printable characters SHOULD be used in the username and
+    password to permit maximal interoperability.  If non-US-ASCII
+    characters are used in a username, they MUST use UTF-8.  Passwords
+    MAY contain arbitrary binary data excluding NUL, CR and LF
+    characters.  However, if a password is supplied to the client as a
+    sequence of characters (e.g., a password dialog box), those
+    characters MUST be encoded as UTF-8.
+
+    The username MUST be less than 64 characters in length.
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 2]
+

+Internet Draft            LOGIN SASL Mechanism           August 28, 2004
+
+
+2.1.  Client side of authentication protocol exchange
+
+    The client expects the server to issue a challenge.  The client then
+    responds with the authorization identity.  The client then expects
+    the server to issue a second challenge.  The client then responds
+    with the authorization authenticator.  The contents of both
+    challenges SHOULD be ignored.
+
+
+2.2.  Server side of authentication protocol exchange
+
+    The server issues the string "User Name" in challenge, and receives a
+    client response.  This response is recorded as the authorization
+    identity.  The server then issues the string "Password" in challenge,
+    and receives a client response.  This response is recorded as the
+    authorization authenticator.  The server must verify that the
+    authorization authenticator permits login as the authorization
+    identity.
+
+    Note: There is at least one widely deployed client which requires
+    that the challenge strings transmitted by the server be "Username:"
+    and "Password:" respectively.  For this reason, server
+    implementations MAY send these challenge strings instead of those
+    listed above.
+
+
+2.3.  Example
+
+    This example shows the use of the LOGIN mechanism with the SMTP AUTH
+    command [SMTP-AUTH] under the protection of SMTP STARTTLS [SMTP-TLS].
+    The user name is "tim" and the password is "tanstaaftanstaaf".  The
+    base64 encoding of the challenges and responses is part of the SMTP
+    AUTH command, not part of the LOGIN specification itself.  "C:" and
+    "S:" indicate lines sent by the client and server respectively.
+
+    S: 220 smtp.example.com ESMTP server ready
+    C: EHLO test.example.com
+    S: 250-smtp.example.com
+    S: 250-STARTTLS
+    S: 250 AUTH CRAM-MD5
+    C: STARTTLS
+    S: 220 Ready to start TLS
+    <TLS negotiation, further commands are under TLS layer>
+    C: EHLO test.example.com
+    S: 250-smtp.example.com
+    S: 250 AUTH LOGIN CRAM-MD5
+    C: AUTH LOGIN
+    S: 334 VXNlciBOYW1lAA==
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 3]
+

+Internet Draft            LOGIN SASL Mechanism           August 28, 2004
+
+
+    C: dGlt
+    S: 334 UGFzc3dvcmQA
+    C: dGFuc3RhYWZ0YW5zdGFhZg==
+    S: 235 Authentication successful.
+
+
+3.
+    Security Considerations
+
+    The LOGIN mechanism relies upon an underlying encryption layer or
+    other secure channel for security.  When used without an encryption
+    layer or secure channel, it is vulnerable to a common network
+    eavesdropping attack.  Therefore the LOGIN mechanism MUST NOT be
+    advertised or used in any configuration that prohibits the PLAIN
+    mechanism or a plaintext LOGIN (or USER/PASS) command that sends
+    passwords in the clear.
+
+
+4.
+    IANA Considerations
+
+    The registration for the LOGIN SASL mechanism follows:
+
+    SASL mechanism name: LOGIN
+    Security Considerations: See section 3 of this memo
+    Published specification: this memo
+    Person & email address to contact for futher information:
+        See section 7 of this memo
+    Intended usage: OBSOLETE
+    Owner/Change controller: See section 7 of this memo
+
+
+5.
+    References
+
+
+5.1.
+    Normative References
+
+
+     [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
+         Requirement Levels", Harvard University, RFC 2119, March 1997.
+
+
+     [SASL] Melnikov, A., Ed., "Simple Authentication and Security Layer
+         (SASL)", Isode, draft-ietf-sasl-rfc2222bis-xx.txt, Work In
+         Progress.
+
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 4]
+

+Internet Draft            LOGIN SASL Mechanism           August 28, 2004
+
+
+5.2.  Informative References
+
+
+     [PLAIN] Zeilenga, Kurt D., Ed., "The Plain SASL Mechanism",
+         OpenLDAP Foundation, draft-ietf-sasl-plain-xx.txt, Work In
+         Progress.
+
+
+     [SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication",
+         Netscape Communications, RFC 2554, March 1999.
+
+
+     [SMTP-TLS] Hoffman, P., "SMTP Service Extension for Secure SMTP
+         over Transport Layer Security", Internet Mail Consortium, RFC
+         3207, February 2002.
+
+
+
+6.  Acknowledgments
+
+    Thanks to Rob Siemborski for his input and feedback on this document.
+
+
+7.
+    Author's Address
+
+    Kenneth Murchison
+    Oceana Matrix Ltd.
+    21 Princeton Place
+    Orchard Park, NY  14127
+
+    Phone: (716) 662-8973
+
+    EMail: ken at oceana.com
+
+
+
+
+    Mark R. Crispin
+    Networks and Distributed Computing
+    University of Washington
+    4545 15th Avenue NE
+    Seattle, WA  98105-4527
+
+    Phone: (206) 543-5762
+
+    EMail: MRC at CAC.Washington.EDU
+
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 5]
+

+Internet Draft            LOGIN SASL Mechanism           August 28, 2004
+
+
+8.
+    Intellectual Property Considerations
+
+    The IETF takes no position regarding the validity or scope of any
+    intellectual property or other rights that might be claimed to
+    pertain to the implementation or use of the technology described in
+    this document or the extent to which any license under such rights
+    might or might not be available; neither does it represent that it has
+    made any effort to identify any such rights.  Information on the
+    IETF's procedures with respect to rights in standards-track and
+    standards-related documentation can be found in BCP-11.  Copies of
+    claims of rights made available for publication and any assurances of
+    licenses to be made available, or the result of an attempt made to
+    obtain a general license or permission for the use of such proprietary
+    rights by implementors or users of this specification can be obtained
+    from the IETF Secretariat.
+
+    The IETF invites any interested party to bring to its attention any
+    copyrights, patents or patent applications, or other proprietary
+    rights which may cover technology that may be required to practice
+    this standard.  Please address the information to the IETF Executive
+    Director.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 6]
+

+Internet Draft            LOGIN SASL Mechanism           August 28, 2004
+
+
+9.
+    Full Copyright Statement
+
+    Copyright (C) The Internet Society 2003. All Rights Reserved.
+
+    This document and translations of it may be copied and furnished to
+    others, and derivative works that comment on or otherwise explain it
+    or assist in its implmentation may be prepared, copied, published and
+    distributed, in whole or in part, without restriction of any kind,
+    provided that the above copyright notice and this paragraph are
+    included on all such copies and derivative works.  However, this
+    document itself may not be modified in any way, such as by removing
+    the copyright notice or references to the Internet Society or other
+    Internet organizations, except as needed for the  purpose of
+    developing Internet standards in which case the procedures for
+    copyrights defined in the Internet Standards process must be followed,
+    or as required to translate it into languages other than English.
+
+    The limited permissions granted above are perpetual and will not be
+    revoked by the Internet Society or its successors or assigns.
+
+    This document and the information contained herein is provided on an
+    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
+    ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
+    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
+    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires: March 2, 2004        Murchison                         [Page 7]
+

diff --git a/doc/draft-newman-sasl-c-api-xx.txt b/doc/draft-newman-sasl-c-api-xx.txt
new file mode 100644
index 0000000..1ad37dd
--- /dev/null
+++ b/doc/draft-newman-sasl-c-api-xx.txt
@@ -0,0 +1,1681 @@
+
+
+
+
+
+
+Network Working Group                                          C. Newman
+Internet Draft: SASL C API                                      Innosoft
+Document: draft-newman-sasl-c-api-01.txt                     A. Melnikov
+                                                         MessagingDirect
+                                                           February 2003
+                                                   Expires in six months
+
+
+             Simple Authentication and Security Layer C API
+
+
+Status of this memo
+
+   This document is an Internet-Draft and is in full conformance with
+   all provisions of Section 10 of RFC2026 [RFC2026].
+
+   Internet-Drafts are working documents of the Internet Engineering
+   Task Force (IETF), its areas, and its working groups. Note that other
+   groups may also distribute working documents as Internet-Drafts.
+
+   Internet-Drafts are draft documents valid for a maximum of six months
+   and may be updated, replaced, or obsoleted by other documents at any
+   time.  It is inappropriate to use Internet-Drafts as reference
+   material or to cite them other than as "work in progress."
+
+   The list of current Internet-Drafts can be accessed at
+   http://www.ietf.org/ietf/1id-abstracts.txt
+
+   The list of Internet-Draft Shadow Directories can be accessed at
+   http://www.ietf.org/shadow.html.
+
+Abstract
+
+   Almost every protocol needs authentication.  However, there does not
+   exist an authentication mechanism suitable for all organizations, nor
+   is it likely that a small fixed set of authentication mechanisms will
+   remain suitable.  SASL [SASL] provides the on-the-wire framework for
+   authentication (and a security layer) which separates the design of
+   authentication mechanisms from the protocols in which they're used.
+
+   The SASL protocol model suggests a software architecture where
+   application protocols call a generic API to authenticate which in
+   turn calls a generic plug-in interface for extensible authentication
+   modules.  This memo documents the API used in one implementation of
+   this architecture in the hope that it will be useful to others.  An
+   associated memo documenting the plug-in interface is forthcoming.
+
+1.     Conventions Used in this Memo
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 1]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+   The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+   in this document are to be interpreted as defined in "Key words for
+   use in RFCs to Indicate Requirement Levels" [KEYWORDS].
+
+   This assumes familiarity the SASL [SASL] specification.
+
+ 1.1.   Concepts
+
+   The following concepts are necessary to understand this
+   specification.
+
+realm
+     A realm is a name (usually a domain-style name) associated with a
+     set of users on a server.  One realm may span multiple servers.
+     Alternatively, a single server may have multiple realms.  Thus
+     there may be multiple users with the username "chris" on the same
+     server, each in a different realm.  Some authentication mechanisms
+     have a special field for the realm (e.g., DIGEST-MD5).  For other
+     mechanisms, a realm can be specified by the client by using the
+     syntax "username at realm" in the username field.
+
+service
+     A service is a basic function provided by one or more protocols.
+     The GSSAPI service name [GSSAPI] registry is available at:
+
+      <http://www.iana.org/numbers.html#G>
+
+     This registry is used by SASL and the SASL API. The service name
+     may be used for service-specific passwords for advanced users, or
+     advanced authentication mechanisms may restrict the services a
+     given server may offer.
+
+
+virtual domain
+     When a single server has multiple realms and there is a DNS server
+     entry for each realm pointing to the same server IP address, then
+     those realms are "virtual domains".  Virtual domains are extremely
+     popular with web hosting services and are becoming more popular
+     with POP mail services.  The key to providing virtual domain sup-
+     port is that the client informs the server of the domain it
+     believes it is speaking to either through a special protocol ele-
+     ment or by using a username of the form "user at realm".
+
+
+2.     Overview of the SASL C API
+
+   The SASL API is initialized once at process startup. The
+   sasl_server_init() and sasl_client_init() functions provide basic
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 2]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+   initialization.
+
+   When a network connection occurs where SASL will be used, a connec-
+   tion-specific context is created for authentication with
+   sasl_client_new() or sasl_server_new().  The API implementation must
+   support multi-threaded servers and clients by creating the connection
+   context in a thread-safe fashion permitting multiple contexts in a
+   given process.  At this point, the caller may adjust security policy
+   for the context, and the set of mechanisms which are enabled is
+   determined by requirements from the configuration or by the caller.
+
+   The server end of the API may request a list of enabled authentica-
+   tion mechanisms either in general or for a specific user.  The client
+   may either select a single mechanism or request a list from the
+   server (if the SASL profile for the protocol in question supports
+   that) and pass the list to the API for automated mechanism selection
+   by configured policy.
+
+   The SASL exchange begins with sasl_client_start() which determines if
+   one of the desired mechanisms is available on the client and may gen-
+   erate an initial client response.  The client then sends the appro-
+   priate protocol message to initiate the SASL exchange that the server
+   passes to sasl_server_start().
+
+   The SASL exchange continues with calls to sasl_client_step() and
+   sasl_server_step(), until the server indicates completion or the
+   client cancels the exchange.
+
+   The server queries the user name and user realm resulting from the
+   exchange with the sasl_getprop() routine.
+
+   A connection context is released with sasl_dispose() and process ter-
+   mination is indicated with sasl_done().
+
+   There are a number of utility functions and customization functions
+   available in the API for additional services.
+
+   Note, that all functions described in this documen can be implemented
+   as macroses, so an application using this API MUST NOT assume that
+   they are functions.
+
+   An application or library trying to use SASL API described in this
+   document must include "sasl.h" include file.
+
+3.     Basic SASL API Routines
+
+   This section describes the types and functions likely to be used by
+   every caller of the SASL API.
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 3]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+ 3.1.   Basic SASL API Data Structures
+
+   The following datastructures are basic to the SASL API.
+
+  3.1.1. sasl_callback_t
+
+   The sasl_callback_t structure is used for the caller of the SASL API
+   to provide services to both the core SASL API and SASL plug-ins via
+   callbacks.  The most important callback is the "getopt" callback (see
+   section 3.3.3) which is used to retrieve security policy option set-
+   tings from the caller's preferences.
+
+   typedef struct sasl_callback {
+       unsigned long id;
+       int (*proc)();
+       void *context;
+   } sasl_callback_t;
+
+   id is the label for the callback (XXX IANA registry needed), proc is
+   a function pointer whose exact type is determined by the id, and con-
+   text is a context variable which will be passed to the callback (usu-
+   ally as the first argument).  The last callback in the list of call-
+   backs is indicated with an id of SASL_CB_LIST_END.
+
+   If proc is NULL, this means that the application doesn't want to
+   specify a corresponding callback, but would provide the necessary
+   data via interaction.  See also section 3.1.4.
+
+  3.1.2. sasl_secret_t
+
+   The sasl_secret_t structure is used to hold text or binary passwords
+   for the client API.
+
+   typedef struct sasl_secret {
+       unsigned long len;
+       unsigned char data[1];
+   } sasl_secret_t;
+
+   The len field holds the length of the password, while the data field
+   holds the actual data.  The structure is variable sized: enough space
+   must be reserved after the data field to hold the desired password.
+   An additional that binary passwords are permitted to contain '\0'
+   characters.
+
+  3.1.3. sasl_conn_t
+
+   The sasl_conn_t data type is an opaque data type which reflects the
+   SASL context for a single server connection.  Only one SASL API call
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 4]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+   using a given sasl_conn_t as an argument may be active at a time.
+   However, each sasl_conn_t is independent and thus the SASL API may be
+   used in a true multi-processor multi-threaded environment.
+
+  3.1.4. sasl_interact_t
+
+   The sasl_interact_t structure is used by sasl_client_start and
+   sasl_client_step to request certain information from the application,
+   when the application did not provide corresponding callbacks. For
+   example, an application may choose to present a single dialog to the
+   user in order to collect all required information interactively.
+
+   typedef struct sasl_interact {
+       unsigned long id;
+       const char *challenge;
+       const char *prompt;
+       const char *defresult;
+       const void *result;
+       unsigned len;
+   } sasl_interact_t;
+
+   The id field holds the value of the callback ID. The prompt field
+   contains a string that should be presented to the user. If non-NULL,
+   challenge is a NUL-terminated string that will allow the user to pre-
+   sent a specific credential when prompted. This is different from the
+   prompt in that the prompt is more like a label for a text box (for
+   example "Response:" while challenge is a string that tells the user
+   what specifically is required by the response (for example, an OTP
+   challenge string). The defresult field contains a default value, if
+   any. Upon return from sasl_client_* the "result" field points to the
+   defresult. The client must present the information in the challenge
+   and the prompt to the user and store the result and its length in the
+   result and the len fields respectively.
+
+   For example, SASL_CB_PASS interaction may contain the following
+   information:
+    id - SASL_CB_PASS
+    challenge - NULL
+    prompt - "Password:"
+    defresult - NULL (no default).
+
+ 3.2.   Basic SASL API Client Routines
+
+   This section discusses the functions likely to be used by every
+   client caller of the SASL API.
+
+  3.2.1. sasl_client_init function
+
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 5]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_callback_t *callbacks
+
+Results:
+            SASL_OK        -- Success
+            SASL_NOMEM     -- Not enough memory
+            SASL_BADVERS   -- Mechanism version mismatch
+            SASL_BADPARAM  -- Error in config file
+
+      This function initializes the client routines for the SASL API.
+
+      The callbacks argument is the default list of callbacks (see sec-
+      tion 3.1.1 for definition of sasl_callback_t structure) and SHOULD
+      include the sasl_getopt_t callback (see section 3.3.3). The call-
+      backs may be NULL.  On success, SASL_OK is returned, and on fail-
+      ure a SASL C API error code such as the ones listed above is
+      returned.  This function may be called a second time to change the
+      default callbacks used for new connections, but the first call
+      must be made in a single-threaded environment.  The data refer-
+      enced by the sasl_callback_t structure must persist until
+      sasl_done() is called.
+
+  3.2.2. sasl_client_new function
+
+Arguments:
+            const char *service,
+            const char *server_name,
+            const char *iplocalport,
+            const char *ipremoteport,
+            const sasl_callback_t *prompt_supp,
+            unsigned int flags,
+            sasl_conn_t **pconn
+
+Results:
+            SASL_OK        -- Success
+            SASL_NOTINIT   -- SASL API not initialized
+            SASL_NOMECH    -- No mechanisms available
+            SASL_NOMEM     -- Not enough memory
+
+      This function creates a client connection context variable.  As
+      long as each thread uses its own connection context, the SASL C
+      API is thread-safe.
+
+      The service argument is an IANA registered GSSAPI service element
+      as defined in section 1.1.  It MUST NOT be NULL.
+
+      The server_name is the host name or IP address of the server to
+      which the client is connecting. NULL may be used for server_name,
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 6]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      but may result in advanced mechanisms such as Kerberos being
+      unavailable.
+
+      The iplocalport is the string with the client IPv4/IPv6 address,
+      followed by ":" and than by port number. An IPv6 address must be
+      enclosed in "[" and "]". NULL may be used for iplocalport, but may
+      result in mechanisms requiring IP address being unavailable.
+
+      The ipremoteport is the string with the server IPv4/IPv6 address,
+      followed by ":" and than by port number. An IPv6 address must be
+      enclosed in "[" and "]". NULL may be used for ipremoteport, but
+      may result in mechanisms requiring IP address being unavailable.
+
+      User input to the SASL C API may be provided in two ways: either
+      by supplying callbacks (prompt_supp) to this function, or by using
+      an interaction model with the sasl_client_start/sasl_client_step
+      functions. Callbacks are more convenient to obtain information
+      programmatically, such as pulling authentication information
+      directly from a configuration file. Interactions are more conve-
+      nient if one wants to get all the data in parallel, for example by
+      displaying a single dialog box instead of a separate popup for
+      authentication name, authorization, password, etc.
+
+      The prompt_supp is a list of supported user prompting callbacks
+      discussed in the section 3.1.1. The prompt_supp argument MAY be
+      NULL, which means that interactions (i.e. prompt_need parameter to
+      sasl_client_start (see 3.2.3) and sasl_client_step (see 3.2.4))
+      are used instead of callbacks. If prompt_supp is NULL, the
+      prompt_need argument to sasl_client_start (see 3.2.3) and
+      sasl_client_step (see 3.2.4) MUST NOT be NULL.
+
+      The flags argument represents client-supported security flags.
+      The only values currently supported are SASL_SECURITY_LAYER to
+      indicate the client supports the SASL security layer, or 0 to
+      indicate it doesn't.
+
+      The pconn argument is set to point to the newly created connection
+      context.  The sasl_conn_t type is opaque to the calling applica-
+      tion.
+
+  3.2.3. sasl_client_start function
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 7]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *mechlist,
+            sasl_interact_t **prompt_need,
+            const char **clientout,
+            unsigned int *clientoutlen,
+            const char **mech
+
+Results:
+            SASL_NOTINIT   -- SASL API not initialized
+            SASL_BADPARAM  -- conn or mechlist is NULL
+            SASL_NOMECH    -- No matching mechanisms available
+            SASL_NOMEM     -- Not enough memory
+            SASL_INTERACT  -- User interaction needed to continue
+                              (see prompt_need description below)
+            SASL_OK        -- Success
+
+      This selects an authentication mechanism to use and optionally
+      generates an initial client response.
+
+      The conn argument is the connection context from sasl_client_new.
+
+      The mechlist argument is a '\0' terminated string containing one
+      or more SASL mechanism names.  All characters in the string that
+      are not permitted in a SASL mechanism name [SASL] are ignored
+      except for the purposes of delimiting mechanism names (this per-
+      mits passing direct results from many protocol capability lists
+      unparsed).  Unknown mechanism names are ignored (although
+      SASL_NOMECH is returned if no known mechanisms are found).  Mecha-
+      nisms are tried in an implementation-dependent order. Implementa-
+      tions SHOULD try to use the most secure mechanism possible, within
+      the constraints specified by the application (e.g. SSF value).
+
+      For applications which support interactions, the prompt_need argu-
+      ment should initially point to a NULL pointer. If the selected
+      mechanism needs information from the user (for example, username
+      or password), then prompt_need will be set to point to an array of
+      sasl_interact_t structures (terminated by an entry with id equal
+      to SASL_CB_LIST_END), and sasl_client_start will return
+      SASL_INTERACT.  After that the client must fill in the requested
+      information and call this function again with the same parameters.
+
+      Applications that do not support interactions MUST pass NULL for
+      prompt_need.
+
+      The clientout and clientoutlen parameters are set to the initial
+      client response, if any.  If a protocol's SASL profile uses base64
+      encoding, this represents the data prior to the encoding (see
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 8]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      sasl_encode64).  If a protocol's SASL profile doesn't include an
+      optional initial client response, then these may be NULL and 0
+      respectively. The memory used by clientout is interally managed by
+      the SASL API and may be overwritten on the next call to
+      sasl_client_step or a call to sasl_dispose.
+
+      The mech argument is set to point to a '\0' terminated string
+      specifying the mechanism actually selected using all uppercase
+      letters.  It may be NULL if the client does not care which mecha-
+      nism was selected from mechlist.
+
+      If sasl_client_start is called a second time using the same con-
+      nection context, it will discard any cached information (e.g., the
+      username and password) and restart the exchange from the begin-
+      ning. <<???>>
+
+  3.2.4. sasl_client_step function
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *serverin,
+            unsigned int serverinlen,
+            sasl_interact_t **prompt_need,
+            const char **clientout,
+            unsigned int *clientoutlen
+
+Results:
+            SASL_NOTINIT     -- SASL API not initialized
+            SASL_NOMECH      -- sasl_client_start not called
+            SASL_BADPROT     -- server protocol incorrect/cancelled
+            SASL_BADSERV     -- server failed mutual auth
+            SASL_INTERACT    -- user interaction needed
+            SASL_OK          -- success
+
+      This routine performs one step in an authentication sequence.
+
+      The conn argument must be a connection context created by
+      sasl_client_new and used in a previous call to sasl_client_start.
+
+      The serverin and serverinlen parameters hold the SASL octet string
+      received from the server.  Note that for those SASL profiles which
+      base64 encode the exchange, this is the result after the removal
+      of the base64 encoding (see the sasl_decode64 routine below). The
+      serverin MUST have a terminating NUL character not counted by
+      serverinlen
+
+      The prompt_need argument is the same as for sasl_client_start.
+
+
+
+
+Newman et al.             Expires: August 2003          FORMFEED[Page 9]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      The clientout and clientoutlen parameters hold the SASL octet
+      string to encode (if necessary) and send to the server.
+
+ 3.3.   Basic SASL API Callback Routines
+
+      This section describes the basic callback functions needed for a
+      simple client implementation.  See the definition of sasl_call-
+      back_t in section 3.1.1 for a description of the basic callback
+      structure.
+
+  3.3.1. sasl_getsimple_t
+
+Arguments:
+            void *context,
+            int id,
+            const char **result,
+            unsigned *len
+
+Results:
+            SASL_OK          -- success
+            SASL_FAIL        -- error
+
+      This callback is used by the SASL API to request a simple constant
+      string from the application.  This is used with id SASL_CB_USER
+      for the username, SASL_CB_AUTHNAME for the authentication name (if
+      different), and SASL_CB_LANGUAGE for a comma separated list of RFC
+      1766 language tags.
+
+      The context is the context variable from the sasl_callback_t
+      structure, the id is the id from the sasl_callback_t structure,
+      and the callback is expected to set the result to a constant
+      string and the len to the length of that string.  The result and
+      len parameters are never NULL.
+
+  3.3.2. sasl_getsecret_t
+
+Arguments:
+            sasl_conn_t *conn,
+            void *context,
+            int id,
+            sasl_secret_t **psecret
+
+Results:
+            SASL_OK          -- success
+            SASL_FAIL        -- error
+
+      This callback is expected to create, prompt or locate a secret and
+      set it in the connection context with sasl_setprop.  The conn
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 10]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      argument is the connection context, the context and id parameters
+      are from the sasl_callback_t structure. The id SASL_CB_PASS is
+      used to request a clear text password.
+
+  3.3.3. sasl_getopt_t
+
+Arguments:
+            void *context,
+            const char *plugin_name,
+            const char *option,
+            const char **result,
+            unsigned int *len
+
+Results:
+            SASL_OK          -- success
+            SASL_FAIL        -- error
+
+      This callback is used by the SASL API to read options from the
+      application.  This allows a SASL configuration to be encapsulated
+      in the caller's configuration system. Configuration items may be
+      mechanism-specific and are arbitrary strings. If the application
+      does not provide a sasl_getopt_t callback, then the API MAY obtain
+      configuration information from other sources, for example from a
+      config file.
+
+      The context is the context variable from the sasl_callback_t
+      structure, the plugin_name is the name of plugin (or NULL), the
+      option is the option name, and the callback is expected to set the
+      result to a string valid till next call to sasl_getopt_t in the
+      same thread and the len to the length of that string.  The result
+      and len parameters are never NULL. If the name of plugin is NULL,
+      a general SASL option is requested, otherwise a plugin specific
+      version.
+
+ 3.4.   Basic SASL C API Utility Routines
+
+      This section describes utility functions provided as part of the
+      SASL API which may be used both by clients and servers.
+
+  3.4.1. sasl_decode64 function
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 11]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            const char *in,
+            unsigned int inlen,
+            char *out,
+            unsigned int outmax,
+            unsigned int *outlen
+
+Results:
+            SASL_BUFOVER    -- output buffer too small
+            SASL_BADPROT    -- invalid base64 string
+            SASL_OK         -- successful decode
+
+      This utility routine converts a base64 string of length inlen
+      pointed by in into an octet string. It is useful for SASL profiles
+      which use base64 such as the IMAP [IMAP4] and POP [POP-AUTH] pro-
+      files.  The output is copied to the buffer specified by the out
+      parameter.  It is NUL terminated and the length of the output is
+      placed in the outlen parameter if outlen is non-NULL. The lenght
+      doesn't include the terminating NUL character.
+
+      When the size of the output buffer, as specified by outmax, is too
+      small, the function returns SASL_BUFOVER error code and the
+      required length is stored in the outlen parameter if it is not
+      NULL.
+
+      The function may also return SASL_BADPROT error code when it
+      encounters an invalid base64 character.
+
+  3.4.2. sasl_encode64 function
+
+Arguments:
+            const char *in,
+            unsigned int inlen,
+            char *out,
+            unsigned int outmax,
+            unsigned int *outlen
+
+Results:
+            SASL_BUFOVER    -- output buffer too small
+            SASL_OK         -- successful decode
+
+      This utility routine converts an octet string of length inlen
+      pointed by in into a base64 string. It is useful for SASL profiles
+      which use base64 such as the IMAP [IMAP4] and POP [POP-AUTH] pro-
+      files.
+
+      The output is copied to the buffer specified by the out parameter.
+      It is NUL terminated and the length of the output is placed in the
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 12]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      outlen parameter if outlen is non-NULL. The lenght doesn't include
+      the terminating NUL character.
+
+      When the size of the output buffer, as specified by outmax, is too
+      small, the function returns SASL_BUFOVER error code and the
+      required length is stored in the outlen parameter if it is not
+      NULL.
+
+  3.4.3. sasl_errstring function
+
+Arguments:
+            int saslerr,
+            const char *langlist,
+            const char **outlang
+
+Results:
+            const char *
+
+      This converts a SASL error number into a constant string.  The
+      second argument MAY be NULL for the default language, or a comma-
+      separated list of RFC 1766 language tags.  The final parameter is
+      set to the RFC 1766 language tag of the string returned which will
+      be "i-default" if no matching language is found.  The strings are
+      UTF-8.  This requires no context so it may be used for the result
+      of an sasl_*_init or sasl_*_new result code.
+
+  3.4.4. sasl_errdetail function
+
+Arguments:
+            sasl_conn_t *conn
+
+Results:
+            const char *
+
+      This converts the last SASL error code that occured on a connec-
+      tion to UTF8 string. It uses the SASL_CB_LANGUAGE callback (see
+      section 3.3.1) to determine the language to use. It may return
+      more detailed information than sasl_errstring does.
+
+  3.4.5. sasl_seterror function
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 13]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_conn_t *conn
+            unsigned flags,
+            const char *fmt,
+             ...
+
+Results:
+            none
+
+      This function sets sets the error string which will be returned by
+      sasl_errdetail.  It uses syslog()-style formatting (i.e. printf-
+      style with %m as the string form of an errno error).
+
+      Messages should be sensitive to the current language setting. If
+      there is no SASL_CB_LANGUAGE callback for the connection, text
+      MUST be in US-ASCII.  Otherwise UTF-8 is used and use of RFC 2482
+      for mixed-language text is encouraged.
+
+      <<This will also trigger a call to the SASL logging callback (if
+      any) with a level of SASL_LOG_FAIL unless the SASL_NOLOG flag is
+      set.>>
+
+      This function may be used by server callbacks.
+
+      If conn is NULL, the function does nothing.
+
+  3.4.6. sasl_erasebuffer function
+
+Arguments:
+            char *buf,
+            unsigned len
+
+Results:
+            none
+
+      This function fills the buffer buf of the lenght len with '\0'
+      characters.  The function may be used to clear from memory sensi-
+      tive informations, like passwords.
+
+ 3.5.   Basic SASL C API Server Routines
+
+      This section describes the basic routines for a server implementa-
+      tion of a SASL profile.
+
+  3.5.1. sasl_server_init function
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 14]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            const sasl_callback_t *callbacks,
+            const char *appname
+
+Results:
+            SASL_BADPARAM     -- error in config file
+            SASL_NOMEM        -- out of memory
+            SASL_BADVERS      -- Plug-in version mismatch
+            SASL_OK           -- success
+
+      This function initializes the server routines for the SASL C API.
+
+      The callbacks argument is the default list of callbacks (see sec-
+      tion 3.1.1 for definition of sasl_callback_t structure) and SHOULD
+      include the sasl_getopt_t callback (see section 3.3.3). The call-
+      backs may be NULL. The appname argument is the name of the calling
+      application and may be used by server plug-ins for logging.  On
+      success, SASL_OK is returned, and on failure a SASL C API error
+      code is returned.  This function may be called a second time to
+      change the default callbacks, but the first call must be made in a
+      single-threaded environment. The data referenced by the
+      sasl_callback_t structure must persist until sasl_done() is
+      called.
+
+      appname specifies the application name. SASL API may use it, for
+      example, for logging or to read an application specific configura-
+      tion. A library must pass NULL as appname.  appname can be also be
+      set with sasl_setprop function, and can be queried with sasl_get-
+      prop. <<Specify option name here>>
+
+  3.5.2. sasl_server_new function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 15]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            const char *service,
+            const char *serverFQDN,
+            const char *user_realm,
+            const char *iplocalport,
+            const char *ipremoteport,
+            const sasl_callback_t *callbacks,
+            unsigned int flags,
+            sasl_conn_t **pconn
+
+Results:
+            SASL_OK        -- success
+            SASL_NOTINIT   -- SASL API not initialized
+            SASL_BADPARAM  -- Invalid parameter supplied
+            SASL_NOMECH    -- No mechanisms available
+            SASL_NOMEM     -- Not enough memory
+
+      This function creates a server connection context variable.  As
+      long as each thread uses its own connection context, the SASL C
+      API is thread-safe.
+
+      The service argument is an IANA registered GSSAPI service element
+      as defined in section 1.1. It MUST NOT be NULL.
+
+      The serverFQDN is the fully qualified name of the server. It MUST
+      NOT be NULL.
+
+      The user_realm specifies the default realm. A realm defines a set
+      of users on the system for systems which support multiple user
+      communities ("realms"). If user_realm is NULL, the value of
+      serverFQDN is used as the default realm.
+
+      The iplocalport is the string with the server IPv4/IPv6 address,
+      followed by ":" and than by port number. An IPv6 address must be
+      enclosed in "[" and "]". NULL may be used for iplocalport, but may
+      result in mechanisms requiring IP address being unavailable.
+
+      The ipremoteport is the string with the client IPv4/IPv6 address,
+      followed by ":" and than by port number. An IPv6 address must be
+      enclosed in "[" and "]". NULL may be used for ipremoteport, but
+      may result in mechanisms requiring IP address being unavailable.
+
+      The callbacks argument is a set of server callbacks which may
+      include a connection-specific sasl_getopt_t and/or an authoriza-
+      tion routine.
+
+      The flags argument represents server-supported security flags. The
+      only values currently supported are SASL_SECURITY_LAYER to
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 16]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      indicate the server supports the SASL security layer, or 0 to
+      indicate it doesn't.
+
+      The pconn argument is set to point to the newly created connection
+      context.
+
+  3.5.3. sasl_server_start function
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *mech,
+            const char *clientin,
+            insigned int clientinlen,
+            const char **serverout,
+            unsigned int *serveroutlen
+
+Results:
+            SASL_CONTINUE  -- Another authentication step required
+            SASL_OK        -- Authentication Complete
+            SASL_NOTINIT   -- SASL API not initialized
+            SASL_BADPARAM  -- Invalid parameter supplied
+            SASL_BADPROT   -- Client protocol error
+            SASL_NOMECH    -- Mechanism not supported
+            SASL_NOVERIFY  -- User exists, but no verifier exists for
+                              the mechanism
+            SASL_TRANS     -- A password transition is needed to use mechanism
+
+      This begins an authentication exchange and is called after the
+      client sends the initial authentication command.  The mech argu-
+      ment is the mechanism name the client is requesting.  If the
+      client includes an optional initial-response, it is passed in the
+      clientin and clientinlen fields.  Otherwise NULL and 0 are passed
+      for those arguments. The serverout and serveroutlen are filled in
+      with the server response, if any.  If SASL_CONTINUE is returned,
+      the server will need to wait for another client message and call
+      sasl_server_step.  If SASL_OK is returned, the authentication is
+      completed successfully, although server out data may be supplied.
+
+  3.5.4. sasl_server_step function
+
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 17]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *clientin,
+            insigned int clientinlen,
+            const char **serverout,
+            unsigned int *serveroutlen
+
+Results:
+            SASL_CONTINUE  -- Another authentication step required
+            SASL_OK        -- Authentication Complete
+            SASL_NOTINIT   -- SASL API not initialized
+            SASL_NOMECH    -- sasl_server_start not called
+            SASL_BADPARAM  -- Invalid parameter supplied
+            SASL_BADPROT   -- Client protocol error
+            SASL_NOVERIFY  -- User exists, but no verifier exists for
+                              the mechanism
+            SASL_TRANS     -- A password transition is needed to use mechanism
+
+      This routine performs one step in an authentication sequence.
+
+      The conn argument must be a connection context created by
+      sasl_server_new and used in a previous call to sasl_server_start.
+
+      The clientin and clientinlen parameters hold the SASL octet string
+      received from the client.  Note that for those SASL profiles which
+      base64 encode the exchange, this is the result after the removal
+      of the base64 encoding (see the sasl_decode64 routine). The cli-
+      entin MUST have a terminating NUL character not counted by
+      serverinlen.
+
+      The serverout and serveroutlen parameters hold the SASL octet
+      string to encode (if necessary) and send to the client. If
+      SASL_CONTINUE is returned, the server will need to wait for
+      another client message and call sasl_server_step.  If SASL_OK is
+      returned, the authentication is completed successfully, although
+      server out data may be supplied.
+
+ 3.6.   Common SASL API Routines
+
+      This section describes the routines that are common to both
+      clients and servers.
+
+  3.6.1. sasl_listmech function
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 18]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *user,
+            const char *prefix,
+            const char *sep,
+            const char *suffix,
+            char **result,
+            unsigned int *plen,
+            unsigned *pcount
+
+Results:
+            SASL_OK        -- Success
+            SASL_NOMEM     -- Not enough memory
+            SASL_NOMECH    -- No enabled mechanisms
+
+      This returns a list of enabled SASL mechanisms in a NUL-terminated
+      string.  The list is constructed by placing the prefix string at
+      the beginning, placing the sep string between any pair of mecha-
+      nisms and placing the suffix string at the end.
+
+      When calling this function plen and pcount MAY be NULL.
+
+      This function returns the list of client side SASL mechanisms, if
+      the conn was created by sasl_client_new and the list of server
+      side mechanisms, if the conn was created by sasl_server_new. The
+      list returned by this function must persist till a next call to
+      sasl_free_listmech or sasl_listmech.
+
+  3.6.2. sasl_free_listmech function
+
+Arguments:
+            sasl_conn_t *conn,
+            char **result
+
+Results:
+            none
+
+      This disposes of the result string returned by sasl_listmech.
+
+  3.6.3. sasl_setprop function
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 19]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_conn_t *conn,
+            int propnum,
+            const void *value
+
+Results:
+            SASL_OK          -- property set
+            SASL_BADPARAM    -- invalid propnum or value
+            SASL_NOMEM       -- not enough memory to perform operation
+
+      This sets a property in a connection context. Commonly used prop-
+      erties with their descriptions are listed below:
+
+      SASL_SSF_EXTERNAL
+
+      Security layer strength factor (SSF) -- an unsigned integer usable
+      by the caller to specify approximate security layer strength
+      desired. It roughly corresponds to the effective key length for
+      encryption, e.g.
+       0   = no protection
+       1   = integrity protection only >1   = key lenght of the cipher
+
+      SASL_SSF_EXTERNAL property denotes SSF of the external security
+      layer (e.g.  provided by TLS). The value parameter points to
+      sasl_ssf_t, that is described as follows:
+
+      typedef unsigned sasl_ssf_t;
+
+
+
+      SASL_SEC_PROPS
+
+      The value parameter for SASL_SEC_PROPS points to sasl_secu-
+      rity_properties_t structure defined below. A particular implemen-
+      tation may extend it with additional fields.
+
+      typedef struct sasl_security_properties
+      {
+          sasl_ssf_t min_ssf;
+          sasl_ssf_t max_ssf;
+
+          unsigned maxbufsize;
+
+          /* bitfield for attacks to protect against */
+          unsigned security_flags;
+      } sasl_security_properties_t;
+
+      The min_ssf and the max_ssf define the minimal and the maximal
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 20]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      acceptable SSF.
+
+      The maxbufsize specifies the biggest buffer size that the
+      client/server is able to decode. 0 means that security layer is
+      not supported.
+
+      The security_flags is a bitmask of the various security flags
+      described below:
+
+       SASL_SEC_NOPLAINTEXT          -- don't permit mechanisms susceptible to simple
+                                        passive attack (e.g., PLAIN, LOGIN)
+       SASL_SEC_NOACTIVE             -- protection from active (non-dictionary) attacks
+                                        during authentication exchange.
+                                        Authenticates server.
+       SASL_SEC_NODICTIONARY         -- don't permit mechanisms susceptible to passive
+                                        dictionary attack
+       SASL_SEC_FORWARD_SECRECY      -- require forward secrecy between sessions
+                                        (breaking one won't help break next)
+       SASL_SEC_NOANONYMOUS          -- don't permit mechanisms that allow anonymous login
+       SASL_SEC_PASS_CREDENTIALS     -- require mechanisms which pass client
+                                        credentials, and allow mechanisms which can pass
+                                        credentials to do so
+       SASL_SEC_MUTUAL_AUTH          -- require mechanisms which provide mutual
+                                        authentication
+
+      SASL_AUTH_EXTERNAL
+
+      The value parameter for SASL_AUTH_EXTERNAL property points to the
+      external authentication ID as provided by external authentication
+      method, e.g. TLS, PPP or IPSec.
+
+  3.6.4. sasl_getprop function
+
+Arguments:
+            sasl_conn_t *conn,
+            int propnum,
+            const void **pvalue
+
+Results:
+            SASL_OK        -- Success
+            SASL_NOTDONE   -- Authentication exchange must complete prior to
+                              retrieving this attribute
+            SASL_BADPARAM  -- bad property number
+
+      This requests a pointer to a constant property available through
+      the SASL API.  The most common use by servers is to get the
+      SASL_USERNAME property which returns the authorization identity
+      (user to login as) from the SASL mechanism as a UTF-8 string in
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 21]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      the pvalue parameter.  Additional properties are listed in section
+      6.
+
+  3.6.5. sasl_dispose function
+
+Arguments:
+            sasl_conn_t **pconn
+
+Results:
+            none
+
+      This function disposes of the connection state created with
+      sasl_client_new or sasl_server_new, and sets the pointer to NULL.
+      If the pconn is already NULL the function does nothing.
+
+  3.6.6. sasl_done function
+
+Arguments:
+            none
+
+Results:
+            none
+
+      A SASL application that is finished with the SASL API must call
+      this function.  This function frees any memory allocated by the
+      SASL library or any other library state. After this call most of
+      the SASL API function will again return the SASL_NOTINIT error
+      code.
+
+      There must be a call to sasl_done for every successful call to
+      sasl_server_init or sasl_client_init made. Only the final
+      sasl_done does the actual cleanup; the preceding calls simply
+      decrement an internal reference count.
+
+      Connection states MUST be disposed of with sasl_dispose before
+      calling this function.
+
+4.     SASL Security Layer Routines
+
+      This section describes the routines need to support a security
+      layer.
+
+ 4.1. sasl_encode function
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 22]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *input,
+            unsigned int inputlen,
+            const char **output,
+            unsigned int *outputlen
+
+Results:
+            SASL_OK        -- Success (returns input if no layer negotiated)
+            SASL_NOTDONE   -- Security layer negotiation not finished
+            SASL_BADPARAM  -- inputlen is greater than the SASL_MAXOUTBUF property
+
+      This function encodes a block of data for transmission using secu-
+      rity layer (if any). The output and outputlen are filled in with
+      the encoded data and its length respectively. If there is no secu-
+      rity layer the input buffer is returned in the output. Otherwise,
+      the output is only valid until a next call to sasl_encode or
+      sasl_dispose.
+
+ 4.1. sasl_decode function
+
+Arguments:
+            sasl_conn_t *conn,
+            const char *input,
+            unsigned int inputlen,
+            const char **output,
+            unsigned int *outputlen
+
+Results:
+            SASL_OK        -- Success (returns input if no layer negotiated)
+            SASL_NOTDONE   -- Security layer negotiation not finished
+            SASL_BADMAC    -- Bad message integrity check
+
+      This function decodes a block of data received using security
+      layer (if any). The output and outputlen are filled in with the
+      decoded data and its length respectively. If there is no security
+      layer the input buffer is returned in the output. Otherwise, the
+      output is only valid until a next call to sasl_decode or sasl_dis-
+      pose.
+
+5.     Advanced SASL API Routines
+
+      This section describes the less frequently used functions avail-
+      able in the SASL API.
+
+ 5.1.   Additional Initialization Routines
+
+  5.1.1. sasl_set_mutex function
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 23]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_mutex_alloc_t  *mutex_alloc,
+            sasl_mutex_lock_t   *mutex_lock,
+            sasl_mutex_unlock_t *mutex_unlock,
+            sasl_mutex_free_t   *mutex_free
+
+Results:
+            None
+
+      The sasl_set_mutex call sets the callbacks which the SASL API and
+      plug-ins will use whenever exclusive access to a process shared
+      resource is needed.  A single-threaded client or server need not
+      call this.  The types are designed to be compatible with the LDAP
+      API [LDAP-API]:
+
+      typedef void *sasl_mutex_alloc_t(void);
+
+      On success, this returns a pointer to an allocated and initialized
+      mutex structure.  On failure, it returns NULL.
+
+      typedef int sasl_mutex_lock_t(void *mutex);
+
+      This will block the current thread until it is possible to get an
+      exclusive lock on a mutex allocated by the mutex_alloc callback.
+      On success it returns 0, on failure due to deadlock or bad parame-
+      ter, it returns -1.
+
+      typedef int sasl_mutex_unlock_t(void *mutex);
+
+      This releases a lock on a mutex allocated by the mutex_alloc call-
+      back.  On success it returns 0, on failure due to an already
+      unlocked mutex, or bad parameter, it returns -1.
+
+      typedef void sasl_mutex_free_t(void *mutex);
+
+      This disposes of a mutex allocated by mutex_alloc.
+
+  5.1.2. sasl_set_alloc function
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 24]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+Arguments:
+            sasl_malloc_t  *malloc,
+            sasl_calloc_t  *calloc,
+            sasl_realloc_t *realloc,
+            sasl_free_t    *free
+
+Results:
+            None
+
+      This sets the memory allocation functions which the SASL API will
+      use.  The SASL API will use its own routines (usually the standard
+      C library) if these are not set.
+
+      typedef void *sasl_malloc_t(unsigned long mem_size);
+
+      This allocates memory mem_size bytes of memory.  The memory is not
+      initialized to any particular value.  It returns NULL on a fail-
+      ure, or when mem_size is 0.
+
+      typedef void *sasl_calloc_t(unsigned long elem_size,
+                      unsigned long num_elem);
+
+      This allocates elem_size * num_elem bytes of memory.  The memory
+      is initialized to 0.  It returns NULL on a failure or when either
+      elem_size and/or num_elem is 0.
+
+      typedef void *sasl_realloc_t(void *mem_ptr, unsigned long
+      new_size);
+
+      This changes the size of a memory block previously allocated by
+      malloc or calloc, and returns a pointer to the new location (which
+      may be different from mem_ptr).  If mem_ptr is NULL, it is identi-
+      cal to the malloc function.
+
+      It returns NULL on a failure or when new_size is 0. On failure the
+      original block is unchanged. When new_size is 0 the function works
+      as the free function.
+
+      typedef void sasl_free_t(void *mem_ptr);
+
+      This releases the memory in mem_ptr that was allocated by the mal-
+      loc or the calloc or resized by the realloc. If mem_ptr is NULL,
+      the function does nothing and returns immediately. The contents of
+      the memory may be altered by this call.
+
+6.     Additional Properties
+
+      <<To be completed>>
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 25]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+      SASL_SSF          -- security layer security strength factor,
+                           if 0, call to sasl_encode, sasl_decode unnecessary
+      SASL_MAXOUTBUF    -- security layer max output buf unsigned
+      SASL_DEFUSERREALM -- default realm passed to sasl_server_new or set with
+                           sasl_setprop
+      SASL_GETOPTCTX    -- context for getopt callback
+      SASL_CALLBACK     -- current callback function list
+      SASL_IPLOCALPORT  -- iplocalport string passed to sasl_server_new/
+                           sasl_client_new
+      SASL_IPREMOTEPORT -- ipremoteport string passed to sasl_server_new/
+                           sasl_client_new
+      SASL_SERVICE      -- service passed to sasl_*_new
+      SASL_SERVERFQDN   -- serverFQDN passed to sasl_*_new
+      SASL_AUTHSOURCE   -- name of the active plugin, if any
+      SASL_MECHNAME     -- active SASL mechanism name, if any
+      SASL_AUTHUSER     -- authentication/admin user (authorization id?)
+
+7.     References
+
+      [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
+      4rev1", RFC 2060, University of Washington, December 1996.
+
+      [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
+      Requirement Levels", RFC 2119, Harvard University, March 1997.
+
+      [POP3] Myers, J., Rose, M., "Post Office Protocol - Version 3",
+      RFC 1939, Carnegie Mellon, Dover Beach Consulting, Inc., May 1996.
+
+      [POP-AUTH] Myers, "POP3 AUTHentication command", RFC 1734,
+      Carnegie Mellon, December 1994.
+
+      [SASL] Myers, "Simple Authentication and Security Layer (SASL)",
+      RFC 2222, Netscape Communications, October 1997.
+
+      [GSSAPI]
+
+8.    Acknowledgements
+
+      The editor would like to thank Rob Siemborski and Ken Murchison
+      for providing useful feedback and suggestions.
+
+9.    Author's and Editor's Addresses
+
+
+     Author:
+
+     Chris Newman
+     Innosoft International, Inc.
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 26]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+     1050 Lakes Drive
+     West Covina, CA 91790 USA
+
+     Email: chris.newman at innosoft.com
+
+
+     Editor:
+
+     Alexey Melnikov
+     ACI WorldWide/MessagingDirect
+     59 Clarendon Road
+     Watford, Hertfordshire, WD17 1FQ, UK
+
+     Email: mel at messagingdirect.com
+
+
+10.    Full Copyright Statement
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this doc-
+   ument itself may not be modified in any way, such as by removing the
+   copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of develop-
+   ing Internet standards in which case the procedures for copyrights
+   defined in the Internet Standards process must be followed, or as
+   required to translate it into languages other than English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MER-
+   CHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 27]
+
+
+
+
+
+INTERNET DRAFT                 SASL C API                  February 2003
+
+
+A. Appendix A -- Design Goals
+
+   The design goals of the SASL C API are as follows:
+
+
+o   To be simple and practical to use.
+
+o   To provide related utility services in addition to core SASL func-
+    tionality.
+
+o   To be reasonably extensible.
+
+o   To be suitable for use in a multi-threaded server or client.
+
+o   To avoid dependancies on a specific memory allocation system, thread
+    package or network model.
+
+o   To be an independent service rather than a new layer.
+
+
+B.     SASL API Index
+
+<<To be completed>>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman et al.             Expires: August 2003         FORMFEED[Page 28]
+
+
+
diff --git a/doc/draft-newman-sasl-passdss-xx.txt b/doc/draft-newman-sasl-passdss-xx.txt
new file mode 100644
index 0000000..4aa7cb8
--- /dev/null
+++ b/doc/draft-newman-sasl-passdss-xx.txt
@@ -0,0 +1,1122 @@
+
+
+
+
+
+
+Network Working Group                                          C. Newman
+Internet Draft: PASSDSS-3DES-1 SASL Mechanism                   Innosoft
+Document: draft-newman-sasl-passdss-01.txt                    March 1998
+                                                   Expires in six months
+
+
+             DSS Secured Password Authentication Mechanism
+
+
+Status of this memo
+
+     This document is an Internet-Draft.  Internet-Drafts are working
+     documents of the Internet Engineering Task Force (IETF), its areas,
+     and its working groups.  Note that other groups may also distribute
+     working documents as Internet-Drafts.
+
+     Internet-Drafts are draft documents valid for a maximum of six
+     months and may be updated, replaced, or obsoleted by other
+     documents at any time.  It is inappropriate to use Internet-Drafts
+     as reference material or to cite them other than as "work in
+     progress."
+
+     To view the entire list of current Internet-Drafts, please check
+     the "1id-abstracts.txt" listing contained in the Internet-Drafts
+     Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
+     (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East
+     Coast), or ftp.isi.edu (US West Coast).
+
+
+Abstract
+
+     Some system administrators are faced with a choice between
+     deploying a new authentication infrastructure or sending
+     unencrypted passwords in the clear over the Internet.  Deploying a
+     new authentication infrastructure often involves modifying
+     operating system services or keeping parallel authentication
+     databases up to date and is thus unacceptable to many
+     administrators.
+
+     Solutions which encrypt the entire session are often crippled with
+     weak keys (due to government restrictions) which are unsuitable for
+     passwords.  In addition, such solutions often reduce performance of
+     the entire session to an unacceptable level.  This specification
+     defines a SASL [SASL] mechanism which is compatible with existing
+     password-based authentication databases and does not require a
+     security layer for the remainder of the session.
+
+     [NOTE: Public discussion of this mechanism may take place on the
+
+
+
+Newman                                                          [Page 1]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     ietf-sasl at imc.org mailing list with a subscription address of
+     ietf-sasl-request at imc.org.  Private comments may be sent to the
+     author].
+
+1. How to Read This Document
+
+     This document is intended primarily for a programmer.  If
+     successful, it should be possible for a competent programmer to
+     write a client implementation using this specification, the SASL
+     [SASL] specification, an understanding of how to generate random
+     numbers [RANDOM], a description or implementation of the DES and
+     SHA1 [SHA1] algorithms and a multi-precision integer math library.
+     A cryptographic library or a copy of "Applied Cryptography"
+     [SCHNEIER] or similar reference is helpful for any implementation
+     and necessary for server DSS key generation.
+
+     The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+     in this document are to be interpreted as defined in "Key words for
+     use in RFCs to Indicate Requirement Levels" [KEYWORDS].
+
+1.1. Data Types Used in this Document
+
+     A list of data types used in this document follows.  Note that the
+     majority of this section is copied from the secure shell
+     specification [SSH-ARCH].
+
+     octet   A basic 8-bit unit of data.
+
+     uint32  A 32-bit unsigned integer.  Stored as four octets in
+             network byte order (also known as big endian or most
+             significant byte [MSB] first).  For example, the decimal
+             value 699921578 (hexadecimal 29b7f4aa) is represented with
+             the hexadecimal octet sequence 29 b7 f4 aa.
+
+     string  A string is a length-prefixed octet string.  The length is
+             represented as a uint32 with the data immediately
+             following.  A length of 0 indicates an empty string.  The
+             string MAY contain NUL or 8-bit octets.  When used to
+             represent textual strings, the characters are interpreted
+             in UTF-8 [UTF-8].  Other character encoding schemes MUST
+             NOT be used.
+
+     mpint   Represents multiple precision integers in two's complement
+             format, stored as a string, most significant octet first.
+             Negative numbers have one in the most significant bit of
+             the first octet of the string data. If the most significant
+             bit would be set for a positive number, the number MUST be
+             preceded by a zero byte.  Unnecessary leading zero or 255
+
+
+
+Newman                                                          [Page 2]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+             bytes MUST NOT be included.  The value zero MUST be stored
+             as a string with zero bytes of data.
+
+             By convention, a number that is used in modular
+             computations in the field of integers mod n SHOULD be
+             represented in the range 0 <= x < n.
+
+             Examples:
+
+              value (hex)        representation (hex)
+              -----------------------------------------------------------
+              0                  00 00 00 00
+              9a378f9b2e332a7    00 00 00 08 09 a3 78 f9 b2 e3 32 a7
+              80                 00 00 00 02 00 80
+              -1234              00 00 00 02 ed cc
+              -deadbeef          00 00 00 05 ff 21 52 41 11
+
+1.2. Glossary
+
+     This section includes some acronyms used in this document.
+
+     DES  The U.S. Government Data Encryption Standard is a symmetric
+          encryption algorithm introduced in 1975 which uses a 56 bit
+          key.  The algorithm is documented in [SCHNEIER].
+
+     DSA  The U.S. Government Digital Signature Algorithm standard.  A
+          public key signature algorithm available for unrestricted use
+          without a license.
+
+     DSS  The U.S. Government Digital Signature Standard [DSS] which
+          employs the DSA algorithm.
+
+     HMAC A hash-based message authentication code [HMAC] summarized in
+          Appendix A.4.  Test cases are available in [HMAC-TEST].
+
+     SHA  The Secure Hash Algorithm (version 1) which is part of the DSS
+          standard.
+
+     triple-DES
+          Use of the DES algorithm three times in an encrypt-decrypt-
+          encrypt mode with three independent keys as described in
+          appendix A.3.
+
+2. Overview
+
+     This section includes a brief discussion of design goals, intended
+     use and an overview for this SASL mechanism.  An overview of some
+     of the algorithms used is in Appendix A.
+
+
+
+Newman                                                          [Page 3]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+2.1. Design Goals
+
+     The ideal authentication mechanism would be simple, fast, fully
+     secure, freely distributable without restrictions and backwards
+     compatible with deployed back-end authentication databases.
+     Unfortunately, it is not possible to achieve all these goals so
+     priorities and tradeoffs are necessary.  This mechanism has
+     compatibility with deployed back-end authentication databases and
+     protection from passive and active attacks on the underlying
+     connection as primary design goals.  Simplicity and unrestricted
+     binary distribution are secondary design goals.
+
+     Backwards compatibility is achieved by using plain-text
+     passphrases.  Protection from passive and active attacks is
+     achieved by using public and symmetric key technology to encrypt
+     the passphrase and optionally protect the remainder of the session.
+     Some simplicity is achieved by avoiding complicated public key
+     certification issues and formats as well as making the SASL session
+     security layer and certification by the client optional.
+     Unrestricted binary distribution is hopefully achieved by using
+     unencumbered algorithms and making the SASL privacy layer optional.
+
+2.2. Intended Use
+
+     This is intended as a plug-and-play mechanism for services layered
+     on top of deployed passphrase-based back-end authentication
+     databases.  When no security layer is implemented it can be added
+     to a SASL-based protocol without modifying or substituting network
+     read and write APIs.  When the optional session privacy protection
+     is omitted, the author speculates that it may be possible to make a
+     binary implementation which would be exportable from the United
+     States.
+
+     For cases where simplicity, speed or unrestricted source code
+     distribution is more desirable than backwards compatibility or
+     security, a mechanism such as CRAM-MD5 [CRAM-MD5] or SCRAM [SCRAM]
+     is preferred.
+
+     The optional SASL integrity and privacy protection is provided as a
+     simple alternative to full service security layers such as TLS
+     [TLS] or Secure Shell [SSH-ARCH].  However, there are many
+     advantages to full service security layers such as compression,
+     faster symmetric cipher options, and the ability to leverage other
+     public key infrastructures.  An implementation which supports TLS
+     may have no incentive to support SASL security layers at all.  The
+     complexity verses functionality tradeoff is significant enough that
+     these mechanisms do not compete.
+
+
+
+
+Newman                                                          [Page 4]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+2.3. Mechanism Overview
+
+     The PASSDSS-3DES-1 mechanism uses three components to perform a
+     secure authentication against a legacy passphrase database.
+
+     In order to protect against active attacks, a DSS public key in a
+     format compatible with Secure Shell [SSH-TRANS] is used to
+     authenticate the server to the client.  The client is presumed to
+     have the server's public key or a SHA-1 hash thereof stored locally
+     in a secure database.  If the client is willing to risk exposure to
+     active attacks, it may skip the public key certification step
+     altogether or do a one-time initialization of its local database,
+     perhaps with user interaction.
+
+     In addition to the DSS public key, a Diffie-Hellman key exchange is
+     used to generate a key for encrypting the passphrase.  The
+     "PASSDSS-3DES-1" variant of this mechanism uses the same fixed
+     Diffie-Hellman group used by Secure Shell's diffie-hellman-group1-
+     sha1 key exchange [SSH-TRANS].  If more groups are necessary, they
+     will be assigned to mechanism variants "PASSDSS-3DES-2" and so
+     forth.
+
+     Finally, the triple-DES algorithm is used to encrypt the client's
+     passphrase and send it to the server.
+
+2.4. Message Format Overview
+
+     This section provides a quick overview of the format of the
+     messages.  The formal definition of the syntax for these messages
+     is in section 6.  A detailed discussion of their implementation on
+     clients and servers is in sections 3 and 4 respectively.
+
+     First message from client to server:
+       string azname       ; the user name to login as, may be empty if
+                             same as authentication name
+       string authname     ; the authentication name
+       mpint  X            ; Diffie-Hellman parameter X
+
+     The challenge from server to client is as follows:
+       uint32   pklength   ; length of SSH-style DSA server public key
+         string "ssh-dss"  ; constant string "ssh-dss" (lower case)
+         mpint  p          ; DSA public key parameters
+         mpint  q
+         mpint  g
+         mpint  y
+       mpint    Y          ; Diffie-Hellman parameter Y
+       OCTET    ssecmask   ; SASL security layers offered
+       3 OCTET  sbuflen    ; maximum server security layer block size
+
+
+
+Newman                                                          [Page 5]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+       uint32   siglength  ; length of SSH-style dss signature
+         string "ssh-dss"  ; constant string "ssh-dss" (lower case)
+         mpint  r          ; DSA signature parameters
+         mpint  s
+
+     The client then sends the following message encrypted with
+     triple-DES:
+       OCTET    csecmask   ; SASL security layer selection
+       3 OCTET  cbuflen    ; maximum client block size
+       string   passphrase ; the user's passphrase
+       20 OCTET cli-hmac   ; a client HMAC-SHA-1 signature
+
+3. Client Implementation of PASSDSS-3DES-1
+
+     This section includes a step-by-step guide for client implementors.
+     Although section 6 contains the formal definition of the syntax and
+     is the authoritative reference in case of errors here, this section
+     should be sufficient to build a correct implementation.
+
+     The SASL mechanism name is "PASSDSS-3DES-1".
+
+     The value of n used for the Diffie-Hellman exchange is as follows
+     (represented as an unsigned hexadecimal integer):
+
+           FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
+           29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
+           EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
+           E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
+           EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
+           FFFFFFFF FFFFFFFF.
+
+     When represented as an "mpint", this would have a prefix of
+     "0000008100."  The value of g is 2.  This group was taken from the
+     ISAKMP/Oakley specification, and was originally generated by
+     Richard Schroeppel at the University of Arizona.  Properties of
+     this prime are described in [Orm96].
+
+     The client begins by doing the following:
+
+     (A) Generate the Diffie-Hellman private value "x".  This should be
+     less than (n - 1)/2.  The number of bits of entropy to use in "x"
+     is an important decision, as shorter lengths will be less secure
+     and longer lengths will noticeably reduce performance.  At the time
+     this was written, 192 bits of entropy [RANDOM] is probably
+     sufficient.  For more information on this topic, see [SHORT-EXP].
+
+
+
+
+
+
+Newman                                                          [Page 6]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     (B) Compute the Diffie-Hellman public value "X" as follows.  If X
+     has a value of 0, repeat step (A).
+                x
+           X = 2  mod n
+
+     The client then sends the following three pieces of information to
+     the server:
+
+     (1) An authorization identity represented as a string.  When the
+     empty string is used, this defaults to the authentication identity.
+     This is used by system administrators or proxy servers to login
+     with a different user identity.
+
+     (2) An authentication identity represented as a string.  This is
+     the identity whose passphrase will be used.
+
+     (3) The "X" result from step (B) represented as an mpint.
+
+     The server responds by sending a message containing the following
+     information:
+
+     (4) An "ssh-dss" public key compatible with Secure Shell, including
+     the 32-bit length prefix in network byte order, the Secure Shell
+     string "ssh-dss" and mpints for "p", "q", "g" and "y" (see Appendix
+     A.1).
+
+     (5) The mpint "Y" as defined for the Diffie-Hellman key exchange
+     (see Appendix A.2).
+
+     (6) A single octet bit mask representing the security layers
+     available in the same format used by the KERBEROS_V4 mechanism
+     [SASL].  Bit 0 (value 1) indicates it is permissible to have no
+     security layer.  Bit 1 (value 2) indicates integrity protection is
+     permissible.  Bit 2 (value 4) indicates privacy protection for the
+     rest of the session is available.  The remaining bits are reserved
+     for future use.
+
+     (7) A three octet unsigned integer in network byte order
+     representing the maximum cipher-text buffer size the server is able
+     to receive.  If this is less than 32, it indicates that a SASL
+     security layer is not supported.
+
+     (8) A DSA signature, including a 32-bit length, the Secure Shell
+     string "ssh-dss" and mpints for "r" and "s".
+
+     The client then does the following:
+
+     (C) Verify that "Y" is between 1 and n - 1 inclusive.  If "Y" is
+
+
+
+Newman                                                          [Page 7]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     outside this range, the client MUST cancel the authentication.
+
+     (D) Verify that the public key from step (4) belongs to the server.
+     This can be done either with a database of SSH public keys or with
+     a database of SHA1 hashes of such public keys.  If the client does
+     not have a matching entry for the server or does not have a public
+     key database, it MAY skip this step although it SHOULD alert the
+     user that the connection is susceptible to active attacks if it
+     does so.  It MAY also record the public key (or SHA1 hash thereof)
+     in its database with permission from the user.
+
+     (E) Compute the Diffie-Hellman key K as follows.  It may be
+     necessary to mask timing attacks [TIMING].
+                x
+           K = Y  mod n
+
+     (F) Create a buffer containing data from steps (1) through (7) in
+     order immediately followed by K represented as an mpint.
+
+     (G) Compute the SHA1 hash of the buffer from (F).  This produces a
+     20 octet result.
+
+     (H) If the public key from step (4) was not certified, this step
+     MAY be skipped.  Otherwise, verify that the DSS signature is a
+     signature of (G).  This computation is done as defined in appendix
+     A.1 where the output of step (G) represents the message "m" (note
+     that this results in SHA1 being applied twice).
+
+     (I) Compute the following 20-octet values.  K represents the output
+     of step (E) in mpint format.  H represents the output of step (G).
+     The || symbol represents string concatenation.  "A" represents a
+     single octet containing the US-ASCII value of capital letter A.
+         cs-encryption-iv    = SHA1( K || "A" || H )
+         sc-encryption-iv    = SHA1( K || "B" || H )
+         cs-encryption-key-1 = SHA1( K || "C" || H )
+         cs-encryption-key-2 = SHA1( K || cs-encryption-key-1 )
+         cs-encryption-key   = cs-encryption-key-1 || cs-encryption-key-2
+         sc-encryption-key-1 = SHA1( K || "D" || H )
+         sc-encryption-key-2 = SHA1( K || sc-encryption-key-1 )
+         sc-encryption-key   = sc-encryption-key-1 || sc-encryption-key-2
+         cs-integrity-key    = SHA1( K || "E" || H )
+         sc-integrity-key    = SHA1( K || "F" || H )
+
+     (J) Create a buffer beginning with a bit mask for the selected
+     security layer (it MUST be one offered in 6) followed by three
+     octets representing the maximum cipher-text buffer size (at least
+     32) the client can accept in network byte order.  This is followed
+     by a string containing the passphrase.  Note that integrity
+
+
+
+Newman                                                          [Page 8]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     protection is pointless unless the public key was certified in
+     step (D) and the signature was verified in step (H).
+
+     (K) Create a buffer containing items (1) through (7) immediately
+     followed by the first four octets of (J).
+
+     (L) Compute HMAC-SHA-1 with (K) as the data and the cs-integrity-
+     key from step (I) as the key.  This produces a 20 octet result.  A
+     summary of the HMAC-SHA-1 algorithm [HMAC] is in appendix A.4.
+
+     (M) Create a buffer containing (J) followed by (L) followed by an
+     arbitrary number of zero octets as necessary to reach the block
+     size of DES and conceal the passphrase length from an eavesdropper.
+
+     (N) Apply the triple-DES algorithm to (M) with the first 8 octets
+     of cs-encryption-iv from step (I) as the initialization vector and
+     the first 24 octets of cs-encryption-key as the key.  If optional
+     privacy protection is negotiated on, the triple-DES state is not
+     reset.
+
+     The client then sends a message to the server containing the
+     following:
+
+     (9) The output of step (N).
+
+     If a SASL security layer is negotiated on, the following steps are
+     used when sending a message:
+
+     (O) Create a buffer containing a uint32 client packet number
+     (starting from 0) immediately followed by the cs-integrity-key from
+     step (I).
+
+     (P) Compute HMAC-SHA-1 with (O) as the key and the data to transmit
+     as the data.
+
+     (Q) Create a buffer containing the data to transmit followed by the
+     20-octet output of (P).  If privacy was negotiated on, this is
+     followed by zero to seven padding octets followed by one more octet
+     indicating the number of padding octets.  The total size MUST be a
+     multiple of the DES block size.
+
+     (R) The result of step (Q) is encrypted with triple-DES if privacy
+     was negotiated and is sent prefixed by a uint32 length, as required
+     by SASL.
+
+     If a SASL security layer was negotiated on, the following steps are
+     taken when receiving a message:
+
+
+
+
+Newman                                                          [Page 9]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     (S) If privacy was negotiated on, the message is decrypted using
+     triple-DES with the first 24 octets of sc-encryption-key as the
+     key.  The value of the last octet plus one indicates the number of
+     octets to ignore at the end of the output.  The sc-encryption-iv is
+     used to initialize triple-DES state the first time this is done.
+
+     (T) Create a buffer containing a uint32 server packet number
+     (starting from 0) immediately followed by the sc-integrity-key.
+
+     (U) Compute HMAC-SHA-1 with (T) as the key over the portion of the
+     data excluding the 20 octet signature and any encryption padding.
+     If this is the same as the 20 octet signature, then the data is not
+     corrupted.
+
+4. Server Implementation of PASSDSS-3DES-1
+
+     The section includes a step-by-step guide for server implementors.
+     It is intended to be read in conjunction with section 3.
+
+     The server MUST have a persistent DSS-SSH public key.  Mechanisms
+     for generating such keys are described in [SCHNEIER] and [DSS].
+
+     IMPORTANT NOTE: The server MUST be able to process any message from
+     the client, including messages of any size, messages with invalid
+     content and messages with NULs in the middle of strings.  When
+     input is illegal, the server MUST gracefully reject authentication
+     or in extreme cases gracefully terminate the connection.
+     Particular care to avoid buffer overruns is important if the user
+     name or passphrase strings are copied.
+
+     The server performs the following computations prior to or during
+     the connection by the client:
+
+     (a) Select a random number k less than (p - 1)/2.  It is important
+     to generate a good random number [RANDOM].
+
+     (b) Compute signature component "r" as follows:
+                 k
+           r = (g  mod p) mod q
+
+     (c) Optionally pre-compute the group inverse of k, mod q and the
+     value xr.
+
+     (d) Select a random Diffie-Hellman private key y less than (n -
+     1)/2.  Follow the same guidance as in (A) above.
+
+
+
+
+
+
+Newman                                                         [Page 10]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     (e) Compute the Diffie-Hellman public value Y as follows.  If Y has
+     a value of 0, repeat step (d) above.
+                y
+           Y = 2  mod n
+
+     (f) Verify that the value X from the client is between 1 and (n -
+     1).  If it isn't, fail the authentication.
+
+     (g) Compute the Diffie-Hellman shared key K as follows.  It may be
+     necessary to mask timing attacks [TIMING].
+                y
+           K = X  mod n
+
+     (h) Create a buffer containing items (1) through (7) above followed
+     by K represented as an mpint.
+
+     (i) Compute the SHA-1 hash of the buffer from (h).  This produces a
+     20 octet result.
+
+     (j) Generate a DSS signature of (i).  The signature is made up of
+     "r" from step (b) and the result following computation (partially
+     completed in step c):
+                 -1
+           s = (k  (SHA1(h) + xr)) mod q
+
+     (k) Create a buffer containing items (4) through (8) and send it to
+     the client.
+
+     (l) Perform the computations as described in step (I) where K is
+     the result of step (g) in mpint format and H is the result of step
+     (i).
+
+     (m) Decrypt message (9) from the client using triple-DES with cs-
+     encryption-iv as the initialization vector and the first 24 octets
+     of cs-encryption-key as the key.
+
+     (n) Verify the passphrase from the output of step (m) against the
+     authentication database.  Fail the authentication if verification
+     fails.
+
+     (o) Verify that the selected security layer is permitted and the
+     cipher text buffer size is at least 32.  If not, fail the
+     authentication.
+
+     (p) Create a buffer containing steps (1) through (7) followed by
+     the first four octets of the result from (m).
+
+     (q) Compute the HMAC-SHA-1 of (p) with cs-integrity-key as the key.
+
+
+
+Newman                                                         [Page 11]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     This produces a 20-octet result.
+
+     (r) Compare the output of (q) with the 20 octet signature after the
+     passphrase in the output of (m).  If they don't match, fail the
+     authentication.
+
+     If a SASL security layer is negotiated on, sending and receiving
+     procedures are similar to steps (O)-(U), with client and server
+     roles exchanged (and thus sc-* values and cs-* value exchanged).
+     Note that triple-DES state from step (m) is not reset.
+
+5. Example
+
+     The following is an example of the PASSDSS-3DES-1 mechanism using
+     the IMAP [IMAP4] profile of SASL.  Note that base64 encoding and
+     the lack of an initial client response with the first command are
+     characteristics of the IMAP profile of SASL and not characteristics
+     of SASL or this mechanism.
+
+     In this example, "C:" represents lines sent from the client to the
+     server and "S:" represents lines sent from the server to the
+     client.  The wrapped lines are for editorial clarity -- there are
+     no actual newlines in the middle of the messages.
+
+       C: a001 AUTHENTICATE PASSDSS-3DES-1
+       S: +
+       C: AAAAAAAAAAVjaHJpcwAAAIEAhuVbMxdLxrAQVyUWbAp+X09h6QmZ2Jebz
+          H7YhtcbQyLbB9AGi1eIdojZYtAuVeE+PYkKUANLHI9XzWSFliIGMeUvBc
+          bflHr+s9tZ5/5YZh9blb33km3tUYVKyB5XP530bDn+lY1lAv6tXHKZPrx
+          b0zPhc+JGgpWGlmT5k9vx2Wk=
+       S: + AAAA8gAAAAdzc2gtZHNzAAAAQQDPVlO6nFefrq6fA/dQKIoNj75Jjpp
+          kVv3DkyILABCox2dMql0bnO48rHFuo167y6oukT/ocKupIw6bgKmdofgd
+          AAAAFQDRpB6FrxemUGRuLjY/oiH/Qef14QAAAEEAkVr9rOlB58k5XoqmP
+          NYTrVGZKWbCPcYtaL92ANxgWyjyRo49+m0+fHPNhNibQoLddEZF8lHPKW
+          gb7z7qz0QMdgAAAEARcIEiMz5jTZo8COf2njL3BTWRND5NGAgZY7s1YOm
+          2BfjVyf1/MkOiQMiXeonrsfMc0sWQGgpRYRtJWpe56cc2AAAAgQDoV5Uk
+          bcy3Gjf16MZwPLlJlvmjpSNv2dSSApoddd4+BgZr01zyt7hzb0yRruaN5
+          fG43DbJLkk7mtL1Hw8aYXBMQQzrPpHtx+anpCDoN2jlersCGFY2cnjxTf
+          HqY139ohA8vVXYpapeXxKXR4//Ib/ApTGmwlOeIikKDrBmEGX/JgEAAAA
+          AAAA8AAAAB3NzaC1kc3MAAAAVAI7j3HG8HyjCOxaGFOUTwZqe0xSHAAAA
+          FHSqU41vPHTCRTqmxNFwXqazPlJH
+       C: Obp6vQ83q1O/OnQDifZB1rWOci9LaSck8VxNB4UAFhRI56BAs4XPLqOWI
+          CoB3LYZ
+       S: a001 OK Authentication Completed
+
+     The following private values were used in this example.  These
+     values are all represented as an mpint in hexadecimal (msb first).
+
+
+
+
+Newman                                                         [Page 12]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     The client private Diffie-Hellman "x" value:
+
+       00000018 666E35B4 3BF4BF2B 40E31359 7A5D3AD0 61FD4F6F 736A6114
+
+     The server private Diffie-Hellman "y" value:
+
+       00000018 587BDFD6 800D101C 8E82E233 3B5A07AA DB87B8F1 68DC194D
+
+     The Diffie-Hellman shared secret:
+
+       00000080 3B46D3A8 D2163930 1C33D9FE EAFA528D F4B881CF DF906A03
+       33249A88 42547FF6 49FDC149 1A5084B1 B425A105 CE571283 AC61D896
+       AF8F7AF7 F95643F3 00A91E57 BCB8CFD7 77A25CBD 35F59A9E 59E98BEA
+       EA866339 7F0F9AA0 2F0F335C 8C6AAFF7 76BDB668 DF4D51AF 5B4FB807
+       81A70901 F478FB86 BF42055C BAF46094 EC72E98A
+
+     The DSA private key value (the public key is in the exchange):
+
+       00000014 252BCBFA 5634D706 6ED43128 972E181E 66BF9C30
+
+     The SHA-1 hash value used to compute the keys:
+
+       26 75 97 06 EB FE E3 69 C9 03 7D 49 64 19 D5 D2 97 66 E8 CE
+
+6. Formal Syntax of PASSDSS-3DES-1 Messages
+
+     This is the formal syntactic definition of the client and server
+     messages.  This uses ABNF [ABNF] notation including the core rules.
+     The first three rules define the formal exchange.  The later rules
+     define the elements of the exchange.
+
+     client-msg-1     = [azname] authname diffie-hellman-X
+
+     server-msg-1     = dss-public-key diffie-hellman-Y
+                        ssecmask sbuflen dss-signature
+
+     client-msg-2     = client-blob
+
+
+     authname         = string
+                        ;; interpreted as UTF-8 [UTF-8]
+
+     azname           = string
+                        ;; interpreted as UTF-8 [UTF-8]
+
+     cbuflen          = 3OCTET
+                        ;; Big endian binary unsigned integer
+                        ;; max length of client read buffer
+
+
+
+Newman                                                         [Page 13]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     cli-hmac         = 20OCTET
+
+     client-blob      = 8*OCTET
+                        ;; encrypted version of client-encrypted
+
+     client-encrypted = csecmask cbuflen passphrase cli-hmac *NUL
+                        ;; MUST be multiple of DES block size
+
+     csecmask         = OCTET
+                        ;; client selected protection layer
+
+     diffie-hellman-X = mpint
+
+     diffie-hellman-Y = mpint
+
+     dss-g            = mpint
+
+     dss-p            = mpint
+
+     dss-public-key   = length NUL NUL NUL %x07 "ssh-dss"
+                        dss-p dss-q dss-g dss-y
+                        ;; length is total length of remainder
+                        ;; as defined in [SSH-TRANS]
+
+     dss-q            = mpint
+
+     dss-r            = mpint
+
+     dss-signature    = length NUL NUL NUL %x07 "ssh-dss"
+                        dss-r dss-s
+                        ;; length is total length of remainder
+
+     dss-s            = mpint
+
+     dss-y            = mpint
+
+     length           = 4OCTET
+                        ;; binary number, big endian format (MSB first)
+
+     mpint            = length *OCTET
+                        ;; length specifies number of octets
+                        ;; see section 1 for detailed mpint definition
+
+     passphrase       = string
+                        ;; At least 64 octets MUST be supported
+
+
+
+
+
+
+Newman                                                         [Page 14]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     sbuflen          = 3OCTET
+                        ;; Big endian binary unsigned integer
+                        ;; max length of server read buffer
+
+     ssecmask         = OCTET
+                        ;; server protection layer mask
+
+     string           = length *OCTET
+                        ;; the length determines the number of octets
+                        ;; OCTETs are interpreted as UTF-8
+
+     NUL              = %x00  ;; US-ASCII NUL character
+
+7. Security Considerations
+
+     Security considerations are discussed throughout this memo.
+
+     This mechanism supplies the server with the plain-text passphrase,
+     so the server gains the ability to masquerade as the user to any
+     other services which share the same passphrase.
+
+     If the public key certification step is skipped, then an active
+     attacker can gain the client's passphrase and thus the ability to
+     masquerade as the user to any other services which share the same
+     passphrase.  Negotiating a security layer will fail to provide
+     protection from an active attacker in this case.
+
+     If no security layer is negotiated, the rest of the protocol
+     session is subject to active and passive attacks.
+
+     If an integrity-only layer is negotiated, the rest of the protocol
+     is subject to passive eavesdropping.
+
+     The quality of this mechanism depends on the quality of the random
+     number generator used.  See [RANDOM] for more information.
+
+8. Multinational Considerations
+
+     As remote access is a crucial service, users are encouraged to
+     restrict user names and passphrases to the US-ASCII character set.
+     However, if characters outside the US-ASCII character set are used
+     in user names and passphrases, then they are interpreted according
+     to UTF-8 [UTF-8] and it is a protocol error to include any octet
+     sequences not legal for UTF-8.  Servers are encouraged to enforce
+     this restriction to discourage clients from using non-interoperable
+     local character sets in this context.
+
+
+
+
+
+Newman                                                         [Page 15]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+9. Intellectual Property Issues and Acknowledgments
+
+     David Kravitz holds U.S. Patent #5,231,668 on the DSA algorithm.
+     NIST has made this patent available world-wide on a royalty-free
+     basis.
+
+     Diffie-Hellman was first published in 1976 [DIFFIE-HELLMAN].  U.S.
+     Patent #4,200,770 granted April 1980 has expired.  Canada Patent
+     #1,121,480 was granted April 6, 1982 and may still apply at this
+     time.
+
+     DES is covered under U.S. Patent #3,962,539 granted June 1978,
+     which has expired.
+
+     The majority of the constructions in this specification were copied
+     from the Secure Shell specifications [SSH-ARCH, SSH-TRANS].
+     Additional information is paraphrased from "Applied Cryptography"
+     [SCHNEIER].
+
+10. References
+
+     [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
+     ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd,
+     November 1997.
+
+     [CRAM-MD5] Klensin, Catoe, Krumviede, "IMAP/POP AUTHorize Extension
+     for Simple Challenge/Response", RFC 2195, MCI, September 1997.
+
+     [DIFFIE-HELLMAN] Diffie, W., Hellman, M.E., "Privacy and
+     Authentication: An introduction to Cryptography," Proceedings of
+     the IEEE, v. 67, n. 3, March 1979, pp. 397-427.
+
+     [DSS] National Institute of Standards and Technology, "Digital
+     Signature Standard," NIST FIPS PUB 186, U.S. Department of
+     Commerce, May 1994.
+
+     [HMAC] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message
+     Authentication", RFC 2104, IBM, UCSD, February 1997.
+
+     [HMAC-TEST] Cheng, Glenn, "Test Cases for HMAC-MD5 and HMAC-SHA-1",
+     RFC 2202, IBM, NIST, September 1997.
+
+     [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
+     4rev1", RFC 2060, University of Washington, December 1996.
+
+     [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
+     Requirement Levels", RFC 2119, Harvard University, March 1997.
+
+
+
+
+Newman                                                         [Page 16]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     [Orm96] Orman, H., "The Oakley Key Determination Protocol", version
+     1, TR97-92, Department of Computer Science Technical Report,
+     University of Arizona.
+
+     [RANDOM] Eastlake, Crocker, Schiller, "Randomness Recommendations
+     for Security", RFC 1750, DEC, Cybercash, MIT, December 1994.
+
+     [SASL] Myers, "Simple Authentication and Security Layer (SASL)",
+     RFC 2222, Netscape Communications, October 1997.
+
+     [SCHNEIER] Schneier, B., "Applied Cryptography: Protocols,
+     Algorithms and Source Code in C," John Wiley and Sons, Inc., 1996.
+
+     [SCRAM] Newman, "Salted Challenge Response Authentication Mechanism
+     (SCRAM)", work in progress, January 1998.
+
+     [SHA1] NIST FIPS PUB 180-1, "Secure Hash Standard," National
+     Institute of Standards and Technology, U.S. Department of Commerce,
+     April 1995.
+
+     [SHORT-EXP] van Oorschot, P., Wiener, M., "On Diffie-Hellman Key
+     Agreement with Short Exponents", Advances in Cryptography --
+     EUROCRYPT Springer-Verlag, ISBN 3-540-61186-X, pp. 332-343.
+
+     [SSH-ARCH] Ylonen, Kivinen, Saarinen, "SSH Protocol Architecture",
+     Work in progress, SSH, October 1997.
+
+     [SSH-TRANS] Ylonen, Kivinen, Saarinen, "SSH Transport Layer
+     Protocol", Work in progress, SSH, October 1997.
+
+     [TIMING] Kocher, P., "Timing Attacks on Implementations of Diffie-
+     Hellman, RSA, DSS and Other Systems", Advances in Cryptography --
+     CRYPTO '96 Proceedings, Lecture Notes in Computer Science, Vol
+     1109, Springer-Verlag, ISBN 3-540-61512-1, pp. 104-113.
+
+     [TLS] Dierks, Allen, "The TLS Protocol Version 1.0", Work in
+     progress.
+
+     [UTF8] Yergeau, "UTF-8, a transformation format of ISO 10646",
+     RFC 2279, Alis Technologies, January 1998.
+
+
+
+
+
+
+
+
+
+
+
+Newman                                                         [Page 17]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+11. Author's Address
+
+     Chris Newman
+     Innosoft International, Inc.
+     1050 Lakes Drive
+     West Covina, CA 91790 USA
+
+     Email: chris.newman at innosoft.com
+
+Appendix A. Algorithm Overview
+
+     This section provides a quick overview of the algorithms used.  For
+     a full understanding, the reader is encouraged to read "Applied
+     Cryptography" [SCHNEIER].  The follow descriptions are paraphrased
+     from that source.
+
+     Note that an overview of the DES algorithm is not included as
+     publicly available implementations and descriptions are very
+     common.
+
+Appendix A.1. DSA Algorithm
+
+     The DSA algorithm is a public key algorithm which can be used to
+     sign messages such that the source can be verified using a public
+     key.  The algorithm has the following parameters:
+
+     p is a prime number L bits long.  Implementations MUST support L
+     between 512 and 1024 bits.
+
+     q is a 160-bit prime factor of (p - 1).
+
+          (p - 1)/q
+     g = h          mod p  where h is any number less than p - 1 such
+
+              (p - 1)/q
+        that h           is greater than 1.
+
+     x is a number less than q and represents the private key.
+
+          x
+     y = g  mod p  and represents the public key.
+
+     To sign a message m, the client generates a random number k less
+     than q and computes:
+
+              k
+        r = (g  mod p) mod q
+
+
+
+
+Newman                                                         [Page 18]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+              -1
+        s = (k  (SHA1(m) + xr)) mod q
+
+     The signature is represented as r and s, and is verified as
+     follows:
+
+              -1
+        w  = s   mod q
+
+        u1 = (SHA1(m) * w) mod q
+
+        u2 = (rw) mod q
+
+                u1    u2
+        v  = ((g   * y  ) mod p) mod q
+
+     If v = r then the signature is verified.
+
+Appendix A.2. Diffie-Hellman Algorithm
+
+     The Diffie-Hellman algorithm is a key-exchange algorithm.  It
+     allows two ends of a communications channel to establish a shared
+     secret which a passive eavesdropper can not easily determine.  This
+     key can then be used in a symmetric algorithm such as triple-DES.
+     The two ends have a prior agreement on two numbers:
+
+     n a large prime number
+
+     g a primitive mod n.
+
+     The client chooses a random large integer x and computes:
+
+            x
+       X = g  mod n
+
+     and sends X to the server.  The server chooses a random large
+     integer y and computes:
+
+           y
+      Y = g  mod n
+
+           y
+      K = X  mod n
+
+     The server sends Y to the client.  The client computes:
+
+           x
+      K = Y  mod n
+
+
+
+Newman                                                         [Page 19]
+

+Internet Draft       PASSDSS-3DES-1 SASL Mechanism            March 1998
+
+
+     At this point, the client and server share the same secret K.
+
+Appendix A.3. Triple-DES Algorithm in EDE/outer-CBC Mode
+
+     The DES algorithm uses an 8 octet (64 bit) key of which 56 bits are
+     significant.  The triple-DES EDE algorithm uses a 24 octet (192
+     bit) key of which roughly 112 bits are significant see [SCHNEIER]
+     for more details.  The "EDE" refers to encrypt-decrypt-encrypt, and
+     the "CBC" refers to cipher-block-chaining where each cipher block
+     affects future cipher blocks.  If E() is the DES encryption
+     function, D() is the DES decryption function, C is a cipher text
+     block and P is a plain-text block, then triple-DES EDE in CBC mode
+     with outer chaining is:
+
+        C  = E  (D  (E  (P  XOR C   )))
+         i    K3  K2  K1  i      i-1
+
+     NOTE: C  is the initialization vector
+            0
+
+     and the decryption function is:
+
+        P  = C    XOR D  (E  (D  (C )))
+         i    i-1      K3  K2  K1  i
+
+     K1 is the first 8 octets of the triple-DES key, K2 is the second 8
+     octets and K3 is the final 8 octets.
+
+Appendix A.4. HMAC-SHA-1 Keyed hash function
+
+     HMAC-SHA-1 uses the SHA-1 hash function to create a keyed hash
+     function suitable for use as an integrity protection function.  A
+     more complete description is in [HMAC].  A brief summary of the
+     algorithm follows:
+
+     (A) If the key is longer than 64 octets, it is run through the
+     SHA-1 function to produce a 20 octet key.
+
+     (B) The key is exclusive-ored with a 64 octet buffer filled with
+     the octet value 0x36.
+
+     (C) SHA-1 is computed over (B) followed by the input text.
+
+     (D) The key is exclusive-ored with a 64 octet buffer filled with
+     the octet value 0x5C.
+
+     (E) SHA-1 is computed over (D) followed by the output of (C).
+
+
+
+
+Newman                                                         [Page 20]
diff --git a/doc/options.html b/doc/options.html
index 4f195f7..beb76ae 100644
--- a/doc/options.html
+++ b/doc/options.html
@@ -148,6 +148,20 @@ cached for a fast reauth.  A value of 0 will disable reauth.</TD>
 <TR>
 <TD>sasldb_path</TD><TD>sasldb plugin</TD>
 <TD>Path to sasldb file</TD><TD><tt>/etc/sasldb2</tt> (system dependant)</TD>
+</TR>
+<TR>
+<TD>sasldb_mapsize</TD><TD>sasldb with LMDB</TD>
+<TD>Size of the memory map used by the DB. This is also the maximum possible
+size of the database, so it must be set to a value large enough to contain
+all the desired user records.</TD>
+<TD>1048576 bytes</TD>
+</TR>
+<TR>
+<TD>sasldb_maxreaders</TD><TD>sasldb with LMDB</TD>
+<TD>Maximum number of threads (or processes) that may concurrently read the
+database.</TD>
+<TD>126</TD>
+</TR>
 <TR>
 <TD>sql_engine</TD><TD>SQL plugin</TD>
 <TD>Name of SQL engine to use (possible values: 'mysql', 'pgsql', 'sqlite', 'sqlite3').</TD>
@@ -342,6 +356,18 @@ sasl-regexp uid=(.*),cn=external,cn=auth
 
 </p>
 
+<h2>Notes on sasldb with LMDB</h2>
+
+<p>
+</p>
+
+<p>The OpenLDAP LMDB library is an extremely compact, extremely high performance
+B+tree database. The code for it is available in the regular OpenLDAP source
+distributions and it is distributed under the terms of the OpenLDAP Public License.</p>
+
+<p>Full documentation, plus papers and presentations are available on
+<a href="symas.com/mdb/">the LMDB page</a>.</p>
+
 <hr>
 Back to the <A href=index.html>index</a>
 
diff --git a/doc/os390.html b/doc/os390.html
new file mode 100644
index 0000000..2029e57
--- /dev/null
+++ b/doc/os390.html
@@ -0,0 +1,56 @@
+<html><head>
+<title>Building and Using Cyrus SASL on OS/390</title>
+<!-- $Id: os390.html,v 1.1 2002/09/06 16:07:35 rjs3 Exp $ -->
+</head>
+<body>
+<h1>Cyrus SASLv2 on OS/390</h1><p>
+
+Cyrus SASLv2 can be made to build on OS/390 with some minimal changes.  Here
+are the suggestions provided by Howard Chu of the OpenLDAP project
+(<i><a href=mailto:hyc at highlandsun.com>hyc at highlandsun.com</a></i>).
+
+<hr>
+
+Cyrus SASL must be compiled in ASCII mode.  This can be accomplished with
+a special invocation of c89.  For ease of use, you can use a shell script
+("acc" is a good name) and set the environment variable CC = acc before
+configuring anything. The shell script is simple:<pre>
+    #! /bin/sh
+    exec /bin/c89 -Wc,CONVLIT\(ISO8859-1\) -Wc,LANGLVL\(EXTENDED\) -D__LIBASCII $*<br></pre>
+To build the source, you'll need to set these environment variables, at a minimum: <pre>
+    _C89_CCMODE=1
+    CC=acc
+    CPP="c89 -E"
+    LD=c89
+    CPPFLAGS=-D_ALL_SOURCE
+</pre>
+That should allow you to run configure and get a coherent build environment. Before you type "make" from the top level though, do this:
+<pre>
+    cd include
+    make CC=c89
+</pre>
+In the include directory is a small program that generates an md5global.h
+header file. This file must be generated in native EBCDIC. If you just
+typed make from the top level, the program and header file would be
+generated in ASCII, with an ASCII filename, which would be very confusing
+and not very useful.
+<p>
+In my initial tests I was able to use SASL/EXTERNAL to perform X.509-based
+authentication with slapd.  I have subsequently tested the DIGEST-MD5
+mechanism, using OpenLDAP's slapd for storage of the secrets. It worked
+without any trouble. Note, I configured sasl --with-dblib=none to prevent
+it from trying to use its own sasldb. This is simply because I haven't had
+the time to fix the EBCDIC/ASCII dependencies in the rest of the SASL
+library. Run as-is with a real database backend, the sasldb would try to
+create ASCII-named database files, which would be very unpleasant. The
+required fixes are trivial, but they are also numerous, and it is a very
+time-consuming task to track down all the dependencies.
+<p>
+Note that this minimal-effort port of SASL will probably only work in the
+context of OpenLDAP (though it may work with other special-case auxprop plugins).
+No effort has been made to fix the ASCII filenames in
+the library, this SASL library will be unable to create/parse/handle
+native config files or database files. This is why I've only tested it
+using secrets stored in slapd, and why I only tried SASL/EXTERNAL at
+first. (EXTERNAL has no config parameters, and is part of libsasl2 itself,
+so it doesn't need to be dynamically loaded from anywhere.)
diff --git a/doc/rfc1321.txt b/doc/rfc1321.txt
new file mode 100644
index 0000000..68af27d
--- /dev/null
+++ b/doc/rfc1321.txt
@@ -0,0 +1,1179 @@
+
+
+
+
+
+
+Network Working Group                                          R. Rivest
+Request for Comments: 1321           MIT Laboratory for Computer Science
+                                             and RSA Data Security, Inc.
+                                                              April 1992
+
+
+                     The MD5 Message-Digest Algorithm
+
+Status of this Memo
+
+   This memo provides information for the Internet community.  It does
+   not specify an Internet standard.  Distribution of this memo is
+   unlimited.
+
+Acknowlegements
+
+   We would like to thank Don Coppersmith, Burt Kaliski, Ralph Merkle,
+   David Chaum, and Noam Nisan for numerous helpful comments and
+   suggestions.
+
+Table of Contents
+
+   1. Executive Summary                                                1
+   2. Terminology and Notation                                         2
+   3. MD5 Algorithm Description                                        3
+   4. Summary                                                          6
+   5. Differences Between MD4 and MD5                                  6
+   References                                                          7
+   APPENDIX A - Reference Implementation                               7
+   Security Considerations                                            21
+   Author's Address                                                   21
+
+1. Executive Summary
+
+   This document describes the MD5 message-digest algorithm. The
+   algorithm takes as input a message of arbitrary length and produces
+   as output a 128-bit "fingerprint" or "message digest" of the input.
+   It is conjectured that it is computationally infeasible to produce
+   two messages having the same message digest, or to produce any
+   message having a given prespecified target message digest. The MD5
+   algorithm is intended for digital signature applications, where a
+   large file must be "compressed" in a secure manner before being
+   encrypted with a private (secret) key under a public-key cryptosystem
+   such as RSA.
+
+
+
+
+
+
+
+Rivest                                                          [Page 1]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+   The MD5 algorithm is designed to be quite fast on 32-bit machines. In
+   addition, the MD5 algorithm does not require any large substitution
+   tables; the algorithm can be coded quite compactly.
+
+   The MD5 algorithm is an extension of the MD4 message-digest algorithm
+   1,2]. MD5 is slightly slower than MD4, but is more "conservative" in
+   design. MD5 was designed because it was felt that MD4 was perhaps
+   being adopted for use more quickly than justified by the existing
+   critical review; because MD4 was designed to be exceptionally fast,
+   it is "at the edge" in terms of risking successful cryptanalytic
+   attack. MD5 backs off a bit, giving up a little in speed for a much
+   greater likelihood of ultimate security. It incorporates some
+   suggestions made by various reviewers, and contains additional
+   optimizations. The MD5 algorithm is being placed in the public domain
+   for review and possible adoption as a standard.
+
+   For OSI-based applications, MD5's object identifier is
+
+   md5 OBJECT IDENTIFIER ::=
+     iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 5}
+
+   In the X.509 type AlgorithmIdentifier [3], the parameters for MD5
+   should have type NULL.
+
+2. Terminology and Notation
+
+   In this document a "word" is a 32-bit quantity and a "byte" is an
+   eight-bit quantity. A sequence of bits can be interpreted in a
+   natural manner as a sequence of bytes, where each consecutive group
+   of eight bits is interpreted as a byte with the high-order (most
+   significant) bit of each byte listed first. Similarly, a sequence of
+   bytes can be interpreted as a sequence of 32-bit words, where each
+   consecutive group of four bytes is interpreted as a word with the
+   low-order (least significant) byte given first.
+
+   Let x_i denote "x sub i". If the subscript is an expression, we
+   surround it in braces, as in x_{i+1}. Similarly, we use ^ for
+   superscripts (exponentiation), so that x^i denotes x to the i-th
+   power.
+
+   Let the symbol "+" denote addition of words (i.e., modulo-2^32
+   addition). Let X <<< s denote the 32-bit value obtained by circularly
+   shifting (rotating) X left by s bit positions. Let not(X) denote the
+   bit-wise complement of X, and let X v Y denote the bit-wise OR of X
+   and Y. Let X xor Y denote the bit-wise XOR of X and Y, and let XY
+   denote the bit-wise AND of X and Y.
+
+
+
+
+
+Rivest                                                          [Page 2]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+3. MD5 Algorithm Description
+
+   We begin by supposing that we have a b-bit message as input, and that
+   we wish to find its message digest. Here b is an arbitrary
+   nonnegative integer; b may be zero, it need not be a multiple of
+   eight, and it may be arbitrarily large. We imagine the bits of the
+   message written down as follows:
+
+          m_0 m_1 ... m_{b-1}
+
+   The following five steps are performed to compute the message digest
+   of the message.
+
+3.1 Step 1. Append Padding Bits
+
+   The message is "padded" (extended) so that its length (in bits) is
+   congruent to 448, modulo 512. That is, the message is extended so
+   that it is just 64 bits shy of being a multiple of 512 bits long.
+   Padding is always performed, even if the length of the message is
+   already congruent to 448, modulo 512.
+
+   Padding is performed as follows: a single "1" bit is appended to the
+   message, and then "0" bits are appended so that the length in bits of
+   the padded message becomes congruent to 448, modulo 512. In all, at
+   least one bit and at most 512 bits are appended.
+
+3.2 Step 2. Append Length
+
+   A 64-bit representation of b (the length of the message before the
+   padding bits were added) is appended to the result of the previous
+   step. In the unlikely event that b is greater than 2^64, then only
+   the low-order 64 bits of b are used. (These bits are appended as two
+   32-bit words and appended low-order word first in accordance with the
+   previous conventions.)
+
+   At this point the resulting message (after padding with bits and with
+   b) has a length that is an exact multiple of 512 bits. Equivalently,
+   this message has a length that is an exact multiple of 16 (32-bit)
+   words. Let M[0 ... N-1] denote the words of the resulting message,
+   where N is a multiple of 16.
+
+3.3 Step 3. Initialize MD Buffer
+
+   A four-word buffer (A,B,C,D) is used to compute the message digest.
+   Here each of A, B, C, D is a 32-bit register. These registers are
+   initialized to the following values in hexadecimal, low-order bytes
+   first):
+
+
+
+
+Rivest                                                          [Page 3]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+          word A: 01 23 45 67
+          word B: 89 ab cd ef
+          word C: fe dc ba 98
+          word D: 76 54 32 10
+
+3.4 Step 4. Process Message in 16-Word Blocks
+
+   We first define four auxiliary functions that each take as input
+   three 32-bit words and produce as output one 32-bit word.
+
+          F(X,Y,Z) = XY v not(X) Z
+          G(X,Y,Z) = XZ v Y not(Z)
+          H(X,Y,Z) = X xor Y xor Z
+          I(X,Y,Z) = Y xor (X v not(Z))
+
+   In each bit position F acts as a conditional: if X then Y else Z.
+   The function F could have been defined using + instead of v since XY
+   and not(X)Z will never have 1's in the same bit position.) It is
+   interesting to note that if the bits of X, Y, and Z are independent
+   and unbiased, the each bit of F(X,Y,Z) will be independent and
+   unbiased.
+
+   The functions G, H, and I are similar to the function F, in that they
+   act in "bitwise parallel" to produce their output from the bits of X,
+   Y, and Z, in such a manner that if the corresponding bits of X, Y,
+   and Z are independent and unbiased, then each bit of G(X,Y,Z),
+   H(X,Y,Z), and I(X,Y,Z) will be independent and unbiased. Note that
+   the function H is the bit-wise "xor" or "parity" function of its
+   inputs.
+
+   This step uses a 64-element table T[1 ... 64] constructed from the
+   sine function. Let T[i] denote the i-th element of the table, which
+   is equal to the integer part of 4294967296 times abs(sin(i)), where i
+   is in radians. The elements of the table are given in the appendix.
+
+   Do the following:
+
+   /* Process each 16-word block. */
+   For i = 0 to N/16-1 do
+
+     /* Copy block i into X. */
+     For j = 0 to 15 do
+       Set X[j] to M[i*16+j].
+     end /* of loop on j */
+
+     /* Save A as AA, B as BB, C as CC, and D as DD. */
+     AA = A
+     BB = B
+
+
+
+Rivest                                                          [Page 4]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+     CC = C
+     DD = D
+
+     /* Round 1. */
+     /* Let [abcd k s i] denote the operation
+          a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
+     /* Do the following 16 operations. */
+     [ABCD  0  7  1]  [DABC  1 12  2]  [CDAB  2 17  3]  [BCDA  3 22  4]
+     [ABCD  4  7  5]  [DABC  5 12  6]  [CDAB  6 17  7]  [BCDA  7 22  8]
+     [ABCD  8  7  9]  [DABC  9 12 10]  [CDAB 10 17 11]  [BCDA 11 22 12]
+     [ABCD 12  7 13]  [DABC 13 12 14]  [CDAB 14 17 15]  [BCDA 15 22 16]
+
+     /* Round 2. */
+     /* Let [abcd k s i] denote the operation
+          a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
+     /* Do the following 16 operations. */
+     [ABCD  1  5 17]  [DABC  6  9 18]  [CDAB 11 14 19]  [BCDA  0 20 20]
+     [ABCD  5  5 21]  [DABC 10  9 22]  [CDAB 15 14 23]  [BCDA  4 20 24]
+     [ABCD  9  5 25]  [DABC 14  9 26]  [CDAB  3 14 27]  [BCDA  8 20 28]
+     [ABCD 13  5 29]  [DABC  2  9 30]  [CDAB  7 14 31]  [BCDA 12 20 32]
+
+     /* Round 3. */
+     /* Let [abcd k s t] denote the operation
+          a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
+     /* Do the following 16 operations. */
+     [ABCD  5  4 33]  [DABC  8 11 34]  [CDAB 11 16 35]  [BCDA 14 23 36]
+     [ABCD  1  4 37]  [DABC  4 11 38]  [CDAB  7 16 39]  [BCDA 10 23 40]
+     [ABCD 13  4 41]  [DABC  0 11 42]  [CDAB  3 16 43]  [BCDA  6 23 44]
+     [ABCD  9  4 45]  [DABC 12 11 46]  [CDAB 15 16 47]  [BCDA  2 23 48]
+
+     /* Round 4. */
+     /* Let [abcd k s t] denote the operation
+          a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
+     /* Do the following 16 operations. */
+     [ABCD  0  6 49]  [DABC  7 10 50]  [CDAB 14 15 51]  [BCDA  5 21 52]
+     [ABCD 12  6 53]  [DABC  3 10 54]  [CDAB 10 15 55]  [BCDA  1 21 56]
+     [ABCD  8  6 57]  [DABC 15 10 58]  [CDAB  6 15 59]  [BCDA 13 21 60]
+     [ABCD  4  6 61]  [DABC 11 10 62]  [CDAB  2 15 63]  [BCDA  9 21 64]
+
+     /* Then perform the following additions. (That is increment each
+        of the four registers by the value it had before this block
+        was started.) */
+     A = A + AA
+     B = B + BB
+     C = C + CC
+     D = D + DD
+
+   end /* of loop on i */
+
+
+
+Rivest                                                          [Page 5]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+3.5 Step 5. Output
+
+   The message digest produced as output is A, B, C, D. That is, we
+   begin with the low-order byte of A, and end with the high-order byte
+   of D.
+
+   This completes the description of MD5. A reference implementation in
+   C is given in the appendix.
+
+4. Summary
+
+   The MD5 message-digest algorithm is simple to implement, and provides
+   a "fingerprint" or message digest of a message of arbitrary length.
+   It is conjectured that the difficulty of coming up with two messages
+   having the same message digest is on the order of 2^64 operations,
+   and that the difficulty of coming up with any message having a given
+   message digest is on the order of 2^128 operations. The MD5 algorithm
+   has been carefully scrutinized for weaknesses. It is, however, a
+   relatively new algorithm and further security analysis is of course
+   justified, as is the case with any new proposal of this sort.
+
+5. Differences Between MD4 and MD5
+
+     The following are the differences between MD4 and MD5:
+
+       1.   A fourth round has been added.
+
+       2.   Each step now has a unique additive constant.
+
+       3.   The function g in round 2 was changed from (XY v XZ v YZ) to
+       (XZ v Y not(Z)) to make g less symmetric.
+
+       4.   Each step now adds in the result of the previous step.  This
+       promotes a faster "avalanche effect".
+
+       5.   The order in which input words are accessed in rounds 2 and
+       3 is changed, to make these patterns less like each other.
+
+       6.   The shift amounts in each round have been approximately
+       optimized, to yield a faster "avalanche effect." The shifts in
+       different rounds are distinct.
+
+
+
+
+
+
+
+
+
+
+Rivest                                                          [Page 6]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+References
+
+   [1] Rivest, R., "The MD4 Message Digest Algorithm", RFC 1320, MIT and
+       RSA Data Security, Inc., April 1992.
+
+   [2] Rivest, R., "The MD4 message digest algorithm", in A.J.  Menezes
+       and S.A. Vanstone, editors, Advances in Cryptology - CRYPTO '90
+       Proceedings, pages 303-311, Springer-Verlag, 1991.
+
+   [3] CCITT Recommendation X.509 (1988), "The Directory -
+       Authentication Framework."
+
+APPENDIX A - Reference Implementation
+
+   This appendix contains the following files taken from RSAREF: A
+   Cryptographic Toolkit for Privacy-Enhanced Mail:
+
+     global.h -- global header file
+
+     md5.h -- header file for MD5
+
+     md5c.c -- source code for MD5
+
+   For more information on RSAREF, send email to <rsaref at rsa.com>.
+
+   The appendix also includes the following file:
+
+     mddriver.c -- test driver for MD2, MD4 and MD5
+
+   The driver compiles for MD5 by default but can compile for MD2 or MD4
+   if the symbol MD is defined on the C compiler command line as 2 or 4.
+
+   The implementation is portable and should work on many different
+   plaforms. However, it is not difficult to optimize the implementation
+   on particular platforms, an exercise left to the reader. For example,
+   on "little-endian" platforms where the lowest-addressed byte in a 32-
+   bit word is the least significant and there are no alignment
+   restrictions, the call to Decode in MD5Transform can be replaced with
+   a typecast.
+
+A.1 global.h
+
+/* GLOBAL.H - RSAREF types and constants
+ */
+
+/* PROTOTYPES should be set to one if and only if the compiler supports
+  function argument prototyping.
+The following makes PROTOTYPES default to 0 if it has not already
+
+
+
+Rivest                                                          [Page 7]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+  been defined with C compiler flags.
+ */
+#ifndef PROTOTYPES
+#define PROTOTYPES 0
+#endif
+
+/* POINTER defines a generic pointer type */
+typedef unsigned char *POINTER;
+
+/* UINT2 defines a two byte word */
+typedef unsigned short int UINT2;
+
+/* UINT4 defines a four byte word */
+typedef unsigned long int UINT4;
+
+/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
+If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
+  returns an empty list.
+ */
+#if PROTOTYPES
+#define PROTO_LIST(list) list
+#else
+#define PROTO_LIST(list) ()
+#endif
+
+A.2 md5.h
+
+/* MD5.H - header file for MD5C.C
+ */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+
+
+
+Rivest                                                          [Page 8]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+ */
+
+/* MD5 context. */
+typedef struct {
+  UINT4 state[4];                                   /* state (ABCD) */
+  UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
+  unsigned char buffer[64];                         /* input buffer */
+} MD5_CTX;
+
+void MD5Init PROTO_LIST ((MD5_CTX *));
+void MD5Update PROTO_LIST
+  ((MD5_CTX *, unsigned char *, unsigned int));
+void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
+
+A.3 md5c.c
+
+/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
+ */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+ */
+
+#include "global.h"
+#include "md5.h"
+
+/* Constants for MD5Transform routine.
+ */
+
+
+
+Rivest                                                          [Page 9]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+#define S11 7
+#define S12 12
+#define S13 17
+#define S14 22
+#define S21 5
+#define S22 9
+#define S23 14
+#define S24 20
+#define S31 4
+#define S32 11
+#define S33 16
+#define S34 23
+#define S41 6
+#define S42 10
+#define S43 15
+#define S44 21
+
+static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
+static void Encode PROTO_LIST
+  ((unsigned char *, UINT4 *, unsigned int));
+static void Decode PROTO_LIST
+  ((UINT4 *, unsigned char *, unsigned int));
+static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
+static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
+
+static unsigned char PADDING[64] = {
+  0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/* F, G, H and I are basic MD5 functions.
+ */
+#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define I(x, y, z) ((y) ^ ((x) | (~z)))
+
+/* ROTATE_LEFT rotates x left n bits.
+ */
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
+Rotation is separate from addition to prevent recomputation.
+ */
+#define FF(a, b, c, d, x, s, ac) { \
+ (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+
+
+
+Rivest                                                         [Page 10]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+ (a) += (b); \
+  }
+#define GG(a, b, c, d, x, s, ac) { \
+ (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+  }
+#define HH(a, b, c, d, x, s, ac) { \
+ (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+  }
+#define II(a, b, c, d, x, s, ac) { \
+ (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+  }
+
+/* MD5 initialization. Begins an MD5 operation, writing a new context.
+ */
+void MD5Init (context)
+MD5_CTX *context;                                        /* context */
+{
+  context->count[0] = context->count[1] = 0;
+  /* Load magic initialization constants.
+*/
+  context->state[0] = 0x67452301;
+  context->state[1] = 0xefcdab89;
+  context->state[2] = 0x98badcfe;
+  context->state[3] = 0x10325476;
+}
+
+/* MD5 block update operation. Continues an MD5 message-digest
+  operation, processing another message block, and updating the
+  context.
+ */
+void MD5Update (context, input, inputLen)
+MD5_CTX *context;                                        /* context */
+unsigned char *input;                                /* input block */
+unsigned int inputLen;                     /* length of input block */
+{
+  unsigned int i, index, partLen;
+
+  /* Compute number of bytes mod 64 */
+  index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+
+  /* Update number of bits */
+  if ((context->count[0] += ((UINT4)inputLen << 3))
+
+
+
+Rivest                                                         [Page 11]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+   < ((UINT4)inputLen << 3))
+ context->count[1]++;
+  context->count[1] += ((UINT4)inputLen >> 29);
+
+  partLen = 64 - index;
+
+  /* Transform as many times as possible.
+*/
+  if (inputLen >= partLen) {
+ MD5_memcpy
+   ((POINTER)&context->buffer[index], (POINTER)input, partLen);
+ MD5Transform (context->state, context->buffer);
+
+ for (i = partLen; i + 63 < inputLen; i += 64)
+   MD5Transform (context->state, &input[i]);
+
+ index = 0;
+  }
+  else
+ i = 0;
+
+  /* Buffer remaining input */
+  MD5_memcpy
+ ((POINTER)&context->buffer[index], (POINTER)&input[i],
+  inputLen-i);
+}
+
+/* MD5 finalization. Ends an MD5 message-digest operation, writing the
+  the message digest and zeroizing the context.
+ */
+void MD5Final (digest, context)
+unsigned char digest[16];                         /* message digest */
+MD5_CTX *context;                                       /* context */
+{
+  unsigned char bits[8];
+  unsigned int index, padLen;
+
+  /* Save number of bits */
+  Encode (bits, context->count, 8);
+
+  /* Pad out to 56 mod 64.
+*/
+  index = (unsigned int)((context->count[0] >> 3) & 0x3f);
+  padLen = (index < 56) ? (56 - index) : (120 - index);
+  MD5Update (context, PADDING, padLen);
+
+  /* Append length (before padding) */
+  MD5Update (context, bits, 8);
+
+
+
+Rivest                                                         [Page 12]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+  /* Store state in digest */
+  Encode (digest, context->state, 16);
+
+  /* Zeroize sensitive information.
+*/
+  MD5_memset ((POINTER)context, 0, sizeof (*context));
+}
+
+/* MD5 basic transformation. Transforms state based on block.
+ */
+static void MD5Transform (state, block)
+UINT4 state[4];
+unsigned char block[64];
+{
+  UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+  Decode (x, block, 64);
+
+  /* Round 1 */
+  FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
+  FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
+  FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
+  FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
+  FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
+  FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
+  FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
+  FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
+  FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
+  FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
+  FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
+  FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
+  FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
+  FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
+  FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
+  FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
+
+ /* Round 2 */
+  GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
+  GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
+  GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
+  GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
+  GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
+  GG (d, a, b, c, x[10], S22,  0x2441453); /* 22 */
+  GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
+  GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
+  GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
+  GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
+  GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
+
+
+
+Rivest                                                         [Page 13]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+  GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
+  GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
+  GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
+  GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
+  GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
+
+  /* Round 3 */
+  HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
+  HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
+  HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
+  HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
+  HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
+  HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
+  HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
+  HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
+  HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
+  HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
+  HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
+  HH (b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
+  HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
+  HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
+  HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
+  HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
+
+  /* Round 4 */
+  II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
+  II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
+  II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
+  II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
+  II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
+  II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
+  II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
+  II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
+  II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
+  II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
+  II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
+  II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
+  II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
+  II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
+  II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
+  II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
+
+  state[0] += a;
+  state[1] += b;
+  state[2] += c;
+  state[3] += d;
+
+  /* Zeroize sensitive information.
+
+
+
+Rivest                                                         [Page 14]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+*/
+  MD5_memset ((POINTER)x, 0, sizeof (x));
+}
+
+/* Encodes input (UINT4) into output (unsigned char). Assumes len is
+  a multiple of 4.
+ */
+static void Encode (output, input, len)
+unsigned char *output;
+UINT4 *input;
+unsigned int len;
+{
+  unsigned int i, j;
+
+  for (i = 0, j = 0; j < len; i++, j += 4) {
+ output[j] = (unsigned char)(input[i] & 0xff);
+ output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
+ output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
+ output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
+  }
+}
+
+/* Decodes input (unsigned char) into output (UINT4). Assumes len is
+  a multiple of 4.
+ */
+static void Decode (output, input, len)
+UINT4 *output;
+unsigned char *input;
+unsigned int len;
+{
+  unsigned int i, j;
+
+  for (i = 0, j = 0; j < len; i++, j += 4)
+ output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
+   (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
+}
+
+/* Note: Replace "for loop" with standard memcpy if possible.
+ */
+
+static void MD5_memcpy (output, input, len)
+POINTER output;
+POINTER input;
+unsigned int len;
+{
+  unsigned int i;
+
+  for (i = 0; i < len; i++)
+
+
+
+Rivest                                                         [Page 15]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+ output[i] = input[i];
+}
+
+/* Note: Replace "for loop" with standard memset if possible.
+ */
+static void MD5_memset (output, value, len)
+POINTER output;
+int value;
+unsigned int len;
+{
+  unsigned int i;
+
+  for (i = 0; i < len; i++)
+ ((char *)output)[i] = (char)value;
+}
+
+A.4 mddriver.c
+
+/* MDDRIVER.C - test driver for MD2, MD4 and MD5
+ */
+
+/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
+rights reserved.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+ */
+
+/* The following makes MD default to MD5 if it has not already been
+  defined with C compiler flags.
+ */
+#ifndef MD
+#define MD MD5
+#endif
+
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
+#include "global.h"
+#if MD == 2
+#include "md2.h"
+#endif
+#if MD == 4
+
+
+
+Rivest                                                         [Page 16]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+#include "md4.h"
+#endif
+#if MD == 5
+#include "md5.h"
+#endif
+
+/* Length of test block, number of test blocks.
+ */
+#define TEST_BLOCK_LEN 1000
+#define TEST_BLOCK_COUNT 1000
+
+static void MDString PROTO_LIST ((char *));
+static void MDTimeTrial PROTO_LIST ((void));
+static void MDTestSuite PROTO_LIST ((void));
+static void MDFile PROTO_LIST ((char *));
+static void MDFilter PROTO_LIST ((void));
+static void MDPrint PROTO_LIST ((unsigned char [16]));
+
+#if MD == 2
+#define MD_CTX MD2_CTX
+#define MDInit MD2Init
+#define MDUpdate MD2Update
+#define MDFinal MD2Final
+#endif
+#if MD == 4
+#define MD_CTX MD4_CTX
+#define MDInit MD4Init
+#define MDUpdate MD4Update
+#define MDFinal MD4Final
+#endif
+#if MD == 5
+#define MD_CTX MD5_CTX
+#define MDInit MD5Init
+#define MDUpdate MD5Update
+#define MDFinal MD5Final
+#endif
+
+/* Main driver.
+
+Arguments (may be any combination):
+  -sstring - digests string
+  -t       - runs time trial
+  -x       - runs test script
+  filename - digests file
+  (none)   - digests standard input
+ */
+int main (argc, argv)
+int argc;
+
+
+
+Rivest                                                         [Page 17]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+char *argv[];
+{
+  int i;
+
+  if (argc > 1)
+ for (i = 1; i < argc; i++)
+   if (argv[i][0] == '-' && argv[i][1] == 's')
+     MDString (argv[i] + 2);
+   else if (strcmp (argv[i], "-t") == 0)
+     MDTimeTrial ();
+   else if (strcmp (argv[i], "-x") == 0)
+     MDTestSuite ();
+   else
+     MDFile (argv[i]);
+  else
+ MDFilter ();
+
+  return (0);
+}
+
+/* Digests a string and prints the result.
+ */
+static void MDString (string)
+char *string;
+{
+  MD_CTX context;
+  unsigned char digest[16];
+  unsigned int len = strlen (string);
+
+  MDInit (&context);
+  MDUpdate (&context, string, len);
+  MDFinal (digest, &context);
+
+  printf ("MD%d (\"%s\") = ", MD, string);
+  MDPrint (digest);
+  printf ("\n");
+}
+
+/* Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte
+  blocks.
+ */
+static void MDTimeTrial ()
+{
+  MD_CTX context;
+  time_t endTime, startTime;
+  unsigned char block[TEST_BLOCK_LEN], digest[16];
+  unsigned int i;
+
+
+
+
+Rivest                                                         [Page 18]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+  printf
+ ("MD%d time trial. Digesting %d %d-byte blocks ...", MD,
+  TEST_BLOCK_LEN, TEST_BLOCK_COUNT);
+
+  /* Initialize block */
+  for (i = 0; i < TEST_BLOCK_LEN; i++)
+ block[i] = (unsigned char)(i & 0xff);
+
+  /* Start timer */
+  time (&startTime);
+
+  /* Digest blocks */
+  MDInit (&context);
+  for (i = 0; i < TEST_BLOCK_COUNT; i++)
+ MDUpdate (&context, block, TEST_BLOCK_LEN);
+  MDFinal (digest, &context);
+
+  /* Stop timer */
+  time (&endTime);
+
+  printf (" done\n");
+  printf ("Digest = ");
+  MDPrint (digest);
+  printf ("\nTime = %ld seconds\n", (long)(endTime-startTime));
+  printf
+ ("Speed = %ld bytes/second\n",
+  (long)TEST_BLOCK_LEN * (long)TEST_BLOCK_COUNT/(endTime-startTime));
+}
+
+/* Digests a reference suite of strings and prints the results.
+ */
+static void MDTestSuite ()
+{
+  printf ("MD%d test suite:\n", MD);
+
+  MDString ("");
+  MDString ("a");
+  MDString ("abc");
+  MDString ("message digest");
+  MDString ("abcdefghijklmnopqrstuvwxyz");
+  MDString
+ ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
+  MDString
+ ("1234567890123456789012345678901234567890\
+1234567890123456789012345678901234567890");
+}
+
+/* Digests a file and prints the result.
+
+
+
+Rivest                                                         [Page 19]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+ */
+static void MDFile (filename)
+char *filename;
+{
+  FILE *file;
+  MD_CTX context;
+  int len;
+  unsigned char buffer[1024], digest[16];
+
+  if ((file = fopen (filename, "rb")) == NULL)
+ printf ("%s can't be opened\n", filename);
+
+  else {
+ MDInit (&context);
+ while (len = fread (buffer, 1, 1024, file))
+   MDUpdate (&context, buffer, len);
+ MDFinal (digest, &context);
+
+ fclose (file);
+
+ printf ("MD%d (%s) = ", MD, filename);
+ MDPrint (digest);
+ printf ("\n");
+  }
+}
+
+/* Digests the standard input and prints the result.
+ */
+static void MDFilter ()
+{
+  MD_CTX context;
+  int len;
+  unsigned char buffer[16], digest[16];
+
+  MDInit (&context);
+  while (len = fread (buffer, 1, 16, stdin))
+ MDUpdate (&context, buffer, len);
+  MDFinal (digest, &context);
+
+  MDPrint (digest);
+  printf ("\n");
+}
+
+/* Prints a message digest in hexadecimal.
+ */
+static void MDPrint (digest)
+unsigned char digest[16];
+{
+
+
+
+Rivest                                                         [Page 20]
+

+RFC 1321              MD5 Message-Digest Algorithm            April 1992
+
+
+  unsigned int i;
+
+  for (i = 0; i < 16; i++)
+ printf ("%02x", digest[i]);
+}
+
+A.5 Test suite
+
+   The MD5 test suite (driver option "-x") should print the following
+   results:
+
+MD5 test suite:
+MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
+MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
+MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
+MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0
+MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b
+MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
+d174ab98d277d9f5a5611c2c9f419d9f
+MD5 ("123456789012345678901234567890123456789012345678901234567890123456
+78901234567890") = 57edf4a22be3c955ac49da2e2107b67a
+
+Security Considerations
+
+   The level of security discussed in this memo is considered to be
+   sufficient for implementing very high security hybrid digital-
+   signature schemes based on MD5 and a public-key cryptosystem.
+
+Author's Address
+
+   Ronald L. Rivest
+   Massachusetts Institute of Technology
+   Laboratory for Computer Science
+   NE43-324
+   545 Technology Square
+   Cambridge, MA  02139-1986
+
+   Phone: (617) 253-5880
+   EMail: rivest at theory.lcs.mit.edu
+
+
+
+
+
+
+
+
+
+
+
+
+Rivest                                                         [Page 21]
+

\ No newline at end of file
diff --git a/doc/rfc1939.txt b/doc/rfc1939.txt
new file mode 100644
index 0000000..b11350e
--- /dev/null
+++ b/doc/rfc1939.txt
@@ -0,0 +1,1291 @@
+
+
+
+
+
+
+Network Working Group                                           J. Myers
+Request for Comments: 1939                               Carnegie Mellon
+STD: 53                                                          M. Rose
+Obsoletes: 1725                             Dover Beach Consulting, Inc.
+Category: Standards Track                                       May 1996
+
+
+                    Post Office Protocol - Version 3
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Table of Contents
+
+   1. Introduction ................................................    2
+   2. A Short Digression ..........................................    2
+   3. Basic Operation .............................................    3
+   4. The AUTHORIZATION State .....................................    4
+      QUIT Command ................................................    5
+   5. The TRANSACTION State .......................................    5
+      STAT Command ................................................    6
+      LIST Command ................................................    6
+      RETR Command ................................................    8
+      DELE Command ................................................    8
+      NOOP Command ................................................    9
+      RSET Command ................................................    9
+   6. The UPDATE State ............................................   10
+      QUIT Command ................................................   10
+   7. Optional POP3 Commands ......................................   11
+      TOP Command .................................................   11
+      UIDL Command ................................................   12
+      USER Command ................................................   13
+      PASS Command ................................................   14
+      APOP Command ................................................   15
+   8. Scaling and Operational Considerations ......................   16
+   9. POP3 Command Summary ........................................   18
+   10. Example POP3 Session .......................................   19
+   11. Message Format .............................................   19
+   12. References .................................................   20
+   13. Security Considerations ....................................   20
+   14. Acknowledgements ...........................................   20
+   15. Authors' Addresses .........................................   21
+   Appendix A. Differences from RFC 1725 ..........................   22
+
+
+
+Myers & Rose                Standards Track                     [Page 1]
+

+RFC 1939                          POP3                          May 1996
+
+
+   Appendix B. Command Index ......................................   23
+
+1. Introduction
+
+   On certain types of smaller nodes in the Internet it is often
+   impractical to maintain a message transport system (MTS).  For
+   example, a workstation may not have sufficient resources (cycles,
+   disk space) in order to permit a SMTP server [RFC821] and associated
+   local mail delivery system to be kept resident and continuously
+   running.  Similarly, it may be expensive (or impossible) to keep a
+   personal computer interconnected to an IP-style network for long
+   amounts of time (the node is lacking the resource known as
+   "connectivity").
+
+   Despite this, it is often very useful to be able to manage mail on
+   these smaller nodes, and they often support a user agent (UA) to aid
+   the tasks of mail handling.  To solve this problem, a node which can
+   support an MTS entity offers a maildrop service to these less endowed
+   nodes.  The Post Office Protocol - Version 3 (POP3) is intended to
+   permit a workstation to dynamically access a maildrop on a server
+   host in a useful fashion.  Usually, this means that the POP3 protocol
+   is used to allow a workstation to retrieve mail that the server is
+   holding for it.
+
+   POP3 is not intended to provide extensive manipulation operations of
+   mail on the server; normally, mail is downloaded and then deleted.  A
+   more advanced (and complex) protocol, IMAP4, is discussed in
+   [RFC1730].
+
+   For the remainder of this memo, the term "client host" refers to a
+   host making use of the POP3 service, while the term "server host"
+   refers to a host which offers the POP3 service.
+
+2. A Short Digression
+
+   This memo does not specify how a client host enters mail into the
+   transport system, although a method consistent with the philosophy of
+   this memo is presented here:
+
+      When the user agent on a client host wishes to enter a message
+      into the transport system, it establishes an SMTP connection to
+      its relay host and sends all mail to it.  This relay host could
+      be, but need not be, the POP3 server host for the client host.  Of
+      course, the relay host must accept mail for delivery to arbitrary
+      recipient addresses, that functionality is not required of all
+      SMTP servers.
+
+
+
+
+
+Myers & Rose                Standards Track                     [Page 2]
+

+RFC 1939                          POP3                          May 1996
+
+
+3. Basic Operation
+
+   Initially, the server host starts the POP3 service by listening on
+   TCP port 110.  When a client host wishes to make use of the service,
+   it establishes a TCP connection with the server host.  When the
+   connection is established, the POP3 server sends a greeting.  The
+   client and POP3 server then exchange commands and responses
+   (respectively) until the connection is closed or aborted.
+
+   Commands in the POP3 consist of a case-insensitive keyword, possibly
+   followed by one or more arguments.  All commands are terminated by a
+   CRLF pair.  Keywords and arguments consist of printable ASCII
+   characters.  Keywords and arguments are each separated by a single
+   SPACE character.  Keywords are three or four characters long. Each
+   argument may be up to 40 characters long.
+
+   Responses in the POP3 consist of a status indicator and a keyword
+   possibly followed by additional information.  All responses are
+   terminated by a CRLF pair.  Responses may be up to 512 characters
+   long, including the terminating CRLF.  There are currently two status
+   indicators: positive ("+OK") and negative ("-ERR").  Servers MUST
+   send the "+OK" and "-ERR" in upper case.
+
+   Responses to certain commands are multi-line.  In these cases, which
+   are clearly indicated below, after sending the first line of the
+   response and a CRLF, any additional lines are sent, each terminated
+   by a CRLF pair.  When all lines of the response have been sent, a
+   final line is sent, consisting of a termination octet (decimal code
+   046, ".") and a CRLF pair.  If any line of the multi-line response
+   begins with the termination octet, the line is "byte-stuffed" by
+   pre-pending the termination octet to that line of the response.
+   Hence a multi-line response is terminated with the five octets
+   "CRLF.CRLF".  When examining a multi-line response, the client checks
+   to see if the line begins with the termination octet.  If so and if
+   octets other than CRLF follow, the first octet of the line (the
+   termination octet) is stripped away.  If so and if CRLF immediately
+   follows the termination character, then the response from the POP
+   server is ended and the line containing ".CRLF" is not considered
+   part of the multi-line response.
+
+   A POP3 session progresses through a number of states during its
+   lifetime.  Once the TCP connection has been opened and the POP3
+   server has sent the greeting, the session enters the AUTHORIZATION
+   state.  In this state, the client must identify itself to the POP3
+   server.  Once the client has successfully done this, the server
+   acquires resources associated with the client's maildrop, and the
+   session enters the TRANSACTION state.  In this state, the client
+   requests actions on the part of the POP3 server.  When the client has
+
+
+
+Myers & Rose                Standards Track                     [Page 3]
+

+RFC 1939                          POP3                          May 1996
+
+
+   issued the QUIT command, the session enters the UPDATE state.  In
+   this state, the POP3 server releases any resources acquired during
+   the TRANSACTION state and says goodbye.  The TCP connection is then
+   closed.
+
+   A server MUST respond to an unrecognized, unimplemented, or
+   syntactically invalid command by responding with a negative status
+   indicator.  A server MUST respond to a command issued when the
+   session is in an incorrect state by responding with a negative status
+   indicator.  There is no general method for a client to distinguish
+   between a server which does not implement an optional command and a
+   server which is unwilling or unable to process the command.
+
+   A POP3 server MAY have an inactivity autologout timer.  Such a timer
+   MUST be of at least 10 minutes' duration.  The receipt of any command
+   from the client during that interval should suffice to reset the
+   autologout timer.  When the timer expires, the session does NOT enter
+   the UPDATE state--the server should close the TCP connection without
+   removing any messages or sending any response to the client.
+
+4. The AUTHORIZATION State
+
+   Once the TCP connection has been opened by a POP3 client, the POP3
+   server issues a one line greeting.  This can be any positive
+   response.  An example might be:
+
+      S:  +OK POP3 server ready
+
+   The POP3 session is now in the AUTHORIZATION state.  The client must
+   now identify and authenticate itself to the POP3 server.  Two
+   possible mechanisms for doing this are described in this document,
+   the USER and PASS command combination and the APOP command.  Both
+   mechanisms are described later in this document.  Additional
+   authentication mechanisms are described in [RFC1734].  While there is
+   no single authentication mechanism that is required of all POP3
+   servers, a POP3 server must of course support at least one
+   authentication mechanism.
+
+   Once the POP3 server has determined through the use of any
+   authentication command that the client should be given access to the
+   appropriate maildrop, the POP3 server then acquires an exclusive-
+   access lock on the maildrop, as necessary to prevent messages from
+   being modified or removed before the session enters the UPDATE state.
+   If the lock is successfully acquired, the POP3 server responds with a
+   positive status indicator.  The POP3 session now enters the
+   TRANSACTION state, with no messages marked as deleted.  If the
+   maildrop cannot be opened for some reason (for example, a lock can
+   not be acquired, the client is denied access to the appropriate
+
+
+
+Myers & Rose                Standards Track                     [Page 4]
+

+RFC 1939                          POP3                          May 1996
+
+
+   maildrop, or the maildrop cannot be parsed), the POP3 server responds
+   with a negative status indicator.  (If a lock was acquired but the
+   POP3 server intends to respond with a negative status indicator, the
+   POP3 server must release the lock prior to rejecting the command.)
+   After returning a negative status indicator, the server may close the
+   connection.  If the server does not close the connection, the client
+   may either issue a new authentication command and start again, or the
+   client may issue the QUIT command.
+
+   After the POP3 server has opened the maildrop, it assigns a message-
+   number to each message, and notes the size of each message in octets.
+   The first message in the maildrop is assigned a message-number of
+   "1", the second is assigned "2", and so on, so that the nth message
+   in a maildrop is assigned a message-number of "n".  In POP3 commands
+   and responses, all message-numbers and message sizes are expressed in
+   base-10 (i.e., decimal).
+
+   Here is the summary for the QUIT command when used in the
+   AUTHORIZATION state:
+
+      QUIT
+
+         Arguments: none
+
+         Restrictions: none
+
+         Possible Responses:
+             +OK
+
+         Examples:
+             C: QUIT
+             S: +OK dewey POP3 server signing off
+
+5. The TRANSACTION State
+
+   Once the client has successfully identified itself to the POP3 server
+   and the POP3 server has locked and opened the appropriate maildrop,
+   the POP3 session is now in the TRANSACTION state.  The client may now
+   issue any of the following POP3 commands repeatedly.  After each
+   command, the POP3 server issues a response.  Eventually, the client
+   issues the QUIT command and the POP3 session enters the UPDATE state.
+
+
+
+
+
+
+
+
+
+
+Myers & Rose                Standards Track                     [Page 5]
+

+RFC 1939                          POP3                          May 1996
+
+
+   Here are the POP3 commands valid in the TRANSACTION state:
+
+      STAT
+
+         Arguments: none
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+         Discussion:
+             The POP3 server issues a positive response with a line
+             containing information for the maildrop.  This line is
+             called a "drop listing" for that maildrop.
+
+             In order to simplify parsing, all POP3 servers are
+             required to use a certain format for drop listings.  The
+             positive response consists of "+OK" followed by a single
+             space, the number of messages in the maildrop, a single
+             space, and the size of the maildrop in octets.  This memo
+             makes no requirement on what follows the maildrop size.
+             Minimal implementations should just end that line of the
+             response with a CRLF pair.  More advanced implementations
+             may include other information.
+
+                NOTE: This memo STRONGLY discourages implementations
+                from supplying additional information in the drop
+                listing.  Other, optional, facilities are discussed
+                later on which permit the client to parse the messages
+                in the maildrop.
+
+             Note that messages marked as deleted are not counted in
+             either total.
+
+         Possible Responses:
+             +OK nn mm
+
+         Examples:
+             C: STAT
+             S: +OK 2 320
+
+
+      LIST [msg]
+
+         Arguments:
+             a message-number (optional), which, if present, may NOT
+             refer to a message marked as deleted
+
+
+
+
+
+Myers & Rose                Standards Track                     [Page 6]
+

+RFC 1939                          POP3                          May 1996
+
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+         Discussion:
+             If an argument was given and the POP3 server issues a
+             positive response with a line containing information for
+             that message.  This line is called a "scan listing" for
+             that message.
+
+             If no argument was given and the POP3 server issues a
+             positive response, then the response given is multi-line.
+             After the initial +OK, for each message in the maildrop,
+             the POP3 server responds with a line containing
+             information for that message.  This line is also called a
+             "scan listing" for that message.  If there are no
+             messages in the maildrop, then the POP3 server responds
+             with no scan listings--it issues a positive response
+             followed by a line containing a termination octet and a
+             CRLF pair.
+
+             In order to simplify parsing, all POP3 servers are
+             required to use a certain format for scan listings.  A
+             scan listing consists of the message-number of the
+             message, followed by a single space and the exact size of
+             the message in octets.  Methods for calculating the exact
+             size of the message are described in the "Message Format"
+             section below.  This memo makes no requirement on what
+             follows the message size in the scan listing.  Minimal
+             implementations should just end that line of the response
+             with a CRLF pair.  More advanced implementations may
+             include other information, as parsed from the message.
+
+                NOTE: This memo STRONGLY discourages implementations
+                from supplying additional information in the scan
+                listing.  Other, optional, facilities are discussed
+                later on which permit the client to parse the messages
+                in the maildrop.
+
+             Note that messages marked as deleted are not listed.
+
+         Possible Responses:
+             +OK scan listing follows
+             -ERR no such message
+
+         Examples:
+             C: LIST
+             S: +OK 2 messages (320 octets)
+             S: 1 120
+
+
+
+Myers & Rose                Standards Track                     [Page 7]
+

+RFC 1939                          POP3                          May 1996
+
+
+             S: 2 200
+             S: .
+               ...
+             C: LIST 2
+             S: +OK 2 200
+               ...
+             C: LIST 3
+             S: -ERR no such message, only 2 messages in maildrop
+
+
+      RETR msg
+
+         Arguments:
+             a message-number (required) which may NOT refer to a
+             message marked as deleted
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+         Discussion:
+             If the POP3 server issues a positive response, then the
+             response given is multi-line.  After the initial +OK, the
+             POP3 server sends the message corresponding to the given
+             message-number, being careful to byte-stuff the termination
+             character (as with all multi-line responses).
+
+         Possible Responses:
+             +OK message follows
+             -ERR no such message
+
+         Examples:
+             C: RETR 1
+             S: +OK 120 octets
+             S: <the POP3 server sends the entire message here>
+             S: .
+
+
+      DELE msg
+
+         Arguments:
+             a message-number (required) which may NOT refer to a
+             message marked as deleted
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+
+
+
+
+
+Myers & Rose                Standards Track                     [Page 8]
+

+RFC 1939                          POP3                          May 1996
+
+
+         Discussion:
+             The POP3 server marks the message as deleted.  Any future
+             reference to the message-number associated with the message
+             in a POP3 command generates an error.  The POP3 server does
+             not actually delete the message until the POP3 session
+             enters the UPDATE state.
+
+         Possible Responses:
+             +OK message deleted
+             -ERR no such message
+
+         Examples:
+             C: DELE 1
+             S: +OK message 1 deleted
+                ...
+             C: DELE 2
+             S: -ERR message 2 already deleted
+
+
+      NOOP
+
+         Arguments: none
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+         Discussion:
+             The POP3 server does nothing, it merely replies with a
+             positive response.
+
+         Possible Responses:
+             +OK
+
+         Examples:
+             C: NOOP
+             S: +OK
+
+
+      RSET
+
+         Arguments: none
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+         Discussion:
+             If any messages have been marked as deleted by the POP3
+             server, they are unmarked.  The POP3 server then replies
+
+
+
+Myers & Rose                Standards Track                     [Page 9]
+

+RFC 1939                          POP3                          May 1996
+
+
+             with a positive response.
+
+         Possible Responses:
+             +OK
+
+         Examples:
+             C: RSET
+             S: +OK maildrop has 2 messages (320 octets)
+
+6. The UPDATE State
+
+   When the client issues the QUIT command from the TRANSACTION state,
+   the POP3 session enters the UPDATE state.  (Note that if the client
+   issues the QUIT command from the AUTHORIZATION state, the POP3
+   session terminates but does NOT enter the UPDATE state.)
+
+   If a session terminates for some reason other than a client-issued
+   QUIT command, the POP3 session does NOT enter the UPDATE state and
+   MUST not remove any messages from the maildrop.
+
+      QUIT
+
+         Arguments: none
+
+         Restrictions: none
+
+         Discussion:
+             The POP3 server removes all messages marked as deleted
+             from the maildrop and replies as to the status of this
+             operation.  If there is an error, such as a resource
+             shortage, encountered while removing messages, the
+             maildrop may result in having some or none of the messages
+             marked as deleted be removed.  In no case may the server
+             remove any messages not marked as deleted.
+
+             Whether the removal was successful or not, the server
+             then releases any exclusive-access lock on the maildrop
+             and closes the TCP connection.
+
+         Possible Responses:
+             +OK
+             -ERR some deleted messages not removed
+
+         Examples:
+             C: QUIT
+             S: +OK dewey POP3 server signing off (maildrop empty)
+                ...
+             C: QUIT
+
+
+
+Myers & Rose                Standards Track                    [Page 10]
+

+RFC 1939                          POP3                          May 1996
+
+
+             S: +OK dewey POP3 server signing off (2 messages left)
+                ...
+
+7. Optional POP3 Commands
+
+   The POP3 commands discussed above must be supported by all minimal
+   implementations of POP3 servers.
+
+   The optional POP3 commands described below permit a POP3 client
+   greater freedom in message handling, while preserving a simple POP3
+   server implementation.
+
+      NOTE: This memo STRONGLY encourages implementations to support
+      these commands in lieu of developing augmented drop and scan
+      listings.  In short, the philosophy of this memo is to put
+      intelligence in the part of the POP3 client and not the POP3
+      server.
+
+      TOP msg n
+
+         Arguments:
+             a message-number (required) which may NOT refer to to a
+             message marked as deleted, and a non-negative number
+             of lines (required)
+
+         Restrictions:
+             may only be given in the TRANSACTION state
+
+         Discussion:
+             If the POP3 server issues a positive response, then the
+             response given is multi-line.  After the initial +OK, the
+             POP3 server sends the headers of the message, the blank
+             line separating the headers from the body, and then the
+             number of lines of the indicated message's body, being
+             careful to byte-stuff the termination character (as with
+             all multi-line responses).
+
+             Note that if the number of lines requested by the POP3
+             client is greater than than the number of lines in the
+             body, then the POP3 server sends the entire message.
+
+         Possible Responses:
+             +OK top of message follows
+             -ERR no such message
+
+         Examples:
+             C: TOP 1 10
+             S: +OK
+
+
+
+Myers & Rose                Standards Track                    [Page 11]
+

+RFC 1939                          POP3                          May 1996
+
+
+             S: <the POP3 server sends the headers of the
+                message, a blank line, and the first 10 lines
+                of the body of the message>
+             S: .
+                ...
+             C: TOP 100 3
+             S: -ERR no such message
+
+
+      UIDL [msg]
+
+      Arguments:
+          a message-number (optional), which, if present, may NOT
+          refer to a message marked as deleted
+
+      Restrictions:
+          may only be given in the TRANSACTION state.
+
+      Discussion:
+          If an argument was given and the POP3 server issues a positive
+          response with a line containing information for that message.
+          This line is called a "unique-id listing" for that message.
+
+          If no argument was given and the POP3 server issues a positive
+          response, then the response given is multi-line.  After the
+          initial +OK, for each message in the maildrop, the POP3 server
+          responds with a line containing information for that message.
+          This line is called a "unique-id listing" for that message.
+
+          In order to simplify parsing, all POP3 servers are required to
+          use a certain format for unique-id listings.  A unique-id
+          listing consists of the message-number of the message,
+          followed by a single space and the unique-id of the message.
+          No information follows the unique-id in the unique-id listing.
+
+          The unique-id of a message is an arbitrary server-determined
+          string, consisting of one to 70 characters in the range 0x21
+          to 0x7E, which uniquely identifies a message within a
+          maildrop and which persists across sessions.  This
+          persistence is required even if a session ends without
+          entering the UPDATE state.  The server should never reuse an
+          unique-id in a given maildrop, for as long as the entity
+          using the unique-id exists.
+
+          Note that messages marked as deleted are not listed.
+
+          While it is generally preferable for server implementations
+          to store arbitrarily assigned unique-ids in the maildrop,
+
+
+
+Myers & Rose                Standards Track                    [Page 12]
+

+RFC 1939                          POP3                          May 1996
+
+
+          this specification is intended to permit unique-ids to be
+          calculated as a hash of the message.  Clients should be able
+          to handle a situation where two identical copies of a
+          message in a maildrop have the same unique-id.
+
+      Possible Responses:
+          +OK unique-id listing follows
+          -ERR no such message
+
+      Examples:
+          C: UIDL
+          S: +OK
+          S: 1 whqtswO00WBw418f9t5JxYwZ
+          S: 2 QhdPYR:00WBw1Ph7x7
+          S: .
+             ...
+          C: UIDL 2
+          S: +OK 2 QhdPYR:00WBw1Ph7x7
+             ...
+          C: UIDL 3
+          S: -ERR no such message, only 2 messages in maildrop
+
+
+      USER name
+
+         Arguments:
+             a string identifying a mailbox (required), which is of
+             significance ONLY to the server
+
+         Restrictions:
+             may only be given in the AUTHORIZATION state after the POP3
+             greeting or after an unsuccessful USER or PASS command
+
+         Discussion:
+             To authenticate using the USER and PASS command
+             combination, the client must first issue the USER
+             command.  If the POP3 server responds with a positive
+             status indicator ("+OK"), then the client may issue
+             either the PASS command to complete the authentication,
+             or the QUIT command to terminate the POP3 session.  If
+             the POP3 server responds with a negative status indicator
+             ("-ERR") to the USER command, then the client may either
+             issue a new authentication command or may issue the QUIT
+             command.
+
+             The server may return a positive response even though no
+             such mailbox exists.  The server may return a negative
+             response if mailbox exists, but does not permit plaintext
+
+
+
+Myers & Rose                Standards Track                    [Page 13]
+

+RFC 1939                          POP3                          May 1996
+
+
+             password authentication.
+
+         Possible Responses:
+             +OK name is a valid mailbox
+             -ERR never heard of mailbox name
+
+         Examples:
+             C: USER frated
+             S: -ERR sorry, no mailbox for frated here
+                ...
+             C: USER mrose
+             S: +OK mrose is a real hoopy frood
+
+
+      PASS string
+
+         Arguments:
+             a server/mailbox-specific password (required)
+
+         Restrictions:
+             may only be given in the AUTHORIZATION state immediately
+             after a successful USER command
+
+         Discussion:
+             When the client issues the PASS command, the POP3 server
+             uses the argument pair from the USER and PASS commands to
+             determine if the client should be given access to the
+             appropriate maildrop.
+
+             Since the PASS command has exactly one argument, a POP3
+             server may treat spaces in the argument as part of the
+             password, instead of as argument separators.
+
+         Possible Responses:
+             +OK maildrop locked and ready
+             -ERR invalid password
+             -ERR unable to lock maildrop
+
+         Examples:
+             C: USER mrose
+             S: +OK mrose is a real hoopy frood
+             C: PASS secret
+             S: -ERR maildrop already locked
+               ...
+             C: USER mrose
+             S: +OK mrose is a real hoopy frood
+             C: PASS secret
+             S: +OK mrose's maildrop has 2 messages (320 octets)
+
+
+
+Myers & Rose                Standards Track                    [Page 14]
+

+RFC 1939                          POP3                          May 1996
+
+
+      APOP name digest
+
+         Arguments:
+             a string identifying a mailbox and a MD5 digest string
+             (both required)
+
+         Restrictions:
+             may only be given in the AUTHORIZATION state after the POP3
+             greeting or after an unsuccessful USER or PASS command
+
+         Discussion:
+             Normally, each POP3 session starts with a USER/PASS
+             exchange.  This results in a server/user-id specific
+             password being sent in the clear on the network.  For
+             intermittent use of POP3, this may not introduce a sizable
+             risk.  However, many POP3 client implementations connect to
+             the POP3 server on a regular basis -- to check for new
+             mail.  Further the interval of session initiation may be on
+             the order of five minutes.  Hence, the risk of password
+             capture is greatly enhanced.
+
+             An alternate method of authentication is required which
+             provides for both origin authentication and replay
+             protection, but which does not involve sending a password
+             in the clear over the network.  The APOP command provides
+             this functionality.
+
+             A POP3 server which implements the APOP command will
+             include a timestamp in its banner greeting.  The syntax of
+             the timestamp corresponds to the `msg-id' in [RFC822], and
+             MUST be different each time the POP3 server issues a banner
+             greeting.  For example, on a UNIX implementation in which a
+             separate UNIX process is used for each instance of a POP3
+             server, the syntax of the timestamp might be:
+
+                <process-ID.clock at hostname>
+
+             where `process-ID' is the decimal value of the process's
+             PID, clock is the decimal value of the system clock, and
+             hostname is the fully-qualified domain-name corresponding
+             to the host where the POP3 server is running.
+
+             The POP3 client makes note of this timestamp, and then
+             issues the APOP command.  The `name' parameter has
+             identical semantics to the `name' parameter of the USER
+             command. The `digest' parameter is calculated by applying
+             the MD5 algorithm [RFC1321] to a string consisting of the
+             timestamp (including angle-brackets) followed by a shared
+
+
+
+Myers & Rose                Standards Track                    [Page 15]
+

+RFC 1939                          POP3                          May 1996
+
+
+             secret.  This shared secret is a string known only to the
+             POP3 client and server.  Great care should be taken to
+             prevent unauthorized disclosure of the secret, as knowledge
+             of the secret will allow any entity to successfully
+             masquerade as the named user.  The `digest' parameter
+             itself is a 16-octet value which is sent in hexadecimal
+             format, using lower-case ASCII characters.
+
+             When the POP3 server receives the APOP command, it verifies
+             the digest provided.  If the digest is correct, the POP3
+             server issues a positive response, and the POP3 session
+             enters the TRANSACTION state.  Otherwise, a negative
+             response is issued and the POP3 session remains in the
+             AUTHORIZATION state.
+
+             Note that as the length of the shared secret increases, so
+             does the difficulty of deriving it.  As such, shared
+             secrets should be long strings (considerably longer than
+             the 8-character example shown below).
+
+         Possible Responses:
+             +OK maildrop locked and ready
+             -ERR permission denied
+
+         Examples:
+             S: +OK POP3 server ready <1896.697170952 at dbc.mtview.ca.us>
+             C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
+             S: +OK maildrop has 1 message (369 octets)
+
+             In this example, the shared  secret  is  the  string  `tan-
+             staaf'.  Hence, the MD5 algorithm is applied to the string
+
+                <1896.697170952 at dbc.mtview.ca.us>tanstaaf
+
+             which produces a digest value of
+
+                c4c9334bac560ecc979e58001b3e22fb
+
+8. Scaling and Operational Considerations
+
+   Since some of the optional features described above were added to the
+   POP3 protocol, experience has accumulated in using them in large-
+   scale commercial post office operations where most of the users are
+   unrelated to each other.  In these situations and others, users and
+   vendors of POP3 clients have discovered that the combination of using
+   the UIDL command and not issuing the DELE command can provide a weak
+   version of the "maildrop as semi-permanent repository" functionality
+   normally associated with IMAP.  Of course the other capabilities of
+
+
+
+Myers & Rose                Standards Track                    [Page 16]
+

+RFC 1939                          POP3                          May 1996
+
+
+   IMAP, such as polling an existing connection for newly arrived
+   messages and supporting multiple folders on the server, are not
+   present in POP3.
+
+   When these facilities are used in this way by casual users, there has
+   been a tendency for already-read messages to accumulate on the server
+   without bound.  This is clearly an undesirable behavior pattern from
+   the standpoint of the server operator.  This situation is aggravated
+   by the fact that the limited capabilities of the POP3 do not permit
+   efficient handling of maildrops which have hundreds or thousands of
+   messages.
+
+   Consequently, it is recommended that operators of large-scale multi-
+   user servers, especially ones in which the user's only access to the
+   maildrop is via POP3, consider such options as:
+
+   *  Imposing a per-user maildrop storage quota or the like.
+
+      A disadvantage to this option is that accumulation of messages may
+      result in the user's inability to receive new ones into the
+      maildrop.  Sites which choose this option should be sure to inform
+      users of impending or current exhaustion of quota, perhaps by
+      inserting an appropriate message into the user's maildrop.
+
+   *  Enforce a site policy regarding mail retention on the server.
+
+      Sites are free to establish local policy regarding the storage and
+      retention of messages on the server, both read and unread.  For
+      example, a site might delete unread messages from the server after
+      60 days and delete read messages after 7 days.  Such message
+      deletions are outside the scope of the POP3 protocol and are not
+      considered a protocol violation.
+
+      Server operators enforcing message deletion policies should take
+      care to make all users aware of the policies in force.
+
+      Clients must not assume that a site policy will automate message
+      deletions, and should continue to explicitly delete messages using
+      the DELE command when appropriate.
+
+      It should be noted that enforcing site message deletion policies
+      may be confusing to the user community, since their POP3 client
+      may contain configuration options to leave mail on the server
+      which will not in fact be supported by the server.
+
+      One special case of a site policy is that messages may only be
+      downloaded once from the server, and are deleted after this has
+      been accomplished.  This could be implemented in POP3 server
+
+
+
+Myers & Rose                Standards Track                    [Page 17]
+

+RFC 1939                          POP3                          May 1996
+
+
+      software by the following mechanism: "following a POP3 login by a
+      client which was ended by a QUIT, delete all messages downloaded
+      during the session with the RETR command".  It is important not to
+      delete messages in the event of abnormal connection termination
+      (ie, if no QUIT was received from the client) because the client
+      may not have successfully received or stored the messages.
+      Servers implementing a download-and-delete policy may also wish to
+      disable or limit the optional TOP command, since it could be used
+      as an alternate mechanism to download entire messages.
+
+9. POP3 Command Summary
+
+      Minimal POP3 Commands:
+
+         USER name               valid in the AUTHORIZATION state
+         PASS string
+         QUIT
+
+         STAT                    valid in the TRANSACTION state
+         LIST [msg]
+         RETR msg
+         DELE msg
+         NOOP
+         RSET
+         QUIT
+
+      Optional POP3 Commands:
+
+         APOP name digest        valid in the AUTHORIZATION state
+
+         TOP msg n               valid in the TRANSACTION state
+         UIDL [msg]
+
+      POP3 Replies:
+
+         +OK
+         -ERR
+
+      Note that with the exception of the STAT, LIST, and UIDL commands,
+      the reply given by the POP3 server to any command is significant
+      only to "+OK" and "-ERR".  Any text occurring after this reply
+      may be ignored by the client.
+
+
+
+
+
+
+
+
+
+Myers & Rose                Standards Track                    [Page 18]
+

+RFC 1939                          POP3                          May 1996
+
+
+10. Example POP3 Session
+
+      S: <wait for connection on TCP port 110>
+      C: <open connection>
+      S:    +OK POP3 server ready <1896.697170952 at dbc.mtview.ca.us>
+      C:    APOP mrose c4c9334bac560ecc979e58001b3e22fb
+      S:    +OK mrose's maildrop has 2 messages (320 octets)
+      C:    STAT
+      S:    +OK 2 320
+      C:    LIST
+      S:    +OK 2 messages (320 octets)
+      S:    1 120
+      S:    2 200
+      S:    .
+      C:    RETR 1
+      S:    +OK 120 octets
+      S:    <the POP3 server sends message 1>
+      S:    .
+      C:    DELE 1
+      S:    +OK message 1 deleted
+      C:    RETR 2
+      S:    +OK 200 octets
+      S:    <the POP3 server sends message 2>
+      S:    .
+      C:    DELE 2
+      S:    +OK message 2 deleted
+      C:    QUIT
+      S:    +OK dewey POP3 server signing off (maildrop empty)
+      C:  <close connection>
+      S:  <wait for next connection>
+
+11. Message Format
+
+   All messages transmitted during a POP3 session are assumed to conform
+   to the standard for the format of Internet text messages [RFC822].
+
+   It is important to note that the octet count for a message on the
+   server host may differ from the octet count assigned to that message
+   due to local conventions for designating end-of-line.  Usually,
+   during the AUTHORIZATION state of the POP3 session, the POP3 server
+   can calculate the size of each message in octets when it opens the
+   maildrop.  For example, if the POP3 server host internally represents
+   end-of-line as a single character, then the POP3 server simply counts
+   each occurrence of this character in a message as two octets.  Note
+   that lines in the message which start with the termination octet need
+   not (and must not) be counted twice, since the POP3 client will
+   remove all byte-stuffed termination characters when it receives a
+   multi-line response.
+
+
+
+Myers & Rose                Standards Track                    [Page 19]
+

+RFC 1939                          POP3                          May 1996
+
+
+12. References
+
+   [RFC821] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC
+       821, USC/Information Sciences Institute, August 1982.
+
+   [RFC822] Crocker, D., "Standard for the Format of ARPA-Internet Text
+       Messages", STD 11, RFC 822, University of Delaware, August 1982.
+
+   [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
+       MIT Laboratory for Computer Science, April 1992.
+
+   [RFC1730] Crispin, M., "Internet Message Access Protocol - Version
+       4", RFC 1730, University of Washington, December 1994.
+
+   [RFC1734] Myers, J., "POP3 AUTHentication command", RFC 1734,
+       Carnegie Mellon, December 1994.
+
+13. Security Considerations
+
+   It is conjectured that use of the APOP command provides origin
+   identification and replay protection for a POP3 session.
+   Accordingly, a POP3 server which implements both the PASS and APOP
+   commands should not allow both methods of access for a given user;
+   that is, for a given mailbox name, either the USER/PASS command
+   sequence or the APOP command is allowed, but not both.
+
+   Further, note that as the length of the shared secret increases, so
+   does the difficulty of deriving it.
+
+   Servers that answer -ERR to the USER command are giving potential
+   attackers clues about which names are valid.
+
+   Use of the PASS command sends passwords in the clear over the
+   network.
+
+   Use of the RETR and TOP commands sends mail in the clear over the
+   network.
+
+   Otherwise, security issues are not discussed in this memo.
+
+14. Acknowledgements
+
+   The POP family has a long and checkered history.  Although primarily
+   a minor revision to RFC 1460, POP3 is based on the ideas presented in
+   RFCs 918, 937, and 1081.
+
+   In addition, Alfred Grimstad, Keith McCloghrie, and Neil Ostroff
+   provided significant comments on the APOP command.
+
+
+
+Myers & Rose                Standards Track                    [Page 20]
+

+RFC 1939                          POP3                          May 1996
+
+
+15. Authors' Addresses
+
+   John G. Myers
+   Carnegie-Mellon University
+   5000 Forbes Ave
+   Pittsburgh, PA 15213
+
+   EMail: jgm+ at cmu.edu
+
+
+   Marshall T. Rose
+   Dover Beach Consulting, Inc.
+   420 Whisman Court
+   Mountain View, CA  94043-2186
+
+   EMail: mrose at dbc.mtview.ca.us
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Myers & Rose                Standards Track                    [Page 21]
+

+RFC 1939                          POP3                          May 1996
+
+
+Appendix A. Differences from RFC 1725
+
+   This memo is a revision to RFC 1725, a Draft Standard.  It makes the
+   following changes from that document:
+
+      - clarifies that command keywords are case insensitive.
+
+      - specifies that servers must send "+OK" and "-ERR" in
+        upper case.
+
+      - specifies that the initial greeting is a positive response,
+        instead of any string which should be a positive response.
+
+      - clarifies behavior for unimplemented commands.
+
+      - makes the USER and PASS commands optional.
+
+      - clarified the set of possible responses to the USER command.
+
+      - reverses the order of the examples in the USER and PASS
+        commands, to reduce confusion.
+
+      - clarifies that the PASS command may only be given immediately
+        after a successful USER command.
+
+      - clarified the persistence requirements of UIDs and added some
+        implementation notes.
+
+      - specifies a UID length limitation of one to 70 octets.
+
+      - specifies a status indicator length limitation
+        of 512 octets, including the CRLF.
+
+      - clarifies that LIST with no arguments on an empty mailbox
+        returns success.
+
+      - adds a reference from the LIST command to the Message Format
+        section
+
+      - clarifies the behavior of QUIT upon failure
+
+      - clarifies the security section to not imply the use of the
+        USER command with the APOP command.
+
+      - adds references to RFCs 1730 and 1734
+
+      - clarifies the method by which a UA may enter mail into the
+        transport system.
+
+
+
+Myers & Rose                Standards Track                    [Page 22]
+

+RFC 1939                          POP3                          May 1996
+
+
+      - clarifies that the second argument to the TOP command is a
+        number of lines.
+
+      - changes the suggestion in the Security Considerations section
+        for a server to not accept both PASS and APOP for a given user
+        from a "must" to a "should".
+
+      - adds a section on scaling and operational considerations
+
+Appendix B. Command Index
+
+       APOP .......................................................   15
+       DELE .......................................................    8
+       LIST .......................................................    6
+       NOOP .......................................................    9
+       PASS .......................................................   14
+       QUIT .......................................................    5
+       QUIT .......................................................   10
+       RETR .......................................................    8
+       RSET .......................................................    9
+       STAT .......................................................    6
+       TOP ........................................................   11
+       UIDL .......................................................   12
+       USER .......................................................   13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Myers & Rose                Standards Track                    [Page 23]
+

diff --git a/doc/rfc2104.txt b/doc/rfc2104.txt
new file mode 100644
index 0000000..1fb8fe1
--- /dev/null
+++ b/doc/rfc2104.txt
@@ -0,0 +1,619 @@
+
+
+
+
+
+
+Network Working Group                                       H. Krawczyk
+Request for Comments: 2104                                          IBM
+Category: Informational                                      M. Bellare
+                                                                   UCSD
+                                                             R. Canetti
+                                                                    IBM
+                                                          February 1997
+
+
+             HMAC: Keyed-Hashing for Message Authentication
+
+Status of This Memo
+
+   This memo provides information for the Internet community.  This memo
+   does not specify an Internet standard of any kind.  Distribution of
+   this memo is unlimited.
+
+Abstract
+
+   This document describes HMAC, a mechanism for message authentication
+   using cryptographic hash functions. HMAC can be used with any
+   iterative cryptographic hash function, e.g., MD5, SHA-1, in
+   combination with a secret shared key.  The cryptographic strength of
+   HMAC depends on the properties of the underlying hash function.
+
+1. Introduction
+
+   Providing a way to check the integrity of information transmitted
+   over or stored in an unreliable medium is a prime necessity in the
+   world of open computing and communications. Mechanisms that provide
+   such integrity check based on a secret key are usually called
+   "message authentication codes" (MAC). Typically, message
+   authentication codes are used between two parties that share a secret
+   key in order to validate information transmitted between these
+   parties. In this document we present such a MAC mechanism based on
+   cryptographic hash functions. This mechanism, called HMAC, is based
+   on work by the authors [BCK1] where the construction is presented and
+   cryptographically analyzed. We refer to that work for the details on
+   the rationale and security analysis of HMAC, and its comparison to
+   other keyed-hash methods.
+
+
+
+
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 1]
+

+RFC 2104                          HMAC                     February 1997
+
+
+   HMAC can be used in combination with any iterated cryptographic hash
+   function. MD5 and SHA-1 are examples of such hash functions. HMAC
+   also uses a secret key for calculation and verification of the
+   message authentication values. The main goals behind this
+   construction are
+
+   * To use, without modifications, available hash functions.
+     In particular, hash functions that perform well in software,
+     and for which code is freely and widely available.
+
+   * To preserve the original performance of the hash function without
+     incurring a significant degradation.
+
+   * To use and handle keys in a simple way.
+
+   * To have a well understood cryptographic analysis of the strength of
+     the authentication mechanism based on reasonable assumptions on the
+     underlying hash function.
+
+   * To allow for easy replaceability of the underlying hash function in
+     case that faster or more secure hash functions are found or
+     required.
+
+   This document specifies HMAC using a generic cryptographic hash
+   function (denoted by H). Specific instantiations of HMAC need to
+   define a particular hash function. Current candidates for such hash
+   functions include SHA-1 [SHA], MD5 [MD5], RIPEMD-128/160 [RIPEMD].
+   These different realizations of HMAC will be denoted by HMAC-SHA1,
+   HMAC-MD5, HMAC-RIPEMD, etc.
+
+   Note: To the date of writing of this document MD5 and SHA-1 are the
+   most widely used cryptographic hash functions. MD5 has been recently
+   shown to be vulnerable to collision search attacks [Dobb].  This
+   attack and other currently known weaknesses of MD5 do not compromise
+   the use of MD5 within HMAC as specified in this document (see
+   [Dobb]); however, SHA-1 appears to be a cryptographically stronger
+   function. To this date, MD5 can be considered for use in HMAC for
+   applications where the superior performance of MD5 is critical.   In
+   any case, implementers and users need to be aware of possible
+   cryptanalytic developments regarding any of these cryptographic hash
+   functions, and the eventual need to replace the underlying hash
+   function. (See section 6 for more information on the security of
+   HMAC.)
+
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 2]
+

+RFC 2104                          HMAC                     February 1997
+
+
+2. Definition of HMAC
+
+   The definition of HMAC requires a cryptographic hash function, which
+   we denote by H, and a secret key K. We assume H to be a cryptographic
+   hash function where data is hashed by iterating a basic compression
+   function on blocks of data.   We denote by B the byte-length of such
+   blocks (B=64 for all the above mentioned examples of hash functions),
+   and by L the byte-length of hash outputs (L=16 for MD5, L=20 for
+   SHA-1).  The authentication key K can be of any length up to B, the
+   block length of the hash function.  Applications that use keys longer
+   than B bytes will first hash the key using H and then use the
+   resultant L byte string as the actual key to HMAC. In any case the
+   minimal recommended length for K is L bytes (as the hash output
+   length). See section 3 for more information on keys.
+
+   We define two fixed and different strings ipad and opad as follows
+   (the 'i' and 'o' are mnemonics for inner and outer):
+
+                   ipad = the byte 0x36 repeated B times
+                  opad = the byte 0x5C repeated B times.
+
+   To compute HMAC over the data `text' we perform
+
+                    H(K XOR opad, H(K XOR ipad, text))
+
+   Namely,
+
+    (1) append zeros to the end of K to create a B byte string
+        (e.g., if K is of length 20 bytes and B=64, then K will be
+         appended with 44 zero bytes 0x00)
+    (2) XOR (bitwise exclusive-OR) the B byte string computed in step
+        (1) with ipad
+    (3) append the stream of data 'text' to the B byte string resulting
+        from step (2)
+    (4) apply H to the stream generated in step (3)
+    (5) XOR (bitwise exclusive-OR) the B byte string computed in
+        step (1) with opad
+    (6) append the H result from step (4) to the B byte string
+        resulting from step (5)
+    (7) apply H to the stream generated in step (6) and output
+        the result
+
+   For illustration purposes, sample code based on MD5 is provided as an
+   appendix.
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 3]
+

+RFC 2104                          HMAC                     February 1997
+
+
+3. Keys
+
+   The key for HMAC can be of any length (keys longer than B bytes are
+   first hashed using H).  However, less than L bytes is strongly
+   discouraged as it would decrease the security strength of the
+   function.  Keys longer than L bytes are acceptable but the extra
+   length would not significantly increase the function strength. (A
+   longer key may be advisable if the randomness of the key is
+   considered weak.)
+
+   Keys need to be chosen at random (or using a cryptographically strong
+   pseudo-random generator seeded with a random seed), and periodically
+   refreshed.  (Current attacks do not indicate a specific recommended
+   frequency for key changes as these attacks are practically
+   infeasible.  However, periodic key refreshment is a fundamental
+   security practice that helps against potential weaknesses of the
+   function and keys, and limits the damage of an exposed key.)
+
+4. Implementation Note
+
+   HMAC is defined in such a way that the underlying hash function H can
+   be used with no modification to its code. In particular, it uses the
+   function H with the pre-defined initial value IV (a fixed value
+   specified by each iterative hash function to initialize its
+   compression function).  However, if desired, a performance
+   improvement can be achieved at the cost of (possibly) modifying the
+   code of H to support variable IVs.
+
+   The idea is that the intermediate results of the compression function
+   on the B-byte blocks (K XOR ipad) and (K XOR opad) can be precomputed
+   only once at the time of generation of the key K, or before its first
+   use. These intermediate results are stored and then used to
+   initialize the IV of H each time that a message needs to be
+   authenticated.  This method saves, for each authenticated message,
+   the application of the compression function of H on two B-byte blocks
+   (i.e., on (K XOR ipad) and (K XOR opad)). Such a savings may be
+   significant when authenticating short streams of data.  We stress
+   that the stored intermediate values need to be treated and protected
+   the same as secret keys.
+
+   Choosing to implement HMAC in the above way is a decision of the
+   local implementation and has no effect on inter-operability.
+
+
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 4]
+

+RFC 2104                          HMAC                     February 1997
+
+
+5. Truncated output
+
+   A well-known practice with message authentication codes is to
+   truncate the output of the MAC and output only part of the bits
+   (e.g., [MM, ANSI]).  Preneel and van Oorschot [PV] show some
+   analytical advantages of truncating the output of hash-based MAC
+   functions. The results in this area are not absolute as for the
+   overall security advantages of truncation. It has advantages (less
+   information on the hash result available to an attacker) and
+   disadvantages (less bits to predict for the attacker).  Applications
+   of HMAC can choose to truncate the output of HMAC by outputting the t
+   leftmost bits of the HMAC computation for some parameter t (namely,
+   the computation is carried in the normal way as defined in section 2
+   above but the end result is truncated to t bits). We recommend that
+   the output length t be not less than half the length of the hash
+   output (to match the birthday attack bound) and not less than 80 bits
+   (a suitable lower bound on the number of bits that need to be
+   predicted by an attacker).  We propose denoting a realization of HMAC
+   that uses a hash function H with t bits of output as HMAC-H-t. For
+   example, HMAC-SHA1-80 denotes HMAC computed using the SHA-1 function
+   and with the output truncated to 80 bits.  (If the parameter t is not
+   specified, e.g. HMAC-MD5, then it is assumed that all the bits of the
+   hash are output.)
+
+6. Security
+
+   The security of the message authentication mechanism presented here
+   depends on cryptographic properties of the hash function H: the
+   resistance to collision finding (limited to the case where the
+   initial value is secret and random, and where the output of the
+   function is not explicitly available to the attacker), and the
+   message authentication property of the compression function of H when
+   applied to single blocks (in HMAC these blocks are partially unknown
+   to an attacker as they contain the result of the inner H computation
+   and, in particular, cannot be fully chosen by the attacker).
+
+   These properties, and actually stronger ones, are commonly assumed
+   for hash functions of the kind used with HMAC. In particular, a hash
+   function for which the above properties do not hold would become
+   unsuitable for most (probably, all) cryptographic applications,
+   including alternative message authentication schemes based on such
+   functions.  (For a complete analysis and rationale of the HMAC
+   function the reader is referred to [BCK1].)
+
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 5]
+

+RFC 2104                          HMAC                     February 1997
+
+
+   Given the limited confidence gained so far as for the cryptographic
+   strength of candidate hash functions, it is important to observe the
+   following two properties of the HMAC construction and its secure use
+   for message authentication:
+
+   1. The construction is independent of the details of the particular
+   hash function H in use and then the latter can be replaced by any
+   other secure (iterative) cryptographic hash function.
+
+   2. Message authentication, as opposed to encryption, has a
+   "transient" effect. A published breaking of a message authentication
+   scheme would lead to the replacement of that scheme, but would have
+   no adversarial effect on information authenticated in the past.  This
+   is in sharp contrast with encryption, where information encrypted
+   today may suffer from exposure in the future if, and when, the
+   encryption algorithm is broken.
+
+   The strongest attack known against HMAC is based on the frequency of
+   collisions for the hash function H ("birthday attack") [PV,BCK2], and
+   is totally impractical for minimally reasonable hash functions.
+
+   As an example, if we consider a hash function like MD5 where the
+   output length equals L=16 bytes (128 bits) the attacker needs to
+   acquire the correct message authentication tags computed (with the
+   _same_ secret key K!) on about 2**64 known plaintexts.  This would
+   require the processing of at least 2**64 blocks under H, an
+   impossible task in any realistic scenario (for a block length of 64
+   bytes this would take 250,000 years in a continuous 1Gbps link, and
+   without changing the secret key K during all this time).  This attack
+   could become realistic only if serious flaws in the collision
+   behavior of the function H are discovered (e.g.  collisions found
+   after 2**30 messages). Such a discovery would determine the immediate
+   replacement of the function H (the effects of such failure would be
+   far more severe for the traditional uses of H in the context of
+   digital signatures, public key certificates, etc.).
+
+   Note: this attack needs to be strongly contrasted with regular
+   collision attacks on cryptographic hash functions where no secret key
+   is involved and where 2**64 off-line parallelizable (!) operations
+   suffice to find collisions.  The latter attack is approaching
+   feasibility [VW] while the birthday attack on HMAC is totally
+   impractical.  (In the above examples, if one uses a hash function
+   with, say, 160 bit of output then 2**64 should be replaced by 2**80.)
+
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 6]
+

+RFC 2104                          HMAC                     February 1997
+
+
+   A correct implementation of the above construction, the choice of
+   random (or cryptographically pseudorandom) keys, a secure key
+   exchange mechanism, frequent key refreshments, and good secrecy
+   protection of keys are all essential ingredients for the security of
+   the integrity verification mechanism provided by HMAC.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                      [Page 7]
+

+RFC 2104                          HMAC                     February 1997
+
+
+Appendix -- Sample Code
+
+   For the sake of illustration we provide the following sample code for
+   the implementation of HMAC-MD5 as well as some corresponding test
+   vectors (the code is based on MD5 code as described in [MD5]).
+
+/*
+** Function: hmac_md5
+*/
+
+void
+hmac_md5(text, text_len, key, key_len, digest)
+unsigned char*  text;                /* pointer to data stream */
+int             text_len;            /* length of data stream */
+unsigned char*  key;                 /* pointer to authentication key */
+int             key_len;             /* length of authentication key */
+caddr_t         digest;              /* caller digest to be filled in */
+
+{
+        MD5_CTX context;
+        unsigned char k_ipad[65];    /* inner padding -
+                                      * key XORd with ipad
+                                      */
+        unsigned char k_opad[65];    /* outer padding -
+                                      * key XORd with opad
+                                      */
+        unsigned char tk[16];
+        int i;
+        /* if key is longer than 64 bytes reset it to key=MD5(key) */
+        if (key_len > 64) {
+
+                MD5_CTX      tctx;
+
+                MD5Init(&tctx);
+                MD5Update(&tctx, key, key_len);
+                MD5Final(tk, &tctx);
+
+                key = tk;
+                key_len = 16;
+        }
+
+        /*
+         * the HMAC_MD5 transform looks like:
+         *
+         * MD5(K XOR opad, MD5(K XOR ipad, text))
+         *
+         * where K is an n byte key
+         * ipad is the byte 0x36 repeated 64 times
+
+
+
+Krawczyk, et. al.            Informational                      [Page 8]
+

+RFC 2104                          HMAC                     February 1997
+
+
+         * opad is the byte 0x5c repeated 64 times
+         * and text is the data being protected
+         */
+
+        /* start out by storing key in pads */
+        bzero( k_ipad, sizeof k_ipad);
+        bzero( k_opad, sizeof k_opad);
+        bcopy( key, k_ipad, key_len);
+        bcopy( key, k_opad, key_len);
+
+        /* XOR key with ipad and opad values */
+        for (i=0; i<64; i++) {
+                k_ipad[i] ^= 0x36;
+                k_opad[i] ^= 0x5c;
+        }
+        /*
+         * perform inner MD5
+         */
+        MD5Init(&context);                   /* init context for 1st
+                                              * pass */
+        MD5Update(&context, k_ipad, 64)      /* start with inner pad */
+        MD5Update(&context, text, text_len); /* then text of datagram */
+        MD5Final(digest, &context);          /* finish up 1st pass */
+        /*
+         * perform outer MD5
+         */
+        MD5Init(&context);                   /* init context for 2nd
+                                              * pass */
+        MD5Update(&context, k_opad, 64);     /* start with outer pad */
+        MD5Update(&context, digest, 16);     /* then results of 1st
+                                              * hash */
+        MD5Final(digest, &context);          /* finish up 2nd pass */
+}
+
+Test Vectors (Trailing '\0' of a character string not included in test):
+
+  key =         0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
+  key_len =     16 bytes
+  data =        "Hi There"
+  data_len =    8  bytes
+  digest =      0x9294727a3638bb1c13f48ef8158bfc9d
+
+  key =         "Jefe"
+  data =        "what do ya want for nothing?"
+  data_len =    28 bytes
+  digest =      0x750c783e6ab0b503eaa86e310a5db738
+
+  key =         0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+
+
+
+Krawczyk, et. al.            Informational                      [Page 9]
+

+RFC 2104                          HMAC                     February 1997
+
+
+  key_len       16 bytes
+  data =        0xDDDDDDDDDDDDDDDDDDDD...
+                ..DDDDDDDDDDDDDDDDDDDD...
+                ..DDDDDDDDDDDDDDDDDDDD...
+                ..DDDDDDDDDDDDDDDDDDDD...
+                ..DDDDDDDDDDDDDDDDDDDD
+  data_len =    50 bytes
+  digest =      0x56be34521d144c88dbb8c733f0e8b3f6
+
+Acknowledgments
+
+   Pau-Chen Cheng, Jeff Kraemer, and Michael Oehler, have provided
+   useful comments on early drafts, and ran the first interoperability
+   tests of this specification. Jeff and Pau-Chen kindly provided the
+   sample code and test vectors that appear in the appendix.  Burt
+   Kaliski, Bart Preneel, Matt Robshaw, Adi Shamir, and Paul van
+   Oorschot have provided useful comments and suggestions during the
+   investigation of the HMAC construction.
+
+References
+
+   [ANSI]  ANSI X9.9, "American National Standard for Financial
+           Institution Message Authentication (Wholesale)," American
+           Bankers Association, 1981.   Revised 1986.
+
+   [Atk]   Atkinson, R., "IP Authentication Header", RFC 1826, August
+           1995.
+
+   [BCK1]  M. Bellare, R. Canetti, and H. Krawczyk,
+           "Keyed Hash Functions and Message Authentication",
+           Proceedings of Crypto'96, LNCS 1109, pp. 1-15.
+           (http://www.research.ibm.com/security/keyed-md5.html)
+
+   [BCK2]  M. Bellare, R. Canetti, and H. Krawczyk,
+           "Pseudorandom Functions Revisited: The Cascade Construction",
+           Proceedings of FOCS'96.
+
+   [Dobb]  H. Dobbertin, "The Status of MD5  After a Recent Attack",
+           RSA Labs' CryptoBytes, Vol. 2 No. 2, Summer 1996.
+           http://www.rsa.com/rsalabs/pubs/cryptobytes.html
+
+   [PV]    B. Preneel and P. van Oorschot, "Building fast MACs from hash
+           functions", Advances in Cryptology -- CRYPTO'95 Proceedings,
+           Lecture Notes in Computer Science, Springer-Verlag Vol.963,
+           1995, pp. 1-14.
+
+   [MD5]   Rivest, R., "The MD5 Message-Digest Algorithm",
+           RFC 1321, April 1992.
+
+
+
+Krawczyk, et. al.            Informational                     [Page 10]
+

+RFC 2104                          HMAC                     February 1997
+
+
+   [MM]    Meyer, S. and Matyas, S.M., Cryptography, New York Wiley,
+           1982.
+
+   [RIPEMD] H. Dobbertin, A. Bosselaers, and B. Preneel, "RIPEMD-160: A
+            strengthened version of RIPEMD", Fast Software Encryption,
+            LNCS Vol 1039, pp. 71-82.
+            ftp://ftp.esat.kuleuven.ac.be/pub/COSIC/bosselae/ripemd/.
+
+   [SHA]   NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995.
+
+   [Tsu]   G. Tsudik, "Message authentication with one-way hash
+           functions", In Proceedings of Infocom'92, May 1992.
+           (Also in "Access Control and Policy Enforcement in
+            Internetworks", Ph.D. Dissertation, Computer Science
+            Department, University of Southern California, April 1991.)
+
+   [VW]    P. van Oorschot and M. Wiener, "Parallel Collision
+           Search with Applications to Hash Functions and Discrete
+           Logarithms", Proceedings of the 2nd ACM Conf. Computer and
+           Communications Security, Fairfax, VA, November 1994.
+
+Authors' Addresses
+
+   Hugo Krawczyk
+   IBM T.J. Watson Research Center
+   P.O.Box 704
+   Yorktown Heights, NY 10598
+
+   EMail: hugo at watson.ibm.com
+
+   Mihir Bellare
+   Dept of Computer Science and Engineering
+   Mail Code 0114
+   University of California at San Diego
+   9500 Gilman Drive
+   La Jolla, CA 92093
+
+   EMail: mihir at cs.ucsd.edu
+
+   Ran Canetti
+   IBM T.J. Watson Research Center
+   P.O.Box 704
+   Yorktown Heights, NY 10598
+
+   EMail: canetti at watson.ibm.com
+
+
+
+
+
+
+Krawczyk, et. al.            Informational                     [Page 11]
+

diff --git a/doc/rfc2195.txt b/doc/rfc2195.txt
new file mode 100644
index 0000000..4a2725b
--- /dev/null
+++ b/doc/rfc2195.txt
@@ -0,0 +1,283 @@
+
+
+
+
+
+
+Network Working Group                                       J. Klensin
+Request for Comments: 2195                                    R. Catoe
+Category: Standards Track                                 P. Krumviede
+Obsoletes: 2095                                                    MCI
+                                                        September 1997
+
+
+       IMAP/POP AUTHorize Extension for Simple Challenge/Response
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Abstract
+
+   While IMAP4 supports a number of strong authentication mechanisms as
+   described in RFC 1731, it lacks any mechanism that neither passes
+   cleartext, reusable passwords across the network nor requires either
+   a significant security infrastructure or that the mail server update
+   a mail-system-wide user authentication file on each mail access.
+   This specification provides a simple challenge-response
+   authentication protocol that is suitable for use with IMAP4.  Since
+   it utilizes Keyed-MD5 digests and does not require that the secret be
+   stored in the clear on the server, it may also constitute an
+   improvement on APOP for POP3 use as specified in RFC 1734.
+
+1. Introduction
+
+   Existing Proposed Standards specify an AUTHENTICATE mechanism for the
+   IMAP4 protocol [IMAP, IMAP-AUTH] and a parallel AUTH mechanism for
+   the POP3 protocol [POP3-AUTH].  The AUTHENTICATE mechanism is
+   intended to be extensible; the four methods specified in [IMAP-AUTH]
+   are all fairly powerful and require some security infrastructure to
+   support.  The base POP3 specification [POP3] also contains a
+   lightweight challenge-response mechanism called APOP.  APOP is
+   associated with most of the risks associated with such protocols: in
+   particular, it requires that both the client and server machines have
+   access to the shared secret in cleartext form. CRAM offers a method
+   for avoiding such cleartext storage while retaining the algorithmic
+   simplicity of APOP in using only MD5, though in a "keyed" method.
+
+
+
+
+
+
+
+Klensin, Catoe & Krumviede  Standards Track                     [Page 1]
+

+RFC 2195              IMAP/POP AUTHorize Extension        September 1997
+
+
+   At present, IMAP [IMAP] lacks any facility corresponding to APOP.
+   The only alternative to the strong mechanisms identified in [IMAP-
+   AUTH] is a presumably cleartext username and password, supported
+   through the LOGIN command in [IMAP].  This document describes a
+   simple challenge-response mechanism, similar to APOP and PPP CHAP
+   [PPP], that can be used with IMAP (and, in principle, with POP3).
+
+   This mechanism also has the advantage over some possible alternatives
+   of not requiring that the server maintain information about email
+   "logins" on a per-login basis.  While mechanisms that do require such
+   per-login history records may offer enhanced security, protocols such
+   as IMAP, which may have several connections between a given client
+   and server open more or less simultaneous, may make their
+   implementation particularly challenging.
+
+2. Challenge-Response Authentication Mechanism (CRAM)
+
+   The authentication type associated with CRAM is "CRAM-MD5".
+
+   The data encoded in the first ready response contains an
+   presumptively arbitrary string of random digits, a timestamp, and the
+   fully-qualified primary host name of the server.  The syntax of the
+   unencoded form must correspond to that of an RFC 822 'msg-id'
+   [RFC822] as described in [POP3].
+
+   The client makes note of the data and then responds with a string
+   consisting of the user name, a space, and a 'digest'.  The latter is
+   computed by applying the keyed MD5 algorithm from [KEYED-MD5] where
+   the key is a shared secret and the digested text is the timestamp
+   (including angle-brackets).
+
+   This shared secret is a string known only to the client and server.
+   The `digest' parameter itself is a 16-octet value which is sent in
+   hexadecimal format, using lower-case ASCII characters.
+
+   When the server receives this client response, it verifies the digest
+   provided.  If the digest is correct, the server should consider the
+   client authenticated and respond appropriately.
+
+   Keyed MD5 is chosen for this application because of the greater
+   security imparted to authentication of short messages. In addition,
+   the use of the techniques described in [KEYED-MD5] for precomputation
+   of intermediate results make it possible to avoid explicit cleartext
+   storage of the shared secret on the server system by instead storing
+   the intermediate results which are known as "contexts".
+
+
+
+
+
+
+Klensin, Catoe & Krumviede  Standards Track                     [Page 2]
+

+RFC 2195              IMAP/POP AUTHorize Extension        September 1997
+
+
+   CRAM does not support a protection mechanism.
+
+   Example:
+
+   The examples in this document show the use of the CRAM mechanism with
+   the IMAP4 AUTHENTICATE command [IMAP-AUTH].  The base64 encoding of
+   the challenges and responses is part of the IMAP4 AUTHENTICATE
+   command, not part of the CRAM specification itself.
+
+     S: * OK IMAP4 Server
+     C: A0001 AUTHENTICATE CRAM-MD5
+     S: + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
+     C: dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
+     S: A0001 OK CRAM authentication successful
+
+      In this example, the shared secret is the string
+      'tanstaaftanstaaf'.  Hence, the Keyed MD5 digest is produced by
+      calculating
+
+        MD5((tanstaaftanstaaf XOR opad),
+            MD5((tanstaaftanstaaf XOR ipad),
+            <1896.697170952 at postoffice.reston.mci.net>))
+
+      where ipad and opad are as defined in the keyed-MD5 Work in
+      Progress [KEYED-MD5] and the string shown in the challenge is the
+      base64 encoding of <1896.697170952 at postoffice.reston.mci.net>. The
+      shared secret is null-padded to a length of 64 bytes. If the
+      shared secret is longer than 64 bytes, the MD5 digest of the
+      shared secret is used as a 16 byte input to the keyed MD5
+      calculation.
+
+      This produces a digest value (in hexadecimal) of
+
+           b913a602c7eda7a495b4e6e7334d3890
+
+      The user name is then prepended to it, forming
+
+           tim b913a602c7eda7a495b4e6e7334d3890
+
+      Which is then base64 encoded to meet the requirements of the IMAP4
+      AUTHENTICATE command (or the similar POP3 AUTH command), yielding
+
+           dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
+
+
+
+
+
+
+
+
+Klensin, Catoe & Krumviede  Standards Track                     [Page 3]
+

+RFC 2195              IMAP/POP AUTHorize Extension        September 1997
+
+
+3. References
+
+   [CHAP]  Lloyd, B., and W. Simpson, "PPP Authentication Protocols",
+       RFC 1334, October 1992.
+
+   [IMAP] Crispin, M., "Internet Message Access Protocol - Version
+       4rev1", RFC 2060, University of Washington, December 1996.
+
+   [IMAP-AUTH] Myers, J., "IMAP4 Authentication Mechanisms",
+       RFC 1731, Carnegie Mellon, December 1994.
+
+   [KEYED-MD5] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for
+       Message Authentication", RFC 2104, February 1997.
+
+   [MD5]  Rivest, R., "The MD5 Message Digest Algorithm",
+       RFC 1321, MIT Laboratory for Computer Science, April 1992.
+
+   [POP3] Myers, J., and M. Rose, "Post Office Protocol - Version 3",
+       STD 53, RFC 1939, Carnegie Mellon, May 1996.
+
+   [POP3-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
+       Carnegie Mellon, December, 1994.
+
+4. Security Considerations
+
+   It is conjectured that use of the CRAM authentication mechanism
+   provides origin identification and replay protection for a session.
+   Accordingly, a server that implements both a cleartext password
+   command and this authentication type should not allow both methods of
+   access for a given user.
+
+   While the saving, on the server, of "contexts" (see section 2) is
+   marginally better than saving the shared secrets in cleartext as is
+   required by CHAP [CHAP] and APOP [POP3], it is not sufficient to
+   protect the secrets if the server itself is compromised.
+   Consequently, servers that store the secrets or contexts must both be
+   protected to a level appropriate to the potential information value
+   in user mailboxes and identities.
+
+   As the length of the shared secret increases, so does the difficulty
+   of deriving it.
+
+   While there are now suggestions in the literature that the use of MD5
+   and keyed MD5 in authentication procedures probably has a limited
+   effective lifetime, the technique is now widely deployed and widely
+   understood.  It is believed that this general understanding may
+   assist with the rapid replacement, by CRAM-MD5, of the current uses
+   of permanent cleartext passwords in IMAP.   This document has been
+
+
+
+Klensin, Catoe & Krumviede  Standards Track                     [Page 4]
+

+RFC 2195              IMAP/POP AUTHorize Extension        September 1997
+
+
+   deliberately written to permit easy upgrading to use SHA (or whatever
+   alternatives emerge) when they are considered to be widely available
+   and adequately safe.
+
+   Even with the use of CRAM, users are still vulnerable to active
+   attacks.  An example of an increasingly common active attack is 'TCP
+   Session Hijacking' as described in CERT Advisory CA-95:01 [CERT95].
+
+   See section 1 above for additional discussion.
+
+5. Acknowledgements
+
+   This memo borrows ideas and some text liberally from [POP3] and
+   [RFC-1731] and thanks are due the authors of those documents.  Ran
+   Atkinson made a number of valuable technical and editorial
+   contributions to the document.
+
+6. Authors' Addresses
+
+   John C. Klensin
+   MCI Telecommunications
+   800 Boylston St, 7th floor
+   Boston, MA 02199
+   USA
+
+   EMail: klensin at mci.net
+   Phone: +1 617 960 1011
+
+   Randy Catoe
+   MCI Telecommunications
+   2100 Reston Parkway
+   Reston, VA 22091
+   USA
+
+   EMail: randy at mci.net
+   Phone: +1 703 715 7366
+
+   Paul Krumviede
+   MCI Telecommunications
+   2100 Reston Parkway
+   Reston, VA 22091
+   USA
+
+   EMail: paul at mci.net
+   Phone: +1 703 715 7251
+
+
+
+
+
+
+Klensin, Catoe & Krumviede  Standards Track                     [Page 5]
+

diff --git a/doc/rfc2222.txt b/doc/rfc2222.txt
new file mode 100644
index 0000000..2b0a2ab
--- /dev/null
+++ b/doc/rfc2222.txt
@@ -0,0 +1,899 @@
+
+
+
+
+
+
+Network Working Group                                           J. Myers
+Request for Comments: 2222                       Netscape Communications
+Category: Standards Track                                   October 1997
+
+
+            Simple Authentication and Security Layer (SASL)
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+Table of Contents
+
+   1.    Abstract ..............................................    2
+   2.    Organization of this Document .........................    2
+   2.1.  How to Read This Document .............................    2
+   2.2.  Conventions Used in this Document .....................    2
+   2.3.  Examples ..............................................    3
+   3.    Introduction and Overview .............................    3
+   4.    Profiling requirements ................................    4
+   5.    Specific issues .......................................    5
+   5.1.  Client sends data first ...............................    5
+   5.2.  Server returns success with additional data ...........    5
+   5.3.  Multiple authentications ..............................    5
+   6.    Registration procedures ...............................    6
+   6.1.  Comments on SASL mechanism registrations ..............    6
+   6.2.  Location of Registered SASL Mechanism List ............    6
+   6.3.  Change Control ........................................    7
+   6.4.  Registration Template .................................    7
+   7.    Mechanism definitions .................................    8
+   7.1.  Kerberos version 4 mechanism ..........................    8
+   7.2.  GSSAPI mechanism ......................................    9
+   7.2.1 Client side of authentication protocol exchange .......    9
+   7.2.2 Server side of authentication protocol exchange .......   10
+   7.2.3 Security layer ........................................   11
+   7.3.  S/Key mechanism .......................................   11
+   7.4.  External mechanism ....................................   12
+   8.    References ............................................   13
+   9.    Security Considerations ...............................   13
+   10.   Author's Address ......................................   14
+
+
+
+Myers                       Standards Track                     [Page 1]
+

+RFC 2222                          SASL                      October 1997
+
+
+   Appendix A. Relation of SASL to Transport Security ..........   15
+   Full Copyright Statement ....................................   16
+
+1.    Abstract
+
+   This document describes a method for adding authentication support to
+   connection-based protocols.  To use this specification, a protocol
+   includes a command for identifying and authenticating a user to a
+   server and for optionally negotiating protection of subsequent
+   protocol interactions.  If its use is negotiated, a security layer is
+   inserted between the protocol and the connection.  This document
+   describes how a protocol specifies such a command, defines several
+   mechanisms for use by the command, and defines the protocol used for
+   carrying a negotiated security layer over the connection.
+
+2.    Organization of this Document
+
+2.1.  How to Read This Document
+
+   This document is written to serve two different audiences, protocol
+   designers using this specification to support authentication in their
+   protocol, and implementors of clients or servers for those protocols
+   using this specification.
+
+   The sections "Introduction and Overview", "Profiling requirements",
+   and "Security Considerations" cover issues that protocol designers
+   need to understand and address in profiling this specification for
+   use in a specific protocol.
+
+   Implementors of a protocol using this specification need the
+   protocol-specific profiling information in addition to the
+   information in this document.
+
+2.2.  Conventions Used in this Document
+
+   In examples, "C:" and "S:" indicate lines sent by the client and
+   server respectively.
+
+   The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+   in this document are to be interpreted as defined in "Key words for
+   use in RFCs to Indicate Requirement Levels" [RFC 2119].
+
+
+
+
+
+
+
+
+
+
+Myers                       Standards Track                     [Page 2]
+

+RFC 2222                          SASL                      October 1997
+
+
+2.3.  Examples
+
+   Examples in this document are for the IMAP profile [RFC 2060] of this
+   specification.  The base64 encoding of challenges and responses, as
+   well as the "+ " preceding the responses are part of the IMAP4
+   profile, not part of the SASL specification itself.
+
+3.    Introduction and Overview
+
+   The Simple Authentication and Security Layer (SASL) is a method for
+   adding authentication support to connection-based protocols.  To use
+   this specification, a protocol includes a command for identifying and
+   authenticating a user to a server and for optionally negotiating a
+   security layer for subsequent protocol interactions.
+
+   The command has a required argument identifying a SASL mechanism.
+   SASL mechanisms are named by strings, from 1 to 20 characters in
+   length, consisting of upper-case letters, digits, hyphens, and/or
+   underscores.  SASL mechanism names must be registered with the IANA.
+   Procedures for registering new SASL mechanisms are given in the
+   section "Registration procedures"
+
+   If a server supports the requested mechanism, it initiates an
+   authentication protocol exchange.  This consists of a series of
+   server challenges and client responses that are specific to the
+   requested mechanism.  The challenges and responses are defined by the
+   mechanisms as binary tokens of arbitrary length.  The protocol's
+   profile then specifies how these binary tokens are then encoded for
+   transfer over the connection.
+
+   After receiving the authentication command or any client response, a
+   server may issue a challenge, indicate failure, or indicate
+   completion.  The protocol's profile specifies how the server
+   indicates which of the above it is doing.
+
+   After receiving a challenge, a client may issue a response or abort
+   the exchange.  The protocol's profile specifies how the client
+   indicates which of the above it is doing.
+
+   During the authentication protocol exchange, the mechanism performs
+   authentication, transmits an authorization identity (frequently known
+   as a userid) from the client to server, and negotiates the use of a
+   mechanism-specific security layer.  If the use of a security layer is
+   agreed upon, then the mechanism must also define or negotiate the
+   maximum cipher-text buffer size that each side is able to receive.
+
+
+
+
+
+
+Myers                       Standards Track                     [Page 3]
+

+RFC 2222                          SASL                      October 1997
+
+
+   The transmitted authorization identity may be different than the
+   identity in the client's authentication credentials.  This permits
+   agents such as proxy servers to authenticate using their own
+   credentials, yet request the access privileges of the identity for
+   which they are proxying.  With any mechanism, transmitting an
+   authorization identity of the empty string directs the server to
+   derive an authorization identity from the client's authentication
+   credentials.
+
+   If use of a security layer is negotiated, it is applied to all
+   subsequent data sent over the connection.  The security layer takes
+   effect immediately following the last response of the authentication
+   exchange for data sent by the client and the completion indication
+   for data sent by the server.  Once the security layer is in effect,
+   the protocol stream is processed by the security layer into buffers
+   of cipher-text.  Each buffer is transferred over the connection as a
+   stream of octets prepended with a four octet field in network byte
+   order that represents the length of the following buffer.  The length
+   of the cipher-text buffer must be no larger than the maximum size
+   that was defined or negotiated by the other side.
+
+4.    Profiling requirements
+
+   In order to use this specification, a protocol definition must supply
+   the following information:
+
+   1. A service name, to be selected from the IANA registry of "service"
+      elements for the GSSAPI host-based service name form [RFC 2078].
+
+   2. A definition of the command to initiate the authentication
+      protocol exchange.  This command must have as a parameter the
+      mechanism name being selected by the client.
+
+      The command SHOULD have an optional parameter giving an initial
+      response.  This optional parameter allows the client to avoid a
+      round trip when using a mechanism which is defined to have the
+      client send data first.  When this initial response is sent by the
+      client and the selected mechanism is defined to have the server
+      start with an initial challenge, the command fails.  See section
+      5.1 of this document for further information.
+
+   3. A definition of the method by which the authentication protocol
+      exchange is carried out, including how the challenges and
+      responses are encoded, how the server indicates completion or
+      failure of the exchange, how the client aborts an exchange, and
+      how the exchange method interacts with any line length limits in
+      the protocol.
+
+
+
+
+Myers                       Standards Track                     [Page 4]
+

+RFC 2222                          SASL                      October 1997
+
+
+   4. Identification of the octet where any negotiated security layer
+      starts to take effect, in both directions.
+
+   5. A specification of how the authorization identity passed from the
+      client to the server is to be interpreted.
+
+5.    Specific issues
+
+5.1.  Client sends data first
+
+   Some mechanisms specify that the first data sent in the
+   authentication protocol exchange is from the client to the server.
+
+   If a protocol's profile permits the command which initiates an
+   authentication protocol exchange to contain an initial client
+   response, this parameter SHOULD be used with such mechanisms.
+
+   If the initial client response parameter is not given, or if a
+   protocol's profile does not permit the command which initiates an
+   authentication protocol exchange to contain an initial client
+   response, then the server issues a challenge with no data.  The
+   client's response to this challenge is then used as the initial
+   client response.  (The server then proceeds to send the next
+   challenge, indicates completion, or indicates failure.)
+
+5.2.  Server returns success with additional data
+
+   Some mechanisms may specify that server challenge data be sent to the
+   client along with an indication of successful completion of the
+   exchange.  This data would, for example, authenticate the server to
+   the client.
+
+   If a protocol's profile does not permit this server challenge to be
+   returned with a success indication, then the server issues the server
+   challenge without an indication of successful completion.  The client
+   then responds with no data.  After receiving this empty response, the
+   server then indicates successful completion.
+
+5.3.  Multiple authentications
+
+   Unless otherwise stated by the protocol's profile, only one
+   successful SASL negotiation may occur in a protocol session.  In this
+   case, once an authentication protocol exchange has successfully
+   completed, further attempts to initiate an authentication protocol
+   exchange fail.
+
+
+
+
+
+
+Myers                       Standards Track                     [Page 5]
+

+RFC 2222                          SASL                      October 1997
+
+
+   In the case that a profile explicitly permits multiple successful
+   SASL negotiations to occur, then in no case may multiple security
+   layers be simultaneously in effect.  If a security layer is in effect
+   and a subsequent SASL negotiation selects no security layer, the
+   original security layer remains in effect.  If a security layer is in
+   effect and a subsequent SASL negotiation selects a second security
+   layer, then the second security layer replaces the first.
+
+6.    Registration procedures
+
+   Registration of a SASL mechanism is done by filling in the template
+   in section 6.4 and sending it in to iana at isi.edu.  IANA has the right
+   to reject obviously bogus registrations, but will perform no review
+   of clams made in the registration form.
+
+   There is no naming convention for SASL mechanisms; any name that
+   conforms to the syntax of a SASL mechanism name can be registered.
+
+   While the registration procedures do not require it, authors of SASL
+   mechanisms are encouraged to seek community review and comment
+   whenever that is feasible.  Authors may seek community review by
+   posting a specification of their proposed mechanism as an internet-
+   draft.  SASL mechanisms intended for widespread use should be
+   standardized through the normal IETF process, when appropriate.
+
+6.1.  Comments on SASL mechanism registrations
+
+   Comments on registered SASL mechanisms should first be sent to the
+   "owner" of the mechanism.  Submitters of comments may, after a
+   reasonable attempt to contact the owner, request IANA to attach their
+   comment to the SASL mechanism registration itself.  If IANA approves
+   of this the comment will be made accessible in conjunction with the
+   SASL mechanism registration itself.
+
+6.2.  Location of Registered SASL Mechanism List
+
+   SASL mechanism registrations will be posted in the anonymous FTP
+   directory "ftp://ftp.isi.edu/in-notes/iana/assignments/sasl-
+   mechanisms/" and all registered SASL mechanisms will be listed in the
+   periodically issued "Assigned Numbers" RFC [currently STD 2, RFC
+   1700].  The SASL mechanism description and other supporting material
+   may also be published as an Informational RFC by sending it to "rfc-
+   editor at isi.edu" (please follow the instructions to RFC authors [RFC
+   2223]).
+
+
+
+
+
+
+
+Myers                       Standards Track                     [Page 6]
+

+RFC 2222                          SASL                      October 1997
+
+
+6.3.  Change Control
+
+   Once a SASL mechanism registration has been published by IANA, the
+   author may request a change to its definition.  The change request
+   follows the same procedure as the registration request.
+
+   The owner of a SASL mechanism may pass responsibility for the SASL
+   mechanism to another person or agency by informing IANA; this can be
+   done without discussion or review.
+
+   The IESG may reassign responsibility for a SASL mechanism. The most
+   common case of this will be to enable changes to be made to
+   mechanisms where the author of the registration has died, moved out
+   of contact or is otherwise unable to make changes that are important
+   to the community.
+
+   SASL mechanism registrations may not be deleted; mechanisms which are
+   no longer believed appropriate for use can be declared OBSOLETE by a
+   change to their "intended use" field; such SASL mechanisms will be
+   clearly marked in the lists published by IANA.
+
+   The IESG is considered to be the owner of all SASL mechanisms which
+   are on the IETF standards track.
+
+6.4.  Registration Template
+
+   To: iana at iana.org
+   Subject: Registration of SASL mechanism X
+
+   SASL mechanism name:
+
+   Security considerations:
+
+   Published specification (optional, recommended):
+
+   Person & email address to contact for further information:
+
+   Intended usage:
+
+   (One of COMMON, LIMITED USE or OBSOLETE)
+
+   Author/Change controller:
+
+   (Any other information that the author deems interesting may be
+   added below this line.)
+
+
+
+
+
+
+Myers                       Standards Track                     [Page 7]
+

+RFC 2222                          SASL                      October 1997
+
+
+7.    Mechanism definitions
+
+   The following mechanisms are hereby defined.
+
+7.1.  Kerberos version 4 mechanism
+
+   The mechanism name associated with Kerberos version 4 is
+   "KERBEROS_V4".
+
+   The first challenge consists of a random 32-bit number in network
+   byte order.  The client responds with a Kerberos ticket and an
+   authenticator for the principal "service.hostname at realm", where
+   "service" is the service name specified in the protocol's profile,
+   "hostname" is the first component of the host name of the server with
+   all letters in lower case, and where "realm" is the Kerberos realm of
+   the server.  The encrypted checksum field included within the
+   Kerberos authenticator contains the server provided challenge in
+   network byte order.
+
+   Upon decrypting and verifying the ticket and authenticator, the
+   server verifies that the contained checksum field equals the original
+   server provided random 32-bit number.  Should the verification be
+   successful, the server must add one to the checksum and construct 8
+   octets of data, with the first four octets containing the incremented
+   checksum in network byte order, the fifth octet containing a bit-mask
+   specifying the security layers supported by the server, and the sixth
+   through eighth octets containing, in network byte order, the maximum
+   cipher-text buffer size the server is able to receive.  The server
+   must encrypt using DES ECB mode the 8 octets of data in the session
+   key and issue that encrypted data in a second challenge.  The client
+   considers the server authenticated if the first four octets of the
+   un-encrypted data is equal to one plus the checksum it previously
+   sent.
+
+   The client must construct data with the first four octets containing
+   the original server-issued checksum in network byte order, the fifth
+   octet containing the bit-mask specifying the selected security layer,
+   the sixth through eighth octets containing in network byte order the
+   maximum cipher-text buffer size the client is able to receive, and
+   the following octets containing the authorization identity.  The
+   client must then append from one to eight zero-valued octets so that
+   the length of the data is a multiple of eight octets. The client must
+   then encrypt using DES PCBC mode the data with the session key and
+   respond with the encrypted data.  The server decrypts the data and
+   verifies the contained checksum.  The server must verify that the
+   principal identified in the Kerberos ticket is authorized to connect
+   as that authorization identity.  After this verification, the
+   authentication process is complete.
+
+
+
+Myers                       Standards Track                     [Page 8]
+

+RFC 2222                          SASL                      October 1997
+
+
+   The security layers and their corresponding bit-masks are as follows:
+
+      1 No security layer
+      2 Integrity (krb_mk_safe) protection
+      4 Privacy (krb_mk_priv) protection
+
+   Other bit-masks may be defined in the future; bits which are not
+   understood must be negotiated off.
+
+   EXAMPLE: The following are two Kerberos version 4 login scenarios to
+   the IMAP4 protocol (note that the line breaks in the sample
+   authenticators are for editorial clarity and are not in real
+   authenticators)
+
+     S: * OK IMAP4 Server
+     C: A001 AUTHENTICATE KERBEROS_V4
+     S: + AmFYig==
+     C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
+        +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
+        WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
+     S: + or//EoAADZI=
+     C: DiAF5A4gA+oOIALuBkAAmw==
+     S: A001 OK Kerberos V4 authentication successful
+
+
+     S: * OK IMAP4 Server
+     C: A001 AUTHENTICATE KERBEROS_V4
+     S: + gcfgCA==
+     C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
+        +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
+        WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
+     S: A001 NO Kerberos V4 authentication failed
+
+7.2.  GSSAPI mechanism
+
+   The mechanism name associated with all mechanisms employing the
+   GSSAPI [RFC 2078] is "GSSAPI".
+
+7.2.1 Client side of authentication protocol exchange
+
+   The client calls GSS_Init_sec_context, passing in 0 for
+   input_context_handle (initially) and a targ_name equal to output_name
+   from GSS_Import_Name called with input_name_type of
+   GSS_C_NT_HOSTBASED_SERVICE and input_name_string of
+   "service at hostname" where "service" is the service name specified in
+   the protocol's profile, and "hostname" is the fully qualified host
+   name of the server.  The client then responds with the resulting
+   output_token.  If GSS_Init_sec_context returns GSS_S_CONTINUE_NEEDED,
+
+
+
+Myers                       Standards Track                     [Page 9]
+

+RFC 2222                          SASL                      October 1997
+
+
+   then the client should expect the server to issue a token in a
+   subsequent challenge.  The client must pass the token to another call
+   to GSS_Init_sec_context, repeating the actions in this paragraph.
+
+   When GSS_Init_sec_context returns GSS_S_COMPLETE, the client takes
+   the following actions: If the last call to GSS_Init_sec_context
+   returned an output_token, then the client responds with the
+   output_token, otherwise the client responds with no data.  The client
+   should then expect the server to issue a token in a subsequent
+   challenge.  The client passes this token to GSS_Unwrap and interprets
+   the first octet of resulting cleartext as a bit-mask specifying the
+   security layers supported by the server and the second through fourth
+   octets as the maximum size output_message to send to the server.  The
+   client then constructs data, with the first octet containing the
+   bit-mask specifying the selected security layer, the second through
+   fourth octets containing in network byte order the maximum size
+   output_message the client is able to receive, and the remaining
+   octets containing the authorization identity.  The client passes the
+   data to GSS_Wrap with conf_flag set to FALSE, and responds with the
+   generated output_message.  The client can then consider the server
+   authenticated.
+
+7.2.2 Server side of authentication protocol exchange
+
+   The server passes the initial client response to
+   GSS_Accept_sec_context as input_token, setting input_context_handle
+   to 0 (initially).  If GSS_Accept_sec_context returns
+   GSS_S_CONTINUE_NEEDED, the server returns the generated output_token
+   to the client in challenge and passes the resulting response to
+   another call to GSS_Accept_sec_context, repeating the actions in this
+   paragraph.
+
+   When GSS_Accept_sec_context returns GSS_S_COMPLETE, the client takes
+   the following actions: If the last call to GSS_Accept_sec_context
+   returned an output_token, the server returns it to the client in a
+   challenge and expects a reply from the client with no data.  Whether
+   or not an output_token was returned (and after receipt of any
+   response from the client to such an output_token), the server then
+   constructs 4 octets of data, with the first octet containing a bit-
+   mask specifying the security layers supported by the server and the
+   second through fourth octets containing in network byte order the
+   maximum size output_token the server is able to receive.  The server
+   must then pass the plaintext to GSS_Wrap with conf_flag set to FALSE
+   and issue the generated output_message to the client in a challenge.
+   The server must then pass the resulting response to GSS_Unwrap and
+   interpret the first octet of resulting cleartext as the bit-mask for
+   the selected security layer, the second through fourth octets as the
+   maximum size output_message to send to the client, and the remaining
+
+
+
+Myers                       Standards Track                    [Page 10]
+

+RFC 2222                          SASL                      October 1997
+
+
+   octets as the authorization identity.  The server must verify that
+   the src_name is authorized to authenticate as the authorization
+   identity.  After these verifications, the authentication process is
+   complete.
+
+7.2.3 Security layer
+
+   The security layers and their corresponding bit-masks are as follows:
+
+     1 No security layer
+     2 Integrity protection.
+       Sender calls GSS_Wrap with conf_flag set to FALSE
+     4 Privacy protection.
+       Sender calls GSS_Wrap with conf_flag set to TRUE
+
+   Other bit-masks may be defined in the future; bits which are not
+   understood must be negotiated off.
+
+7.3.  S/Key mechanism
+
+   The mechanism name associated with S/Key [RFC 1760] using the MD4
+   digest algorithm is "SKEY".
+
+   The client sends an initial response with the authorization identity.
+
+   The server then issues a challenge which contains the decimal
+   sequence number followed by a single space and the seed string for
+   the indicated authorization identity.  The client responds with the
+   one-time-password, as either a 64-bit value in network byte order or
+   encoded in the "six English words" format.
+
+   The server must verify the one-time-password.  After this
+   verification, the authentication process is complete.
+
+   S/Key authentication does not provide for any security layers.
+
+   EXAMPLE: The following are two S/Key login scenarios in the IMAP4
+   protocol.
+
+     S: * OK IMAP4 Server
+     C: A001 AUTHENTICATE SKEY
+     S: +
+     C: bW9yZ2Fu
+     S: + OTUgUWE1ODMwOA==
+     C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
+     S: A001 OK S/Key authentication successful
+
+
+
+
+
+Myers                       Standards Track                    [Page 11]
+

+RFC 2222                          SASL                      October 1997
+
+
+     S: * OK IMAP4 Server
+     C: A001 AUTHENTICATE SKEY
+     S: +
+     C: c21pdGg=
+     S: + OTUgUWE1ODMwOA==
+     C: BsAY3g4gBNo=
+     S: A001 NO S/Key authentication failed
+
+   The following is an S/Key login scenario in an IMAP4-like protocol
+   which has an optional "initial response" argument to the AUTHENTICATE
+   command.
+
+     S: * OK IMAP4-Like Server
+     C: A001 AUTHENTICATE SKEY bW9yZ2Fu
+     S: + OTUgUWE1ODMwOA==
+     C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
+     S: A001 OK S/Key authentication successful
+
+7.4.  External mechanism
+
+   The mechanism name associated with external authentication is
+   "EXTERNAL".
+
+   The client sends an initial response with the authorization identity.
+
+   The server uses information, external to SASL, to determine whether
+   the client is authorized to authenticate as the authorization
+   identity.  If the client is so authorized, the server indicates
+   successful completion of the authentication exchange; otherwise the
+   server indicates failure.
+
+   The system providing this external information may be, for example,
+   IPsec or TLS.
+
+   If the client sends the empty string as the authorization identity
+   (thus requesting the authorization identity be derived from the
+   client's authentication credentials), the authorization identity is
+   to be derived from authentication credentials which exist in the
+   system which is providing the external authentication.
+
+
+
+
+
+
+
+
+
+
+
+
+Myers                       Standards Track                    [Page 12]
+

+RFC 2222                          SASL                      October 1997
+
+
+8.    References
+
+   [RFC 2060] Crispin, M., "Internet Message Access Protocol - Version
+              4rev1", RFC 2060, December 1996.
+
+   [RFC 2078] Linn, J., "Generic Security Service Application Program
+              Interface, Version 2", RFC 2078, January 1997.
+
+   [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", RFC 2119, March 1997.
+
+   [RFC 2223] Postel, J., and J. Reynolds, "Instructions to RFC
+              Authors", RFC 2223, October 1997.
+
+   [RFC 1760] Haller, N., "The S/Key One-Time Password System", RFC
+              1760, February 1995.
+
+   [RFC 1700] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
+              RFC 1700, October 1994.
+
+9.    Security Considerations
+
+   Security issues are discussed throughout this memo.
+
+   The mechanisms that support integrity protection are designed such
+   that the negotiation of the security layer and authorization identity
+   is integrity protected.  When the client selects a security layer
+   with at least integrity protection, this protects against an active
+   attacker hijacking the connection and modifying the authentication
+   exchange to negotiate a plaintext connection.
+
+   When a server or client supports multiple authentication mechanisms,
+   each of which has a different security strength, it is possible for
+   an active attacker to cause a party to use the least secure mechanism
+   supported.  To protect against this sort of attack, a client or
+   server which supports mechanisms of different strengths should have a
+   configurable minimum strength that it will use.  It is not sufficient
+   for this minimum strength check to only be on the server, since an
+   active attacker can change which mechanisms the client sees as being
+   supported, causing the client to send authentication credentials for
+   its weakest supported mechanism.
+
+
+
+
+
+
+
+
+
+
+Myers                       Standards Track                    [Page 13]
+

+RFC 2222                          SASL                      October 1997
+
+
+   The client's selection of a SASL mechanism is done in the clear and
+   may be modified by an active attacker.  It is important for any new
+   SASL mechanisms to be designed such that an active attacker cannot
+   obtain an authentication with weaker security properties by modifying
+   the SASL mechanism name and/or the challenges and responses.
+
+   Any protocol interactions prior to authentication are performed in
+   the clear and may be modified by an active attacker.  In the case
+   where a client selects integrity protection, it is important that any
+   security-sensitive protocol negotiations be performed after
+   authentication is complete.  Protocols should be designed such that
+   negotiations performed prior to authentication should be either
+   ignored or revalidated once authentication is complete.
+
+10.   Author's Address
+
+   John G. Myers
+   Netscape Communications
+   501 E. Middlefield Road
+   Mail Stop MV-029
+   Mountain View, CA 94043-4042
+
+   EMail: jgmyers at netscape.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Myers                       Standards Track                    [Page 14]
+

+RFC 2222                          SASL                      October 1997
+
+
+Appendix A. Relation of SASL to Transport Security
+
+   Questions have been raised about the relationship between SASL and
+   various services (such as IPsec and TLS) which provide a secured
+   connection.
+
+   Two of the key features of SASL are:
+
+   1. The separation of the authorization identity from the identity in
+      the client's credentials.  This permits agents such as proxy
+      servers to authenticate using their own credentials, yet request
+      the access privileges of the identity for which they are proxying.
+
+   2. Upon successful completion of an authentication exchange, the
+      server knows the authorization identity the client wishes to use.
+      This allows servers to move to a "user is authenticated" state in
+      the protocol.
+
+   These features are extremely important to some application protocols,
+   yet Transport Security services do not always provide them.  To
+   define SASL mechanisms based on these services would be a very messy
+   task, as the framing of these services would be redundant with the
+   framing of SASL and some method of providing these important SASL
+   features would have to be devised.
+
+   Sometimes it is desired to enable within an existing connection the
+   use of a security service which does not fit the SASL model.  (TLS is
+   an example of such a service.)  This can be done by adding a command,
+   for example "STARTTLS", to the protocol.  Such a command is outside
+   the scope of SASL, and should be different from the command which
+   starts a SASL authentication protocol exchange.
+
+   In certain situations, it is reasonable to use SASL underneath one of
+   these Transport Security services.  The transport service would
+   secure the connection, either service would authenticate the client,
+   and SASL would negotiate the authorization identity.  The SASL
+   negotiation would be what moves the protocol from "unauthenticated"
+   to "authenticated" state.  The "EXTERNAL" SASL mechanism is
+   explicitly intended to handle the case where the transport service
+   secures the connection and authenticates the client and SASL
+   negotiates the authorization identity.
+
+   When using SASL underneath a sufficiently strong Transport Security
+   service, a SASL security layer would most likely be redundant.  The
+   client and server would thus probably want to negotiate off the use
+   of a SASL security layer.
+
+
+
+
+
+Myers                       Standards Track                    [Page 15]
+

+RFC 2222                          SASL                      October 1997
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implmentation may be prepared, copied, published
+   andand distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Myers                       Standards Track                    [Page 16]
+

diff --git a/doc/rfc2243.txt b/doc/rfc2243.txt
new file mode 100644
index 0000000..0ad5a63
--- /dev/null
+++ b/doc/rfc2243.txt
@@ -0,0 +1,563 @@
+
+
+
+
+
+
+Network Working Group                                           C. Metz
+Request for Comments: 2243                                The Inner Net
+Category: Standards Track                                 November 1997
+
+
+
+
+                         OTP Extended Responses
+
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+Abstract
+
+   This document provides a specification for a type of response to an
+   OTP [RFC 1938] challenge that carries explicit indication of the
+   response's encoding. Codings for the two mandatory OTP data formats
+   using this new type of response are presented.
+
+   This document also provides a specification for a response that
+   allows an OTP generator to request that a server re-initialize a
+   sequence and change parameters such as the secret pass phrase.
+
+1. Conventions, Terms, and Notation
+
+   This document specifies the data formats and software behaviors
+   needed to use OTP extended responses. The data formats are described
+   three ways: using an ad-hoc UNIX manual page style syntax, using
+   augmented BNF described in sections two and three of RFC 822, and by
+   examples. Should there be any conflict between these descriptions,
+   the augmented BNF takes precedence. The software behaviors are
+   described in words, and specific behavior compliance requirements are
+   itemized using the requirements terminology (specifically, the words
+   MUST, SHOULD, and MAY) defined in RFC 2119.
+
+
+
+
+
+
+
+Metz                        Standards Track                     [Page 1]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+2. Extended Challenges and Extended Responses
+
+   This document builds on the protocol and terminology specified in RFC
+   1938 and assumes that you have already read this document and
+   understand its contents.
+
+   An extended challenge is a single line of printable text terminated
+   by either a new line sequence appropriate for the context of its use
+   (e.g., ASCII CR followed by ASCII LF) or a whitespace character. It
+   contains a standard OTP challenge, a whitespace character, and a list
+   that generators use to determine which extended responses are
+   supported by a server.
+
+   An extended response is a single line of printable text terminated by
+   a new line sequence appropriate for the context of its use. It
+   contains two or more tokens that are separated with a single colon
+   (':') character. The first token contains a type specifier that
+   indicates the format of the rest of the response. The tokens that
+   follow are argument data for the OTP extended response. At least one
+   token of data MUST be present.
+
+2.1. Syntax
+
+   In UNIX manual page like syntax, the general form of an extended
+   challenge could be described as:
+
+      <standard OTP challenge> ext[,<extension set id>[, ...]]
+
+   And the general form of an extended response could be described as:
+
+      <type-specifier>:<arg1>[:<arg2>[:...]]
+
+   In augmented BNF syntax, the syntax of the general form of an
+   extended challenge and an extended response is:
+
+   extended-challenge = otp-challenge 1*LWSP-char capability-list
+                        (NL / *LWSP-char)
+   otp-challenge     = <a standard OTP challenge>
+   capability-list   = "ext" *("," extension-set-id)
+   extension-set-id  = *<any CHAR except LWSP, CTLs, or ",">
+   extended-response = type 1*(":" argument) NL
+   type              = token
+   argument          = token
+   token             = 1*<any CHAR except ":" and CTLs>
+   NL                = <new line sequence appropriate for the context
+                        in which OTP is being used>
+
+
+
+
+
+Metz                        Standards Track                     [Page 2]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+   An example of an extended challenge indicating support for OTP
+   extended responses and for a mythical response set "foo" is:
+
+      otp-md5 123 mi1234 ext,foo
+
+   An example of an extended response using a mythical type named "foo"
+   is:
+
+      foo:some data:some more data:12345
+
+2.2. Requirements
+
+   A server compliant with this specification:
+
+      1. MUST be able to receive and parse the general form of an
+         extended response
+      2. MUST be able to receive, parse, and correctly process all
+         extended responses specified in this document
+      3. MUST process the type field in a case-insensitive manner
+      4. MUST reject any authentication attempt using an extended
+         response if it does not support that type of response
+      5. SHOULD provide an appropriate indication to the generator
+         if the response was rejected because of (4)
+      6. MUST limit the length of the input reasonably
+      7. MUST accept otherwise arbitrary amounts of whitespace
+         wherever a response allows it
+      8. MUST be able to receive and correctly process standard OTP
+         responses
+
+   A generator compliant with this specification:
+
+      1. MUST be able to generate standard OTP responses
+      2. MUST use standard responses unless an extended challenge
+         has been received for the particular server AND seed
+      3. MUST generate the type field in lower case
+      4. MUST NOT send a response type for which the server has not
+         indicated support through an extended challenge
+
+   Extension set identifiers and extension type identifiers named with
+   the prefix "x-" are reserved for private use among mutually
+   consenting implementations. Implementations that do not recognise a
+   particular "x-" extension MUST ignore that extension. This means that
+   all "x-" extensions are likely to be non-interoperable with other
+   extensions. Careful consideration should be given to the possibility
+   of a server interacting with with a generator implementation which,
+   although it recognizes a given "x-" extension, uses it for a
+   different purpose. All of the remaining extension namespace is
+   reserved to IANA, which will only officially assign the extension
+
+
+
+Metz                        Standards Track                     [Page 3]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+   into this namespace after the IESG approves of such an assignment.
+   During the lifetime of the OTP WG, it is recommended that the IESG
+   consult with the OTP WG prior to approving such an assignment.
+
+3. The "hex" and "word" Responses
+
+   There exists a very rare case in which a standard OTP response could
+   be a valid coding in both the hexadecimal and six-word formats. An
+   example of this is the response "ABE ACE ADA ADD BAD A."  The
+   solution to this problem mandated by the OTP specification is that
+   compliant servers MUST attempt to parse and verify a standard
+   response in both hexadecimal and six-word formats and must consider
+   the authentication successful if either succeeds.
+
+   This problem can be solved easily using extended responses. The "hex"
+   response and the "word" response are two response types that encode
+   an OTP in an extended response that explicitly describes the
+   encoding. These responses start with a type label of "hex" for a
+   hexadecimal OTP and "word" for a six-word coded OTP. These responses
+   contain one argument field that contains a standard OTP response
+   coded in the indicated format.
+
+3.1. Syntax
+
+   In UNIX manual page like syntax, the format of these responses could
+   be described as:
+
+      hex:<hexadecimal number>
+      word:<six dictionary words>
+
+   In augmented BNF syntax and with the definitions already provided,
+   the syntax of these responses is:
+
+      hex-response  = "hex:" hex-64bit NL
+      hex-64bit     = 16(hex-char *LWSP-char)
+      hex-char      = ("A" / "B" / "C" / "D" / "E" / "F" /
+                       "a" / "b" / "c" / "d" / "e" / "f" /
+                       "0" / "1" / "2" / "3" / "4" / "5" /
+                       "6" / "7" / "8" / "9")
+
+      word-response = "word:" word-64bit NL
+      word-64bit    = 6(otp-word 1*LWSP-char)
+      otp-word      = <any valid word in the standard OTP coding
+                      dictionary>
+
+
+
+
+
+
+
+Metz                        Standards Track                     [Page 4]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+   Examples of these responses are:
+
+      hex:8720 33d4 6202 9172
+      word:VAST SAUL TAKE SODA SUCH BOLT
+
+3.2. Requirements
+
+   A server compliant with this specification:
+
+      1. MUST process all arguments in a case-insensitive manner
+
+   A generator compliant with this specification:
+
+      1. SHOULD generate otp-word tokens in upper case with single
+         spaces separating them
+      2. SHOULD generate hexadecimal numbers using only lower case
+         for letters
+
+4. The "init-hex" and "init-word" Responses
+
+   The OTP specification requires that implementations provide a means
+   for a client to re-initialize or change its OTP information with a
+   server but does not require any specific protocol for doing it.
+   Implementations that support the OTP extended responses described in
+   this document MUST support the response with the "init-hex" and
+   "init-word" type specifiers, which provide a standard way for a
+   client to re-initialize its OTP information with a server. This
+   response is intended to be used only by automated clients. Because of
+   this, the recommended form of this response uses the hexadecimal
+   encoding for binary data. It is possible for a user to type an "init-
+   hex" or "init-word" response.
+
+4.1. Syntax
+
+   In UNIX manual page like syntax, the format of these responses could
+   be described as:
+
+      init-hex:<current-OTP>:<new-params>:<new-OTP>
+      init-word:<current-OTP>:<new-params>:<new-OTP>
+
+   In augmented BNF syntax and with the definitions already provided,
+   the syntax of the "init-hex" response is:
+
+   init-hex-response = "init-hex:" current-OTP ":" new-params ":"
+                        new-OTP NL
+
+   current-OTP     = hex-64bit
+   new-OTP         = hex-64bit
+
+
+
+Metz                        Standards Track                     [Page 5]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+   new-params      = algorithm SPACE sequence-number SPACE seed
+   algorithm       = "md4" / "md5" / "sha1"
+   sequence-number = 4*3DIGIT
+   seed            = 16*1(ALPHA / DIGIT)
+
+   In augmented BNF syntax and with the definitions already provided,
+   the syntax of the "init-word" response is:
+
+   init-word-response = "init-word:" current-OTP ":" new-params ":"
+                        new-OTP NL
+
+   current-OTP     = word-64bit
+   new-OTP         = word-64bit
+
+   new-params      = algorithm SPACE sequence-number SPACE seed
+   algorithm       = "md4" / "md5" / "sha1"
+   sequence-number = 4*3DIGIT
+   seed            = 16*1(ALPHA / DIGIT)
+
+   Note that all appropriate fields for the "init-hex" response MUST be
+   hexadecimally coded and that all appropriate fields for the "init-
+   word" response MUST be six-word coded.
+
+   Examples of these responses are:
+
+   init-hex:f6bd 6b33 89b8 7203:md5 499 ke6118:23d1 b253 5ae0 2b7e
+   init-hex:c9b2 12bb 6425 5a0f:md5 499 ke0986:fd17 cef1 b4df 093e
+
+   init-word:MOOD SOFT POP COMB BOLO LIFE:md5 499 ke1235:
+   ARTY WEAR TAD RUG HALO GIVE
+   init-word:END KERN BALM NICK EROS WAVY:md5 499 ke1235:
+   BABY FAIN OILY NIL TIDY DADE
+
+   (Note that all of these responses are one line. Due to their length,
+   they had to be split into multiple lines in order to be included
+   here. These responses MUST NOT span more than one line in actual use)
+
+4.2. Description of Fields
+
+   The current-OTP field contains the (RFC 1938) response to the OTP
+   challenge.  The new-params field contains the parameters for the
+   client's new requested challenge and the new-OTP field contains a
+   response to that challenge. If the re-initialization is successful, a
+   server MUST store the new OTP in its database as the last successful
+   OTP received and the sequence number in the next challenge presented
+   by the server MUST be one less than the sequence number specified in
+   the new-params field.
+
+
+
+
+Metz                        Standards Track                     [Page 6]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+   The new-params field is hashed as a string the same way that a seed
+   or secret pass phrase would be. All other field values are hashed in
+   their uncoded binary forms, in network byte order and without any
+   padding.
+
+4.3. Requirements
+
+   A server compliant with this specification:
+
+      1. SHOULD NOT allow a user to use the same value for their
+         seed and secret pass phrase.
+      2. MUST disable all OTP access to any principal whose
+         sequence number would be less than one
+      3. MUST decrement the sequence number if a reinitialization
+         response includes a valid current-OTP, but the server is
+         unable to successfully process the new-params or new-OTP for
+         any reason.
+
+   A generator compliant with this specification:
+
+      1. SHOULD NOT allow a user to use the same value for their
+         seed and secret pass phrase
+      2. MUST take specific steps to prevent infinite loops of
+         re-initialization attempts in case of failure
+      3. SHOULD provide the user with some indication that the
+         re-initialization is taking place
+      4. SHOULD NOT do a re-initialization without the user's
+         permission, either for that specific instance or as a
+         configuration option
+      5. SHOULD NOT retry a failed re-initialization without a user's
+         permission
+      6. SHOULD warn the user if the sequence number falls below ten
+      7. MUST refuse to generate OTPs with a sequence number below one
+
+5. Security Considerations
+
+   All of the security considerations for the OTP system also apply to
+   the OTP system with extended responses.
+
+   These extended responses, like OTP itself, do not protect the user
+   against active attacks. The IPsec Authentication Header (RFC-1826)
+   (or another technique with at least as much strength as IPsec AH)
+   SHOULD be used to protect against such attacks.
+
+   The consequences of a successful active attack on the re-
+   initialization response may be more severe than simply hijacking a
+   single session. An attacker could substitute his own response for
+
+
+
+
+Metz                        Standards Track                     [Page 7]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+   that of a legitimate user. The attacker may then be able to use the
+   OTP system to authenticate himself as the user at will (at least
+   until detected).
+
+   Failure to implement server requirement 3 in section 4.3 opens an
+   implementation to an attack based on replay of the current-OTP part
+   of the response.
+
+6. Acknowledgments
+
+   Like RFC 1938, the protocol described in this document was created by
+   contributors in the IETF OTP working group. Specific contributions
+   were made by Neil Haller, who provided input on the overall design
+   requirements of a re-initialization protocol, Denis Pinkas, who
+   suggested several modifications to the originally proposed re-
+   initialization protocol, and Phil Servita, who opened the debate with
+   the first real protocol proposal and provided lots of specific input
+   on the design of this and earlier protocols. The extensions to the
+   OTP challenge were suggested by Chris Newman and John Valdes.
+
+   Randall Atkinson and Ted T'so also contributed their views to
+   discussions about details of the protocol extensions in this
+   document.
+
+References
+
+   [RFC 822]   Crocker, D., "Standard for the Format of ARPA Internet
+               Text Messages," RFC 822, August 1982.
+
+   [RFC 1825]  Atkinson, R., "Security Architecture for the Internet
+               Protocol," RFC 1825, August 1995.
+
+   [RFC 1938]  Haller, N. and C. Metz, "A One-Time Password System,"
+               RFC 1938, May 1996.
+
+   [RFC 2119]  Bradner, S., "Key words for use in RFCs to
+               Indicate Requirement Level," RFC 2119,
+               March 1997.
+
+Author's Address
+
+   Craig Metz
+   The Inner Net
+   Box 10314-1936
+   Blacksburg, VA 24062-0314
+   (DSN) 354-8590
+   cmetz at inner.net
+
+
+
+
+Metz                        Standards Track                     [Page 8]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+Appendix: Reference Responses
+
+   The following responses were generated by a development version of
+   the One-Time Passwords in Everything (OPIE) implementation of this
+   specification.
+
+   All of these are responses to the challenge:
+
+        otp-md5 499 ke1234 ext
+
+   Note that the re-initialization responses use the same secret pass
+   phrase for new and current and a new seed of "ke1235". Also, these
+   responses have been split for formatting purposes into multiple
+   lines; they MUST NOT be multiple lines in actual use.
+
+   The secret pass phrase for these responses is:
+
+        This is a test.
+
+   The OTP standard hexadecimal response is:
+
+        5bf0 75d9 959d 036f
+
+   The OTP standard six-word response is:
+
+        BOND FOGY DRAB NE RISE MART
+
+   The OTP extended "hex" response is:
+
+        hex:5Bf0 75d9 959d 036f
+
+   The OTP extended "word" response is:
+
+        word:BOND FOGY DRAB NE RISE MART
+
+   The OTP extended "init-hex" response is:
+
+        init-hex:5bf0 75d9 959d 036f:md5 499 ke1235:3712 dcb4 aa53 16c1
+
+   The OTP extended "init-word" response is:
+
+        init-word:BOND FOGY DRAB NE RISE MART:md5 499 ke1235:  RED HERD
+        NOW BEAN PA BURG
+
+
+
+
+
+
+
+
+Metz                        Standards Track                     [Page 9]
+

+RFC 2243                 OTP Extended Responses            November 1997
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Metz                        Standards Track                    [Page 10]
+

diff --git a/doc/rfc2245.txt b/doc/rfc2245.txt
new file mode 100644
index 0000000..1025a90
--- /dev/null
+++ b/doc/rfc2245.txt
@@ -0,0 +1,283 @@
+
+
+
+
+
+
+Network Working Group                                          C. Newman
+Request for Comments: 2245                                      Innosoft
+Category: Standards Track                                  November 1997
+
+
+                        Anonymous SASL Mechanism
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+Abstract
+
+   It is common practice on the Internet to permit anonymous access to
+   various services.  Traditionally, this has been done with a plain
+   text password mechanism using "anonymous" as the user name and
+   optional trace information, such as an email address, as the
+   password.  As plaintext login commands are not permitted in new IETF
+   protocols, a new way to provide anonymous login is needed within the
+   context of the SASL [SASL] framework.
+
+1. Conventions Used in this Document
+
+   The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
+   in this document are to be interpreted as defined in "Key words for
+   use in RFCs to Indicate Requirement Levels" [KEYWORDS].
+
+2. Anonymous SASL mechanism
+
+   The mechanism name associated with anonymous access is "ANONYMOUS".
+   The mechanism consists of a single message from the client to the
+   server.  The client sends optional trace information in the form of a
+   human readable string.  The trace information should take one of
+   three forms: an Internet email address, an opaque string which does
+   not contain the '@' character and can be interpreted by the system
+   administrator of the client's domain, or nothing.  For privacy
+   reasons, an Internet email address should only be used with
+   permission from the user.
+
+
+
+
+
+Newman                      Standards Track                     [Page 1]
+

+RFC 2245                Anonymous SASL Mechanism           November 1997
+
+
+   A server which permits anonymous access will announce support for the
+   ANONYMOUS mechanism, and allow anyone to log in using that mechanism,
+   usually with restricted access.
+
+   The formal grammar for the client message using Augmented BNF [ABNF]
+   follows.
+
+   message         = [email / token]
+
+   TCHAR           = %x20-3F / %x41-7E
+                     ;; any printable US-ASCII character except '@'
+
+   email           = addr-spec
+                     ;; as defined in [IMAIL], except with no free
+                     ;; insertion of linear-white-space, and the
+                     ;; local-part MUST either be entirely enclosed in
+                     ;; quotes or entirely unquoted
+
+   token           = 1*255TCHAR
+
+3. Example
+
+
+   Here is a sample anonymous login between an IMAP client and server.
+   In this example, "C:" and "S:" indicate lines sent by the client and
+   server respectively.  If such lines are wrapped without a new "C:" or
+   "S:" label, then the wrapping is for editorial clarity and is not
+   part of the command.
+
+   Note that this example uses the IMAP profile [IMAP4] of SASL.  The
+   base64 encoding of challenges and responses, as well as the "+ "
+   preceding the responses are part of the IMAP4 profile, not part of
+   SASL itself.  Newer profiles of SASL will include the client message
+   with the AUTHENTICATE command itself so the extra round trip below
+   (the server response with an empty "+ ") can be eliminated.
+
+   In this example, the user's opaque identification token is "sirhc".
+
+        S: * OK IMAP4 server ready
+        C: A001 CAPABILITY
+        S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=ANONYMOUS
+        S: A001 OK done
+        C: A002 AUTHENTICATE ANONYMOUS
+        S: +
+        C: c2lyaGM=
+        S: A003 OK Welcome, trace information has been logged.
+
+
+
+
+
+Newman                      Standards Track                     [Page 2]
+

+RFC 2245                Anonymous SASL Mechanism           November 1997
+
+
+4. Security Considerations
+
+   The anonymous mechanism grants access to information by anyone.  For
+   this reason it should be disabled by default so the administrator can
+   make an explicit decision to enable it.
+
+   If the anonymous user has any write privileges, a denial of service
+   attack is possible by filling up all available space.  This can be
+   prevented by disabling all write access by anonymous users.
+
+   If anonymous users have read and write access to the same area, the
+   server can be used as a communication mechanism to anonymously
+   exchange information.  Servers which accept anonymous submissions
+   should implement the common "drop box" model which forbids anonymous
+   read access to the area where anonymous submissions are accepted.
+
+   If the anonymous user can run many expensive operations (e.g., an
+   IMAP SEARCH BODY command), this could enable a denial of service
+   attack.  Servers are encouraged to limit the number of anonymous
+   users and reduce their priority or limit their resource usage.
+
+   If there is no idle timeout for the anonymous user and there is a
+   limit on the number of anonymous users, a denial of service attack is
+   enabled.  Servers should implement an idle timeout for anonymous
+   users.
+
+   The trace information is not authenticated so it can be falsified.
+   This can be used as an attempt to get someone else in trouble for
+   access to questionable information.  Administrators trying to trace
+   abuse need to realize this information may be falsified.
+
+   A client which uses the user's correct email address as trace
+   information without explicit permission may violate that user's
+   privacy.  Information about who accesses an anonymous archive on a
+   sensitive subject (e.g., sexual abuse) has strong privacy needs.
+   Clients should not send the email address without explicit permission
+   of the user and should offer the option of supplying no trace token
+   -- thus only exposing the source IP address and time.  Anonymous
+   proxy servers could enhance this privacy, but would have to consider
+   the resulting potential denial of service attacks.
+
+   Anonymous connections are susceptible to man in the middle attacks
+   which view or alter the data transferred.  Clients and servers are
+   encouraged to support external integrity and encryption mechanisms.
+
+   Protocols which fail to require an explicit anonymous login are more
+   susceptible to break-ins given certain common implementation
+   techniques.  Specifically, Unix servers which offer user login may
+
+
+
+Newman                      Standards Track                     [Page 3]
+

+RFC 2245                Anonymous SASL Mechanism           November 1997
+
+
+   initially start up as root and switch to the appropriate user id
+   after an explicit login command.  Normally such servers refuse all
+   data access commands prior to explicit login and may enter a
+   restricted security environment (e.g., the Unix chroot function) for
+   anonymous users.  If anonymous access is not explicitly requested,
+   the entire data access machinery is exposed to external security
+   attacks without the chance for explicit protective measures.
+   Protocols which offer restricted data access should not allow
+   anonymous data access without an explicit login step.
+
+5. References
+
+   [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
+   Specifications: ABNF", RFC 2234, November 1997.
+
+   [IMAIL] Crocker, D., "Standard for the Format of Arpa Internet Text
+   Messages", STD 11, RFC 822, August 1982.
+
+   [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
+   4rev1", RFC 2060, December 1996.
+
+   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
+   Requirement Levels", RFC 2119, March 1997.
+
+   [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)",
+   RFC 2222, October 1997.
+
+6. Author's Address
+
+   Chris Newman
+   Innosoft International, Inc.
+   1050 Lakes Drive
+   West Covina, CA 91790 USA
+
+   Email: chris.newman at innosoft.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                     [Page 4]
+

+RFC 2245                Anonymous SASL Mechanism           November 1997
+
+
+7.  Full Copyright Statement
+
+   Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                     [Page 5]
+

diff --git a/doc/rfc2289.txt b/doc/rfc2289.txt
new file mode 100644
index 0000000..8d1d722
--- /dev/null
+++ b/doc/rfc2289.txt
@@ -0,0 +1,1403 @@
+
+
+
+
+
+
+Network Working Group                                        N. Haller
+Request for Comments: 2289                                    Bellcore
+Obsoletes: 1938                                                C. Metz
+Category: Standards Track                   Kaman Sciences Corporation
+                                                             P. Nesser
+                                            Nesser & Nesser Consulting
+                                                              M. Straw
+                                                              Bellcore
+                                                         February 1998
+
+
+                       A One-Time Password System
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (1998).  All Rights Reserved.
+
+1.0 ABSTRACT
+
+   This document describes a one-time password authentication system
+   (OTP). The system provides authentication for system access (login)
+   and other applications requiring authentication that is secure
+   against passive attacks based on replaying captured reusable
+   passwords. OTP evolved from the S/KEY (S/KEY is a trademark of
+   Bellcore) One-Time Password System that was released by Bellcore and
+   is described in references [3] and [5].
+
+2.0 OVERVIEW
+
+   One form of attack on networked computing systems is eavesdropping on
+   network connections to obtain authentication information such as the
+   login IDs and passwords of legitimate users. Once this information is
+   captured, it can be used at a later time to gain access to the
+   system. One-time password systems are designed to counter this type
+   of attack, called a "replay attack" [4].
+
+   The authentication system described in this document uses a secret
+   pass-phrase to generate a sequence of one-time (single use)
+   passwords.  With this system, the user's secret pass-phrase never
+   needs to cross the network at any time such as during authentication
+
+
+
+Haller                      Standards Track                     [Page 1]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   or during pass-phrase changes. Thus, it is not vulnerable to replay
+   attacks.  Added security is provided by the property that no secret
+   information need be stored on any system, including the server being
+   protected.
+
+   The OTP system protects against external passive attacks against the
+   authentication subsystem. It does not prevent a network eavesdropper
+   from gaining access to private information and does not provide
+   protection against either "social engineering" or active attacks [9].
+
+3.0 INTRODUCTION
+
+   There are two entities in the operation of the OTP one-time password
+   system. The generator must produce the appropriate one-time password
+   from the user's secret pass-phrase and from information provided in
+   the challenge from the server. The server must send a challenge that
+   includes the appropriate generation parameters to the generator, must
+   verify the one-time password received, must store the last valid
+   one-time password it received, and must store the corresponding one-
+   time password sequence number. The server must also facilitate the
+   changing of the user's secret pass-phrase in a secure manner.
+
+   The OTP system generator passes the user's secret pass-phrase, along
+   with a seed received from the server as part of the challenge,
+   through multiple iterations of a secure hash function to produce a
+   one-time password. After each successful authentication, the number
+   of secure hash function iterations is reduced by one.  Thus, a unique
+   sequence of passwords is generated.  The server verifies the one-time
+   password received from the generator by computing the secure hash
+   function once and comparing the result with the previously accepted
+   one-time password.  This technique was first suggested by Leslie
+   Lamport [1].
+
+4.0 REQUIREMENTS TERMINOLOGY
+
+   In this document, the words that are used to define the significance
+   of each particular requirement are usually capitalized.  These words
+   are:
+
+     - MUST
+
+       This word or the adjective "REQUIRED" means that the item is an
+       absolute requirement of the specification.
+
+
+
+
+
+
+
+
+Haller                      Standards Track                     [Page 2]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+     - SHOULD
+
+       This word or the adjective "RECOMMENDED" means that there might
+       exist valid reasons in particular circumstances to ignore this
+       item, but the full implications should be understood and the case
+       carefully weighed before taking a different course.
+
+     - MAY
+
+       This word or the adjective "OPTIONAL" means that this item is
+       truly optional.  One vendor might choose to include the item
+       because a particular marketplace requires it or because it
+       enhances the product, for example; another vendor may omit the
+       same item.
+
+5.0 SECURE HASH FUNCTION
+
+   The security of the OTP system is based on the non-invertability of a
+   secure hash function. Such a function must be tractable to compute in
+   the forward direction, but computationally infeasible to invert.
+
+   The interfaces are currently defined for three such hash algorithms,
+   MD4 [2] and MD5 [6] by Ronald Rivest, and SHA [7] by NIST.  All
+   conforming implementations of both server and generators MUST support
+   MD5.  They SHOULD support SHA and MAY also support MD4.  Clearly, the
+   generator and server must use the same algorithm in order to
+   interoperate. Other hash algorithms may be specified for use with
+   this system by publishing the appropriate interfaces.
+
+   The secure hash algorithms listed above have the property that they
+   accept an input that is arbitrarily long and produce a fixed size
+   output. The OTP system folds this output to 64 bits using the
+   algorithms in the Appendix A. 64 bits is also the length of the one-
+   time passwords. This is believed to be long enough to be secure and
+   short enough to be entered manually (see below, Form of Output) when
+   necessary.
+
+6.0 GENERATION OF ONE-TIME PASSWORDS
+
+   This section describes the generation of the one-time passwords.
+   This process consists of an initial step in which all inputs are
+   combined, a computation step where the secure hash function is
+   applied a specified number of times, and an output function where the
+   64 bit one-time password is converted to a human readable form.
+
+   Appendix C contains examples of the outputs given a collection of
+   inputs.  It provides implementors with a means of verification the
+   use of these algorithms.
+
+
+
+Haller                      Standards Track                     [Page 3]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   Initial Step
+
+   In principle, the user's secret pass-phrase may be of any length. To
+   reduce the risk from techniques such as exhaustive search or
+   dictionary attacks, character string pass-phrases MUST contain at
+   least 10 characters (see Form of Inputs below).  All implementations
+   MUST support a pass-phrases of at least 63 characters.  The secret
+   pass-phrase is frequently, but is not required to be, textual
+   information provided by a user.
+
+   In this step, the pass phrase is concatenated with a seed that is
+   transmitted from the server in clear text. This non-secret seed
+   allows clients to use the same secret pass-phrase on multiple
+   machines (using different seeds) and to safely recycle their secret
+   pass-phrases by changing the seed.
+
+   The result of the concatenation is passed through the secure hash
+   function and then is reduced to 64 bits using one of the function
+   dependent algorithms shown in Appendix A.
+
+   Computation Step
+
+   A sequence of one-time passwords is produced by applying the secure
+   hash function multiple times to the output of the initial step
+   (called S). That is, the first one-time password to be used is
+   produced by passing S through the secure hash function a number of
+   times (N) specified by the user. The next one-time password to be
+   used is generated by passing S though the secure hash function N-1
+   times. An eavesdropper who has monitored the transmission of a one-
+   time password would not be able to generate the next required
+   password because doing so would mean inverting the hash function.
+
+   Form of Inputs
+
+   The secret pass-phrase is seen only by the OTP generator. To allow
+   interchangeability of generators, all generators MUST support a
+   secret pass-phrase of 10 to 63 characters. Implementations MAY
+   support a longer pass-phrase, but such implementations risk the loss
+   of interchangeability with implementations supporting only the
+   minimum.
+
+   The seed MUST consist of purely alphanumeric characters and MUST be
+   of one to 16 characters in length. The seed is a string of characters
+   that MUST not contain any blanks and SHOULD consist of strictly
+   alphanumeric characters from the ISO-646 Invariant Code Set.  The
+   seed MUST be case insensitive and MUST be internally converted to
+   lower case before it is processed.
+
+
+
+
+Haller                      Standards Track                     [Page 4]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   The sequence number and seed together constitute a larger unit of
+   data called the challenge. The challenge gives the generator the
+   parameters it needs to calculate the correct one-time password from
+   the secret pass-phrase. The challenge MUST be in a standard syntax so
+   that automated generators can recognize the challenge in context and
+   extract these parameters. The syntax of the challenge is:
+
+           otp-<algorithm identifier> <sequence integer> <seed>
+
+   The three tokens MUST be separated by a white space (defined as any
+   number of spaces and/or tabs) and the entire challenge string MUST be
+   terminated with either a space or a new line. The string "otp-" MUST
+   be in lower case.  The algorithm identifier is case sensitive (the
+   existing identifiers are all lower case), and the seed is case
+   insensitive and converted before use to lower case.  If additional
+   algorithms are defined, appropriate identifiers (short, but not
+   limited to three or four characters) must be defined. The currently
+   defined algorithm identifiers are:
+
+       md4        MD4 Message Digest
+       md5        MD5 Message Digest
+       sha1       NIST Secure Hash Algorithm Revision 1
+
+   An example of an OTP challenge is:   otp-md5 487 dog2
+
+   Form of Output
+
+   The one-time password generated by the above procedure is 64 bits in
+   length. Entering a 64 bit number is a difficult and error prone
+   process. Some generators insert this password into the input stream
+   and some others make it available for system "cut and paste." Still
+   other arrangements require the one-time password to be entered
+   manually. The OTP system is designed to facilitate this manual entry
+   without impeding automatic methods. The one-time password therefore
+   MAY be converted to, and all servers MUST be capable of accepting it
+   as, a sequence of six short (1 to 4 letter) easily typed words that
+   only use characters from ISO-646 IVCS. Each word is chosen from a
+   dictionary of 2048 words; at 11 bits per word, all one-time passwords
+   may be encoded.
+
+   The two extra bits in this encoding are used to store a checksum.
+   The 64 bits of key are broken down into pairs of bits, then these
+   pairs are summed together. The two least significant bits of this sum
+   are encoded in the last two bits of the six word sequence with the
+   least significant bit of the sum as the last bit encoded. All OTP
+   generators MUST calculate this checksum and all OTP servers MUST
+   verify this checksum explicitly as part of the operation of decoding
+   this representation of the one-time password.
+
+
+
+Haller                      Standards Track                     [Page 5]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   Generators that produce the six-word format MUST present the words in
+   upper case with single spaces used as separators. All servers MUST
+   accept six-word format without regard to case and white space used as
+   a separator. The two lines below represent the same one-time
+   password.  The first is valid as output from a generator and as input
+   a server, the second is valid only as human input to a server.
+
+            OUST COAT FOAL MUG BEAK TOTE
+            oust coat foal  mug  beak  tote
+
+     Interoperability requires that all OTP servers and generators use
+     the same dictionary. The standard dictionary was originally
+     specified in the "S/KEY One Time Password System" that is described
+     in RFC 1760 [5].  This dictionary is included in this document as
+     Appendix D.
+
+     To facilitate the implementation of smaller generators, hexadecimal
+     output is an acceptable alternative for the presentation of the
+     one-time password. All implementations of the server software MUST
+     accept case-insensitive hexadecimal as well as six-word format. The
+     hexadecimal digits may be separated by white space so servers are
+     REQUIRED to ignore all white space.  If the representation is
+     partitioned by white space, leading zeros must be retained.
+     Examples of hexadecimal format are:
+
+           Representation                Value
+
+           3503785b369cda8b              0x3503785b369cda8b
+           e5cc a1b8 7c13 096b           0xe5cca1b87c13096b
+           C7 48 90 F4 27 7B A1 CF       0xc74890f4277ba1cf
+           47 9 A68 28 4C 9D 0 1BC       0x479a68284c9d01bc
+
+   In addition to accepting six-word and hexadecimal encodings of the
+   64 bit one-time password, servers SHOULD accept the alternate
+   dictionary encoding described in Appendix B.  The six words in this
+   encoding MUST not overlap the set of words in the standard
+   dictionary.  To avoid ambiguity with the hexadecimal representation,
+   words in the alternate dictionary MUST not be comprised solely of
+   the letters A-F.  Decoding words thus encoded does not require any
+   knowledge of the alternative dictionary used so the acceptance of
+   any alternate dictionary implies the acceptance of all alternate
+   dictionaries.  Words in the alternative dictionaries are case
+   sensitive.  Generators and servers MUST preserve the case in the
+   processing of these words.
+
+   In summary, all conforming servers MUST accept six-word input that
+   uses the Standard Dictionary (RFC 1760 and Appendix D), MUST accept
+   hexadecimal encoding, and SHOULD accept six-word input that uses the
+
+
+
+Haller                      Standards Track                     [Page 6]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   Alternative Dictionary technique (Appendix B).  As there is a remote
+   possibility that a hexadecimal encoding of a one-time password will
+   look like a valid six-word standard dictionary encoding, all
+   implementations MUST use the following scheme.  If a six-word
+   encoded one-time password is valid, it is accepted.  Otherwise, if
+   the one-time password can be interpreted as hexadecimal, and with
+   that decoding it is valid, then it is accepted.
+
+7.0 VERIFICATION OF ONE-TIME PASSWORDS
+
+   An application on the server system that requires OTP authentication
+   is expected to issue an OTP challenge as described above. Given the
+   parameters from this challenge and the secret pass-phrase, the
+   generator can compute (or lookup) the one-time password that is
+   passed to the server to be verified.
+
+   The server system has a database containing, for each user, the
+   one-time password from the last successful authentication or the
+   first OTP of a newly initialized sequence. To authenticate the user,
+   the server decodes the one-time password received from the generator
+   into a 64-bit key and then runs this key through the secure hash
+   function once. If the result of this operation matches the stored
+   previous OTP, the authentication is successful and the accepted
+   one-time password is stored for future use.
+
+8.0 PASS-PHRASE CHANGES
+
+   Because the number of hash function applications executed by the
+   generator decreases by one each time, at some point the user must
+   reinitialize the system or be unable to authenticate.
+
+   Although some installations may not permit users to initialize
+   remotely, implementations MUST provide a means to do so that does
+   not reveal the user's secret pass-phrase.  One way is to provide a
+   means to reinitialize the  sequence through explicit specification
+   of the first one-time password.
+
+   When the sequence of one-time passwords is reinitialized,
+   implementations MUST verify that the seed or the pass-phrase is
+   changed.  Installations SHOULD discourage any operation that sends
+   the secret pass-phrase over a network in clear-text as such practice
+   defeats the concept of a one-time password.
+
+   Implementations MAY use the following technique for
+   [re]initialization:
+
+
+
+
+
+
+Haller                      Standards Track                     [Page 7]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+      o  The user picks a new seed and hash count (default values may
+         be offered).  The user provides these, along with the
+         corresponding generated one-time password, to the host system.
+
+      o  The user MAY also provide the corresponding generated one
+         time password for count-1 as an error check.
+
+      o  The user SHOULD provide the generated one-time password for
+         the old seed and old hash count to protect an idle terminal
+         or workstation (this implies that when the count is 1, the
+         user can login but cannot then change the seed or count).
+
+   In the future a specific protocol may be defined for
+   reinitialization that will permit smooth and possibly automated
+   interoperation of all hosts and generators.
+
+9.0 PROTECTION AGAINST RACE ATTACK
+
+   All conforming server implementations MUST protect against the race
+   condition described in this section.  A defense against this attack
+   is outlined; implementations MAY use this approach or MAY select an
+   alternative defense.
+
+   It is possible for an attacker to listen to most of a one-time
+   password, guess the remainder, and then race the legitimate user to
+   complete the authentication.  Multiple guesses against the last word
+   of the six-word format are likely to succeed.
+
+   One possible defense is to prevent a user from starting multiple
+   simultaneous authentication sessions. This means that once the
+   legitimate user has initiated authentication, an attacker would be
+   blocked until the first authentication process has completed.  In
+   this approach, a timeout is necessary to thwart a denial of service
+   attack.
+
+10.0 SECURITY CONSIDERATIONS
+
+   This entire document discusses an authentication system that
+   improves security by limiting the danger of eavesdropping/replay
+   attacks that have been used against simple password systems [4].
+
+   The use of the OTP system only provides protections against passive
+   eavesdropping/replay attacks.  It does not provide for the privacy
+   of transmitted data, and it does not provide protection against
+   active attacks such as session hijacking that are known to be
+   present in the current Internet [9].  The use of IP Security
+   (IPsec), see [10], [11], and [12] is recommended to protect against
+   TCP session hijacking.
+
+
+
+Haller                      Standards Track                     [Page 8]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   The success of the OTP system to protect host systems is dependent
+   on the non-invertability of the secure hash functions used.  To our
+   knowledge, none of the hash algorithms have been broken, but it is
+   generally believed [6] that MD4 is not as strong as MD5.  If a
+   server supports multiple hash algorithms, it is only as secure as
+   the weakest algorithm.
+
+11.0 ACKNOWLEDGMENTS
+
+   The idea behind OTP authentication was first proposed by Leslie
+   Lamport [1]. Bellcore's S/KEY system, from which OTP is derived, was
+   proposed by Phil Karn, who also wrote most of the Bellcore reference
+   implementation.
+
+12.0 REFERENCES
+
+   [1]  Leslie Lamport, "Password Authentication with Insecure
+        Communication", Communications of the ACM 24.11 (November
+        1981), 770-772
+
+   [2]  Rivest, R., "The MD4 Message-Digest Algorithm", RFC 1320,
+        April 1992.
+
+   [3]  Neil Haller, "The S/KEY One-Time Password System", Proceedings
+        of the ISOC Symposium on Network and Distributed System
+        Security, February 1994, San Diego, CA
+
+   [4]  Haller, N., and R. Atkinson, "On Internet Authentication",
+        RFC 1704, October 1994.
+
+   [5]  Haller, N., "The S/KEY One-Time Password System",
+        RFC 1760, February 1995.
+
+   [6]  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
+        April 1992.
+
+   [7]  National Institute of Standards and Technology (NIST),
+        "Announcing the Secure Hash Standard", FIPS 180-1, U.S.
+        Department of Commerce, April 1995.
+
+   [8]  International Standard - Information Processing -- ISO 7-bit
+        coded character set for information interchange (Invariant Code
+        Set), ISO-646, International Standards Organization, Geneva,
+        Switzerland, 1983
+
+
+
+
+
+
+
+Haller                      Standards Track                     [Page 9]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   [9]  Computer Emergency Response Team (CERT), "IP Spoofing and
+        Hijacked Terminal Connections", CA-95:01, January 1995.
+        Available via anonymous ftp from info.cert.org in
+        /pub/cert_advisories.
+
+   [10] Atkinson, R., "Security Architecture for the Internet Protocol",
+        RFC 1825, August 1995.
+
+   [11] Atkinson, R., "IP Authentication Header", RFC 1826, August
+        1995.
+
+   [12] Atkinson, R., "IP Encapsulating Security Payload (ESP)", RFC
+        1827, August 1995.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 10]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+13.0 AUTHORS' ADDRESSES
+
+   Neil Haller
+   Bellcore
+   MCC 1C-265B
+   445 South Street
+   Morristown, NJ, 07960-6438, USA
+
+   Phone: +1 201 829-4478
+   Fax:   +1 201 829-2504
+   EMail: nmh at bellcore.com
+
+
+   Craig Metz
+   Kaman Sciences Corporation
+   For NRL Code 5544
+   4555 Overlook Avenue, S.W.
+   Washington, DC, 20375-5337, USA
+
+   Phone: +1 202 404-7122
+   Fax:   +1 202 404-7942
+   EMail: cmetz at cs.nrl.navy.mil
+
+
+   Philip J. Nesser II
+   Nesser & Nesser Consulting
+   13501 100th Ave NE
+   Suite 5202
+   Kirkland, WA 98034, USA
+
+   Phone: +1 206 481 4303
+   EMail: pjnesser at martigny.ai.mit.edu
+
+
+   Mike Straw
+   Bellcore
+   RRC 1A-225
+   445 Hoes Lane
+   Piscataway, NJ 08854-4182
+
+   Phone:  +1 908 699-5212
+   EMail:  mess at bellcore.com
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 11]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+Appendix A  -  Interfaces to Secure Hash Algorithms
+
+   Original interoperability tests provided valuable insights into the
+   subtle problems which occur when converting protocol specifications
+   into running code.  In particular, the manipulation of bit ordered
+   data is dependent on the architecture of the hardware, specifically
+   the way in which a computer stores multi-byte data.  The method is
+   typically called big or little "endian."  A big endian machine stores
+   data with the most significant byte first, while a little endian
+   machine stores the least significant byte first.  Thus, on a big
+   endian machine data is stored left to right, while little endian
+   machines store data right to left.
+
+   For example, the four byte value 0x11AABBCC is stored in a big endian
+   machine as the following series of four bytes, "0x11", "0xAA",
+   "0xBB", and "0xCC", while on a little endian machine the value would
+   be stored as "0xCC", "0xBB", "0xAA", and "0x11".
+
+   For historical reasons, and to promote interoperability with existing
+   implementations, it was decided that ALL hashes incorporated into the
+   OTP protocol MUST store the output of their hash function in LITTLE
+   ENDIAN format BEFORE the bit folding to 64 bits occurs.  This is done
+   in the implementations of MD4 and MD5 (see references [2] and [6]),
+   while it must be explicitly done for the implementation of SHA1 (see
+   reference [7]).
+
+   Any future hash functions implemented into the OTP protocol SHOULD
+   provide a similar reference fragment of code to allow independent
+   implementations to operate successfully.
+
+
+   MD4 Message Digest (see reference [2])
+
+     MD4_CTX md;
+     unsigned char result[16];
+
+     strcpy(buf, seed);     /* seed must be in lower case */
+     strcat(buf, passwd);
+     MD4Init(&md);
+     MD4Update(&md, (unsigned char *)buf, strlen(buf));
+     MD4Final(result, &md);
+
+     /* Fold the 128 bit result to 64 bits */
+     for (i = 0; i < 8; i++)
+             result[i] ^= result[i+8];
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 12]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+MD5 Message Digest (see reference [6])
+
+     MD5_CTX md;
+     unsigned char result[16];
+     strcpy(buf, seed);     /* seed must be in lower case */
+     strcat(buf, passwd);
+     MD5Init(&md);
+     MD5Update(&md, (unsigned char *)buf, strlen(buf));
+     MD5Final(result, &md);
+
+     /* Fold the 128 bit result to 64 bits */
+     for (i = 0; i < 8; i++)
+             result[i] ^= result[i+8];
+
+
+SHA Secure Hash Algorithm (see reference [7])
+
+     SHA_INFO sha;
+     unsigned char result[16];
+     strcpy(buf, seed);     /* seed must be in lower case */
+     strcat(buf, passwd);
+     sha_init(&sha);
+     sha_update(&sha, (unsigned char *)buf, strlen(buf));
+     sha_final(&sha);       /* NOTE:  no result buffer */
+
+     /* Fold the 160 bit result to 64 bits */
+     sha.digest[0] ^= sha.digest[2];
+     sha.digest[1] ^= sha.digest[3];
+     sha.digest[0] ^= sha.digest[4];
+
+     /*
+      * copy the resulting 64 bits to the result buffer in little endian
+      * fashion (analogous to the way MD4Final() and MD5Final() do).
+      */
+     for (i = 0, j = 0; j < 8; i++, j += 4)
+     {
+             result[j]   = (unsigned char)(sha.digest[i] & 0xff);
+             result[j+1] = (unsigned char)((sha.digest[i] >> 8) & 0xff);
+             result[j+2] = (unsigned char)((sha.digest[i] >> 16) & 0xff);
+             result[j+3] = (unsigned char)((sha.digest[i] >> 24) & 0xff);
+     }
+
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 13]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+Appendix B   -   Alternative Dictionary Algorithm
+
+   The purpose of alternative dictionary encoding of the OTP one-time
+   password is to allow the use of language specific or friendly words.
+   As case translation is not always well defined, the alternative
+   dictionary encoding is case sensitive.  Servers SHOULD accept this
+   encoding in addition to the standard 6-word and hexadecimal
+   encodings.
+
+
+   GENERATOR ENCODING USING AN ALTERNATE DICTIONARY
+
+     The standard 6-word encoding uses the placement of a word in the
+     dictionary to represent an 11-bit number. The 64-bit one-time
+     password can then be represented by six words.
+
+     An alternative dictionary of 2048 words may be created such that
+     each word W and position of the word in the dictionary N obey the
+     relationship:
+
+             alg( W ) % 2048 == N
+     where
+             alg is the hash algorithm used (e.g. MD4, MD5, SHA1).
+
+     In addition, no words in the standard dictionary may be chosen.
+
+     The generator expands the 64-bit one-time password to 66 bits by
+     computing parity as with the standard 6-word encoding.  The six 11-
+     bit numbers are then converted to words using the dictionary that
+     was created such that the above relationship holds.
+
+   SERVER DECODING OF ALTERNATE DICTIONARY ONE-TIME PASSWORDS
+
+     The server accepting alternative dictionary encoding converts each
+     word to an 11-bit number using the above encoding. These numbers
+     are then used in the same way as the decoded standard dictionary
+     words to form the 66-bit one-time password.
+
+     The server does not need to have access to the alternate dictionary
+     that was used to create the one-time password it is authenticating.
+     This is because the decoding from word to 11-bit number does not
+     make any use of the dictionary.  As a result of the independence of
+     the dictionary, a server accepting one alternate dictionary accept
+     all alternate dictionaries.
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 14]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+Appendix C  -  OTP Verification Examples
+
+   This appendix provides a series of inputs and correct outputs for all
+   three of the defined OTP cryptographic hashes, specifically MD4, MD5,
+   and SHA1.  This document is intended to be used by developers for
+   interoperability checks when creating generators or servers.  Output
+   is provided in both hexadecimal notation and the six word encoding
+   documented in Appendix D.
+
+   GENERAL CHECKS
+
+   Note that the output given for these checks is not intended to be
+   taken literally, but describes the type of action that should be
+   taken.
+
+   Pass Phrase Length
+
+ Input:
+   Pass Phrase: Too_short
+   Seed: iamvalid
+   Count: 99
+   Hash: ANY
+ Output:
+   ERROR:  Pass Phrase too short
+
+ Input:
+   Pass Phrase:
+     1234567890123456789012345678901234567890123456789012345678901234
+   Seed: iamvalid
+   Count: 99
+   Hash: ANY
+ Output:
+   WARNING: Pass Phrase longer than the recommended maximum length of
+63
+
+Seed Values
+
+ Input:
+   Pass Phrase:  A_Valid_Pass_Phrase
+   Seed: Length_Okay
+   Count: 99
+   Hash: ANY
+ Output:
+   ERROR: Seed must be purely alphanumeric
+
+ Input:
+   Pass Phrase:  A_Valid_Pass_Phrase
+   Seed: LengthOfSeventeen
+
+
+
+Haller                      Standards Track                    [Page 15]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+   Count: 99
+   Hash: ANY
+
+ Output:
+   ERROR: Seed must be between 1 and 16 characters in length
+
+ Input:
+   Pass Phrase:  A_Valid_Pass_Phrase
+   Seed: A Seed
+   Count: 99
+   Hash: ANY
+ Output:
+   ERROR: Seed must not contain any spaces
+
+Parity Calculations
+
+ Input:
+   Pass Phrase: A_Valid_Pass_Phrase
+   Seed: AValidSeed
+   Count: 99
+   Hash: MD5
+ Output:
+   Hex: 85c43ee03857765b
+   Six Word(CORRECT):          FOWL KID MASH DEAD DUAL OAF
+   Six Word(INCORRECT PARITY): FOWL KID MASH DEAD DUAL NUT
+   Six Word(INCORRECT PARITY): FOWL KID MASH DEAD DUAL O
+   Six Word(INCORRECT PARITY): FOWL KID MASH DEAD DUAL OAK
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 16]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+MD4 ENCODINGS
+
+Pass Phrase     Seed    Cnt Hex                 Six Word Format
+========================================================================
+This is a test. TeSt     0  D185 4218 EBBB 0B51
+                                           ROME MUG FRED SCAN LIVE LACE
+This is a test. TeSt     1  6347 3EF0 1CD0 B444
+                                           CARD SAD MINI RYE COL KIN
+This is a test. TeSt    99  C5E6 1277 6E6C 237A
+                                           NOTE OUT IBIS SINK NAVE MODE
+AbCdEfGhIjK     alpha1   0  5007 6F47 EB1A DE4E
+                                           AWAY SEN ROOK SALT LICE MAP
+AbCdEfGhIjK     alpha1   1  65D2 0D19 49B5 F7AB
+                                           CHEW GRIM WU HANG BUCK SAID
+AbCdEfGhIjK     alpha1  99  D150 C82C CE6F 62D1
+                                           ROIL FREE COG HUNK WAIT COCA
+OTP's are good  correct  0  849C 79D4 F6F5 5388
+                                           FOOL STEM DONE TOOL BECK NILE
+OTP's are good  correct  1  8C09 92FB 2508 47B1
+                                           GIST AMOS MOOT AIDS FOOD SEEM
+OTP's are good  correct 99  3F3B F4B4 145F D74B
+                                           TAG SLOW NOV MIN WOOL KENO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 17]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+MD5 ENCODINGS
+
+Pass Phrase     Seed    Cnt Hex                 Six Word Format
+========================================================================
+This is a test. TeSt     0  9E87 6134 D904 99DD
+                                           INCH SEA ANNE LONG AHEM TOUR
+This is a test. TeSt     1  7965 E054 36F5 029F
+                                           EASE OIL FUM CURE AWRY AVIS
+This is a test. TeSt    99  50FE 1962 C496 5880
+                                           BAIL TUFT BITS GANG CHEF THY
+AbCdEfGhIjK     alpha1   0  8706 6DD9 644B F206
+                                           FULL PEW DOWN ONCE MORT ARC
+AbCdEfGhIjK     alpha1   1  7CD3 4C10 40AD D14B
+                                           FACT HOOF AT FIST SITE KENT
+AbCdEfGhIjK     alpha1  99  5AA3 7A81 F212 146C
+                                           BODE HOP JAKE STOW JUT RAP
+OTP's are good  correct  0  F205 7539 43DE 4CF9
+                                           ULAN NEW ARMY FUSE SUIT EYED
+OTP's are good  correct  1  DDCD AC95 6F23 4937
+                                           SKIM CULT LOB SLAM POE HOWL
+OTP's are good  correct 99  B203 E28F A525 BE47
+                                           LONG IVY JULY AJAR BOND LEE
+
+
+SHA1 ENCODINGS
+
+Pass Phrase     Seed    Cnt Hex                 Six Word Format
+========================================================================
+This is a test. TeSt     0  BB9E 6AE1 979D 8FF4
+                                           MILT VARY MAST OK SEES WENT
+This is a test. TeSt     1  63D9 3663 9734 385B
+                                           CART OTTO HIVE ODE VAT NUT
+This is a test. TeSt    99  87FE C776 8B73 CCF9
+                                           GAFF WAIT SKID GIG SKY EYED
+AbCdEfGhIjK     alpha1   0  AD85 F658 EBE3 83C9
+                                           LEST OR HEEL SCOT ROB SUIT
+AbCdEfGhIjK     alpha1   1  D07C E229 B5CF 119B
+                                           RITE TAKE GELD COST TUNE RECK
+AbCdEfGhIjK     alpha1  99  27BC 7103 5AAF 3DC6
+                                           MAY STAR TIN LYON VEDA STAN
+OTP's are good  correct  0  D51F 3E99 BF8E 6F0B
+                                           RUST WELT KICK FELL TAIL FRAU
+OTP's are good  correct  1  82AE B52D 9437 74E4
+                                           FLIT DOSE ALSO MEW DRUM DEFY
+OTP's are good  correct 99  4F29 6A74 FE15 67EC
+                                           AURA ALOE HURL WING BERG WAIT
+
+
+
+
+
+Haller                      Standards Track                    [Page 18]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+Appendix D   -   Dictionary for Converting Between 6-Word and Binary Formats
+
+   This dictionary is from the module put.c in the original Bellcore
+   reference distribution.
+
+{        "A",     "ABE",   "ACE",   "ACT",   "AD",    "ADA",   "ADD",
+"AGO",   "AID",   "AIM",   "AIR",   "ALL",   "ALP",   "AM",    "AMY",
+"AN",    "ANA",   "AND",   "ANN",   "ANT",   "ANY",   "APE",   "APS",
+"APT",   "ARC",   "ARE",   "ARK",   "ARM",   "ART",   "AS",    "ASH",
+"ASK",   "AT",    "ATE",   "AUG",   "AUK",   "AVE",   "AWE",   "AWK",
+"AWL",   "AWN",   "AX",   "AYE",   "BAD",   "BAG",   "BAH",   "BAM",
+"BAN",   "BAR",   "BAT",   "BAY",   "BE",    "BED",   "BEE",   "BEG",
+"BEN",   "BET",   "BEY",   "BIB",   "BID",   "BIG",   "BIN",   "BIT",
+"BOB",   "BOG",   "BON",   "BOO",   "BOP",   "BOW",   "BOY",   "BUB",
+"BUD",   "BUG",   "BUM",   "BUN",   "BUS",   "BUT",   "BUY",   "BY",
+"BYE",   "CAB",   "CAL",   "CAM",   "CAN",   "CAP",   "CAR",   "CAT",
+"CAW",   "COD",   "COG",   "COL",   "CON",   "COO",   "COP",   "COT",
+"COW",   "COY",   "CRY",   "CUB",   "CUE",   "CUP",   "CUR",   "CUT",
+"DAB",   "DAD",   "DAM",   "DAN",   "DAR",   "DAY",   "DEE",   "DEL",
+"DEN",   "DES",   "DEW",   "DID",   "DIE",   "DIG",   "DIN",   "DIP",
+"DO",    "DOE",   "DOG",   "DON",   "DOT",   "DOW",   "DRY",   "DUB",
+"DUD",   "DUE",   "DUG",   "DUN",   "EAR",   "EAT",   "ED",    "EEL",
+"EGG",   "EGO",   "ELI",   "ELK",   "ELM",   "ELY",   "EM",    "END",
+"EST",   "ETC",   "EVA",   "EVE",   "EWE",   "EYE",   "FAD",   "FAN",
+"FAR",   "FAT",   "FAY",   "FED",   "FEE",   "FEW",   "FIB",   "FIG",
+"FIN",   "FIR",   "FIT",   "FLO",   "FLY",   "FOE",   "FOG",   "FOR",
+"FRY",   "FUM",   "FUN",   "FUR",   "GAB",   "GAD",   "GAG",   "GAL",
+"GAM",   "GAP",   "GAS",   "GAY",   "GEE",   "GEL",   "GEM",   "GET",
+"GIG",   "GIL",   "GIN",   "GO",    "GOT",   "GUM",   "GUN",   "GUS",
+"GUT",   "GUY",   "GYM",   "GYP",   "HA",    "HAD",   "HAL",   "HAM",
+"HAN",   "HAP",   "HAS",   "HAT",   "HAW",   "HAY",   "HE",    "HEM",
+"HEN",   "HER",   "HEW",   "HEY",   "HI",    "HID",   "HIM",   "HIP",
+"HIS",   "HIT",   "HO",   "HOB",   "HOC",   "HOE",   "HOG",   "HOP",
+"HOT",   "HOW",   "HUB",   "HUE",   "HUG",   "HUH",   "HUM",   "HUT",
+"I",     "ICY",   "IDA",   "IF",    "IKE",   "ILL",   "INK",   "INN",
+"IO",    "ION",   "IQ",   "IRA",   "IRE",   "IRK",   "IS",    "IT",
+"ITS",   "IVY",   "JAB",   "JAG",   "JAM",   "JAN",   "JAR",   "JAW",
+"JAY",   "JET",   "JIG",   "JIM",   "JO",    "JOB",   "JOE",   "JOG",
+"JOT",   "JOY",   "JUG",   "JUT",   "KAY",   "KEG",   "KEN",   "KEY",
+"KID",   "KIM",   "KIN",   "KIT",   "LA",    "LAB",   "LAC",   "LAD",
+"LAG",   "LAM",   "LAP",   "LAW",   "LAY",   "LEA",   "LED",   "LEE",
+"LEG",   "LEN",   "LEO",   "LET",   "LEW",   "LID",   "LIE",   "LIN",
+"LIP",   "LIT",   "LO",   "LOB",   "LOG",   "LOP",   "LOS",   "LOT",
+"LOU",   "LOW",   "LOY",   "LUG",   "LYE",   "MA",    "MAC",   "MAD",
+"MAE",   "MAN",   "MAO",   "MAP",   "MAT",   "MAW",   "MAY",   "ME",
+"MEG",   "MEL",   "MEN",   "MET",   "MEW",   "MID",   "MIN",   "MIT",
+"MOB",   "MOD",   "MOE",   "MOO",   "MOP",   "MOS",   "MOT",   "MOW",
+"MUD",   "MUG",   "MUM",   "MY",    "NAB",   "NAG",   "NAN",   "NAP",
+
+
+
+Haller                      Standards Track                    [Page 19]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+"NAT",   "NAY",   "NE",   "NED",   "NEE",   "NET",   "NEW",   "NIB",
+"NIL",   "NIP",   "NIT",   "NO",    "NOB",   "NOD",   "NON",   "NOR",
+"NOT",   "NOV",   "NOW",   "NU",    "NUN",   "NUT",   "O",     "OAF",
+"OAK",   "OAR",   "OAT",   "ODD",   "ODE",   "OF",    "OFF",   "OFT",
+"OH",    "OIL",   "OK",   "OLD",   "ON",    "ONE",   "OR",    "ORB",
+"ORE",   "ORR",   "OS",   "OTT",   "OUR",   "OUT",   "OVA",   "OW",
+"OWE",   "OWL",   "OWN",   "OX",    "PA",    "PAD",   "PAL",   "PAM",
+"PAN",   "PAP",   "PAR",   "PAT",   "PAW",   "PAY",   "PEA",   "PEG",
+"PEN",   "PEP",   "PER",   "PET",   "PEW",   "PHI",   "PI",    "PIE",
+"PIN",   "PIT",   "PLY",   "PO",    "POD",   "POE",   "POP",   "POT",
+"POW",   "PRO",   "PRY",   "PUB",   "PUG",   "PUN",   "PUP",   "PUT",
+"QUO",   "RAG",   "RAM",   "RAN",   "RAP",   "RAT",   "RAW",   "RAY",
+"REB",   "RED",   "REP",   "RET",   "RIB",   "RID",   "RIG",   "RIM",
+"RIO",   "RIP",   "ROB",   "ROD",   "ROE",   "RON",   "ROT",   "ROW",
+"ROY",   "RUB",   "RUE",   "RUG",   "RUM",   "RUN",   "RYE",   "SAC",
+"SAD",   "SAG",   "SAL",   "SAM",   "SAN",   "SAP",   "SAT",   "SAW",
+"SAY",   "SEA",   "SEC",   "SEE",   "SEN",   "SET",   "SEW",   "SHE",
+"SHY",   "SIN",   "SIP",   "SIR",   "SIS",   "SIT",   "SKI",   "SKY",
+"SLY",   "SO",    "SOB",   "SOD",   "SON",   "SOP",   "SOW",   "SOY",
+"SPA",   "SPY",   "SUB",   "SUD",   "SUE",   "SUM",   "SUN",   "SUP",
+"TAB",   "TAD",   "TAG",   "TAN",   "TAP",   "TAR",   "TEA",   "TED",
+"TEE",   "TEN",   "THE",   "THY",   "TIC",   "TIE",   "TIM",   "TIN",
+"TIP",   "TO",    "TOE",   "TOG",   "TOM",   "TON",   "TOO",   "TOP",
+"TOW",   "TOY",   "TRY",   "TUB",   "TUG",   "TUM",   "TUN",   "TWO",
+"UN",    "UP",    "US",   "USE",   "VAN",   "VAT",   "VET",   "VIE",
+"WAD",   "WAG",   "WAR",   "WAS",   "WAY",   "WE",    "WEB",   "WED",
+"WEE",   "WET",   "WHO",   "WHY",   "WIN",   "WIT",   "WOK",   "WON",
+"WOO",   "WOW",   "WRY",   "WU",    "YAM",   "YAP",   "YAW",   "YE",
+"YEA",   "YES",   "YET",   "YOU",   "ABED",  "ABEL",  "ABET",  "ABLE",
+"ABUT",  "ACHE",  "ACID",  "ACME",  "ACRE",  "ACTA",  "ACTS",  "ADAM",
+"ADDS",  "ADEN",  "AFAR",  "AFRO",  "AGEE",  "AHEM",  "AHOY",  "AIDA",
+"AIDE",  "AIDS",  "AIRY",  "AJAR",  "AKIN",  "ALAN",  "ALEC",  "ALGA",
+"ALIA",  "ALLY",  "ALMA",  "ALOE",  "ALSO",  "ALTO",  "ALUM",  "ALVA",
+"AMEN",  "AMES",  "AMID",  "AMMO",  "AMOK",  "AMOS",  "AMRA",  "ANDY",
+"ANEW",  "ANNA",  "ANNE",  "ANTE",  "ANTI",  "AQUA",  "ARAB",  "ARCH",
+"AREA",  "ARGO",  "ARID",  "ARMY",  "ARTS",  "ARTY",  "ASIA",  "ASKS",
+"ATOM",  "AUNT",  "AURA",  "AUTO",  "AVER",  "AVID",  "AVIS",  "AVON",
+"AVOW",  "AWAY",  "AWRY",  "BABE",  "BABY",  "BACH",  "BACK",  "BADE",
+"BAIL",  "BAIT",  "BAKE",  "BALD",  "BALE",  "BALI",  "BALK",  "BALL",
+"BALM",  "BAND",  "BANE",  "BANG",  "BANK",  "BARB",  "BARD",  "BARE",
+"BARK",  "BARN",  "BARR",  "BASE",  "BASH",  "BASK",  "BASS",  "BATE",
+"BATH",  "BAWD",  "BAWL",  "BEAD",  "BEAK",  "BEAM",  "BEAN",  "BEAR",
+"BEAT",  "BEAU",  "BECK",  "BEEF",  "BEEN",  "BEER",  "BEET",  "BELA",
+"BELL",  "BELT",  "BEND",  "BENT",  "BERG",  "BERN",  "BERT",  "BESS",
+"BEST",  "BETA",  "BETH",  "BHOY",  "BIAS",  "BIDE",  "BIEN",  "BILE",
+"BILK",  "BILL",  "BIND",  "BING",  "BIRD",  "BITE",  "BITS",  "BLAB",
+"BLAT",  "BLED",  "BLEW",  "BLOB",  "BLOC",  "BLOT",  "BLOW",  "BLUE",
+"BLUM",  "BLUR",  "BOAR",  "BOAT",  "BOCA",  "BOCK",  "BODE",  "BODY",
+
+
+
+Haller                      Standards Track                    [Page 20]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+"BOGY",  "BOHR",  "BOIL",  "BOLD",  "BOLO",  "BOLT",  "BOMB",  "BONA",
+"BOND",  "BONE",  "BONG",  "BONN",  "BONY",  "BOOK",  "BOOM",  "BOON",
+"BOOT",  "BORE",  "BORG",  "BORN",  "BOSE",  "BOSS",  "BOTH",  "BOUT",
+"BOWL",  "BOYD",  "BRAD",  "BRAE",  "BRAG",  "BRAN",  "BRAY",  "BRED",
+"BREW",  "BRIG",  "BRIM",  "BROW",  "BUCK",  "BUDD",  "BUFF",  "BULB",
+"BULK",  "BULL",  "BUNK",  "BUNT",  "BUOY",  "BURG",  "BURL",  "BURN",
+"BURR",  "BURT",  "BURY",  "BUSH",  "BUSS",  "BUST",  "BUSY",  "BYTE",
+"CADY",  "CAFE",  "CAGE",  "CAIN",  "CAKE",  "CALF",  "CALL",  "CALM",
+"CAME",  "CANE",  "CANT",  "CARD",  "CARE",  "CARL",  "CARR",  "CART",
+"CASE",  "CASH",  "CASK",  "CAST",  "CAVE",  "CEIL",  "CELL",  "CENT",
+"CERN",  "CHAD",  "CHAR",  "CHAT",  "CHAW",  "CHEF",  "CHEN",  "CHEW",
+"CHIC",  "CHIN",  "CHOU",  "CHOW",  "CHUB",  "CHUG",  "CHUM",  "CITE",
+"CITY",  "CLAD",  "CLAM",  "CLAN",  "CLAW",  "CLAY",  "CLOD",  "CLOG",
+"CLOT",  "CLUB",  "CLUE",  "COAL",  "COAT",  "COCA",  "COCK",  "COCO",
+"CODA",  "CODE",  "CODY",  "COED",  "COIL",  "COIN",  "COKE",  "COLA",
+"COLD",  "COLT",  "COMA",  "COMB",  "COME",  "COOK",  "COOL",  "COON",
+"COOT",  "CORD",  "CORE",  "CORK",  "CORN",  "COST",  "COVE",  "COWL",
+"CRAB",  "CRAG",  "CRAM",  "CRAY",  "CREW",  "CRIB",  "CROW",  "CRUD",
+"CUBA",  "CUBE",  "CUFF",  "CULL",  "CULT",  "CUNY",  "CURB",  "CURD",
+"CURE",  "CURL",  "CURT",  "CUTS",  "DADE",  "DALE",  "DAME",  "DANA",
+"DANE",  "DANG",  "DANK",  "DARE",  "DARK",  "DARN",  "DART",  "DASH",
+"DATA",  "DATE",  "DAVE",  "DAVY",  "DAWN",  "DAYS",  "DEAD",  "DEAF",
+"DEAL",  "DEAN",  "DEAR",  "DEBT",  "DECK",  "DEED",  "DEEM",  "DEER",
+"DEFT",  "DEFY",  "DELL",  "DENT",  "DENY",  "DESK",  "DIAL",  "DICE",
+"DIED",  "DIET",  "DIME",  "DINE",  "DING",  "DINT",  "DIRE",  "DIRT",
+"DISC",  "DISH",  "DISK",  "DIVE",  "DOCK",  "DOES",  "DOLE",  "DOLL",
+"DOLT",  "DOME",  "DONE",  "DOOM",  "DOOR",  "DORA",  "DOSE",  "DOTE",
+"DOUG",  "DOUR",  "DOVE",  "DOWN",  "DRAB",  "DRAG",  "DRAM",  "DRAW",
+"DREW",  "DRUB",  "DRUG",  "DRUM",  "DUAL",  "DUCK",  "DUCT",  "DUEL",
+"DUET",  "DUKE",  "DULL",  "DUMB",  "DUNE",  "DUNK",  "DUSK",  "DUST",
+"DUTY",  "EACH",  "EARL",  "EARN",  "EASE",  "EAST",  "EASY",  "EBEN",
+"ECHO",  "EDDY",  "EDEN",  "EDGE",  "EDGY",  "EDIT",  "EDNA",  "EGAN",
+"ELAN",  "ELBA",  "ELLA",  "ELSE",  "EMIL",  "EMIT",  "EMMA",  "ENDS",
+"ERIC",  "EROS",  "EVEN",  "EVER",  "EVIL",  "EYED",  "FACE",  "FACT",
+"FADE",  "FAIL",  "FAIN",  "FAIR",  "FAKE",  "FALL",  "FAME",  "FANG",
+"FARM",  "FAST",  "FATE",  "FAWN",  "FEAR",  "FEAT",  "FEED",  "FEEL",
+"FEET",  "FELL",  "FELT",  "FEND",  "FERN",  "FEST",  "FEUD",  "FIEF",
+"FIGS",  "FILE",  "FILL",  "FILM",  "FIND",  "FINE",  "FINK",  "FIRE",
+"FIRM",  "FISH",  "FISK",  "FIST",  "FITS",  "FIVE",  "FLAG",  "FLAK",
+"FLAM",  "FLAT",  "FLAW",  "FLEA",  "FLED",  "FLEW",  "FLIT",  "FLOC",
+"FLOG",  "FLOW",  "FLUB",  "FLUE",  "FOAL",  "FOAM",  "FOGY",  "FOIL",
+"FOLD",  "FOLK",  "FOND",  "FONT",  "FOOD",  "FOOL",  "FOOT",  "FORD",
+"FORE",  "FORK",  "FORM",  "FORT",  "FOSS",  "FOUL",  "FOUR",  "FOWL",
+"FRAU",  "FRAY",  "FRED",  "FREE",  "FRET",  "FREY",  "FROG",  "FROM",
+"FUEL",  "FULL",  "FUME",  "FUND",  "FUNK",  "FURY",  "FUSE",  "FUSS",
+"GAFF",  "GAGE",  "GAIL",  "GAIN",  "GAIT",  "GALA",  "GALE",  "GALL",
+"GALT",  "GAME",  "GANG",  "GARB",  "GARY",  "GASH",  "GATE",  "GAUL",
+"GAUR",  "GAVE",  "GAWK",  "GEAR",  "GELD",  "GENE",  "GENT",  "GERM",
+
+
+
+Haller                      Standards Track                    [Page 21]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+"GETS",  "GIBE",  "GIFT",  "GILD",  "GILL",  "GILT",  "GINA",  "GIRD",
+"GIRL",  "GIST",  "GIVE",  "GLAD",  "GLEE",  "GLEN",  "GLIB",  "GLOB",
+"GLOM",  "GLOW",  "GLUE",  "GLUM",  "GLUT",  "GOAD",  "GOAL",  "GOAT",
+"GOER",  "GOES",  "GOLD",  "GOLF",  "GONE",  "GONG",  "GOOD",  "GOOF",
+"GORE",  "GORY",  "GOSH",  "GOUT",  "GOWN",  "GRAB",  "GRAD",  "GRAY",
+"GREG",  "GREW",  "GREY",  "GRID",  "GRIM",  "GRIN",  "GRIT",  "GROW",
+"GRUB",  "GULF",  "GULL",  "GUNK",  "GURU",  "GUSH",  "GUST",  "GWEN",
+"GWYN",  "HAAG",  "HAAS",  "HACK",  "HAIL",  "HAIR",  "HALE",  "HALF",
+"HALL",  "HALO",  "HALT",  "HAND",  "HANG",  "HANK",  "HANS",  "HARD",
+"HARK",  "HARM",  "HART",  "HASH",  "HAST",  "HATE",  "HATH",  "HAUL",
+"HAVE",  "HAWK",  "HAYS",  "HEAD",  "HEAL",  "HEAR",  "HEAT",  "HEBE",
+"HECK",  "HEED",  "HEEL",  "HEFT",  "HELD",  "HELL",  "HELM",  "HERB",
+"HERD",  "HERE",  "HERO",  "HERS",  "HESS",  "HEWN",  "HICK",  "HIDE",
+"HIGH",  "HIKE",  "HILL",  "HILT",  "HIND",  "HINT",  "HIRE",  "HISS",
+"HIVE",  "HOBO",  "HOCK",  "HOFF",  "HOLD",  "HOLE",  "HOLM",  "HOLT",
+"HOME",  "HONE",  "HONK",  "HOOD",  "HOOF",  "HOOK",  "HOOT",  "HORN",
+"HOSE",  "HOST",  "HOUR",  "HOVE",  "HOWE",  "HOWL",  "HOYT",  "HUCK",
+"HUED",  "HUFF",  "HUGE",  "HUGH",  "HUGO",  "HULK",  "HULL",  "HUNK",
+"HUNT",  "HURD",  "HURL",  "HURT",  "HUSH",  "HYDE",  "HYMN",  "IBIS",
+"ICON",  "IDEA",  "IDLE",  "IFFY",  "INCA",  "INCH",  "INTO",  "IONS",
+"IOTA",  "IOWA",  "IRIS",  "IRMA",  "IRON",  "ISLE",  "ITCH",  "ITEM",
+"IVAN",  "JACK",  "JADE",  "JAIL",  "JAKE",  "JANE",  "JAVA",  "JEAN",
+"JEFF",  "JERK",  "JESS",  "JEST",  "JIBE",  "JILL",  "JILT",  "JIVE",
+"JOAN",  "JOBS",  "JOCK",  "JOEL",  "JOEY",  "JOHN",  "JOIN",  "JOKE",
+"JOLT",  "JOVE",  "JUDD",  "JUDE",  "JUDO",  "JUDY",  "JUJU",  "JUKE",
+"JULY",  "JUNE",  "JUNK",  "JUNO",  "JURY",  "JUST",  "JUTE",  "KAHN",
+"KALE",  "KANE",  "KANT",  "KARL",  "KATE",  "KEEL",  "KEEN",  "KENO",
+"KENT",  "KERN",  "KERR",  "KEYS",  "KICK",  "KILL",  "KIND",  "KING",
+"KIRK",  "KISS",  "KITE",  "KLAN",  "KNEE",  "KNEW",  "KNIT",  "KNOB",
+"KNOT",  "KNOW",  "KOCH",  "KONG",  "KUDO",  "KURD",  "KURT",  "KYLE",
+"LACE",  "LACK",  "LACY",  "LADY",  "LAID",  "LAIN",  "LAIR",  "LAKE",
+"LAMB",  "LAME",  "LAND",  "LANE",  "LANG",  "LARD",  "LARK",  "LASS",
+"LAST",  "LATE",  "LAUD",  "LAVA",  "LAWN",  "LAWS",  "LAYS",  "LEAD",
+"LEAF",  "LEAK",  "LEAN",  "LEAR",  "LEEK",  "LEER",  "LEFT",  "LEND",
+"LENS",  "LENT",  "LEON",  "LESK",  "LESS",  "LEST",  "LETS",  "LIAR",
+"LICE",  "LICK",  "LIED",  "LIEN",  "LIES",  "LIEU",  "LIFE",  "LIFT",
+"LIKE",  "LILA",  "LILT",  "LILY",  "LIMA",  "LIMB",  "LIME",  "LIND",
+"LINE",  "LINK",  "LINT",  "LION",  "LISA",  "LIST",  "LIVE",  "LOAD",
+"LOAF",  "LOAM",  "LOAN",  "LOCK",  "LOFT",  "LOGE",  "LOIS",  "LOLA",
+"LONE",  "LONG",  "LOOK",  "LOON",  "LOOT",  "LORD",  "LORE",  "LOSE",
+"LOSS",  "LOST",  "LOUD",  "LOVE",  "LOWE",  "LUCK",  "LUCY",  "LUGE",
+"LUKE",  "LULU",  "LUND",  "LUNG",  "LURA",  "LURE",  "LURK",  "LUSH",
+"LUST",  "LYLE",  "LYNN",  "LYON",  "LYRA",  "MACE",  "MADE",  "MAGI",
+"MAID",  "MAIL",  "MAIN",  "MAKE",  "MALE",  "MALI",  "MALL",  "MALT",
+"MANA",  "MANN",  "MANY",  "MARC",  "MARE",  "MARK",  "MARS",  "MART",
+"MARY",  "MASH",  "MASK",  "MASS",  "MAST",  "MATE",  "MATH",  "MAUL",
+"MAYO",  "MEAD",  "MEAL",  "MEAN",  "MEAT",  "MEEK",  "MEET",  "MELD",
+"MELT",  "MEMO",  "MEND",  "MENU",  "MERT",  "MESH",  "MESS",  "MICE",
+
+
+
+Haller                      Standards Track                    [Page 22]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+"MIKE",  "MILD",  "MILE",  "MILK",  "MILL",  "MILT",  "MIMI",  "MIND",
+"MINE",  "MINI",  "MINK",  "MINT",  "MIRE",  "MISS",  "MIST",  "MITE",
+"MITT",  "MOAN",  "MOAT",  "MOCK",  "MODE",  "MOLD",  "MOLE",  "MOLL",
+"MOLT",  "MONA",  "MONK",  "MONT",  "MOOD",  "MOON",  "MOOR",  "MOOT",
+"MORE",  "MORN",  "MORT",  "MOSS",  "MOST",  "MOTH",  "MOVE",  "MUCH",
+"MUCK",  "MUDD",  "MUFF",  "MULE",  "MULL",  "MURK",  "MUSH",  "MUST",
+"MUTE",  "MUTT",  "MYRA",  "MYTH",  "NAGY",  "NAIL",  "NAIR",  "NAME",
+"NARY",  "NASH",  "NAVE",  "NAVY",  "NEAL",  "NEAR",  "NEAT",  "NECK",
+"NEED",  "NEIL",  "NELL",  "NEON",  "NERO",  "NESS",  "NEST",  "NEWS",
+"NEWT",  "NIBS",  "NICE",  "NICK",  "NILE",  "NINA",  "NINE",  "NOAH",
+"NODE",  "NOEL",  "NOLL",  "NONE",  "NOOK",  "NOON",  "NORM",  "NOSE",
+"NOTE",  "NOUN",  "NOVA",  "NUDE",  "NULL",  "NUMB",  "OATH",  "OBEY",
+"OBOE",  "ODIN",  "OHIO",  "OILY",  "OINT",  "OKAY",  "OLAF",  "OLDY",
+"OLGA",  "OLIN",  "OMAN",  "OMEN",  "OMIT",  "ONCE",  "ONES",  "ONLY",
+"ONTO",  "ONUS",  "ORAL",  "ORGY",  "OSLO",  "OTIS",  "OTTO",  "OUCH",
+"OUST",  "OUTS",  "OVAL",  "OVEN",  "OVER",  "OWLY",  "OWNS",  "QUAD",
+"QUIT",  "QUOD",  "RACE",  "RACK",  "RACY",  "RAFT",  "RAGE",  "RAID",
+"RAIL",  "RAIN",  "RAKE",  "RANK",  "RANT",  "RARE",  "RASH",  "RATE",
+"RAVE",  "RAYS",  "READ",  "REAL",  "REAM",  "REAR",  "RECK",  "REED",
+"REEF",  "REEK",  "REEL",  "REID",  "REIN",  "RENA",  "REND",  "RENT",
+"REST",  "RICE",  "RICH",  "RICK",  "RIDE",  "RIFT",  "RILL",  "RIME",
+"RING",  "RINK",  "RISE",  "RISK",  "RITE",  "ROAD",  "ROAM",  "ROAR",
+"ROBE",  "ROCK",  "RODE",  "ROIL",  "ROLL",  "ROME",  "ROOD",  "ROOF",
+"ROOK",  "ROOM",  "ROOT",  "ROSA",  "ROSE",  "ROSS",  "ROSY",  "ROTH",
+"ROUT",  "ROVE",  "ROWE",  "ROWS",  "RUBE",  "RUBY",  "RUDE",  "RUDY",
+"RUIN",  "RULE",  "RUNG",  "RUNS",  "RUNT",  "RUSE",  "RUSH",  "RUSK",
+"RUSS",  "RUST",  "RUTH",  "SACK",  "SAFE",  "SAGE",  "SAID",  "SAIL",
+"SALE",  "SALK",  "SALT",  "SAME",  "SAND",  "SANE",  "SANG",  "SANK",
+"SARA",  "SAUL",  "SAVE",  "SAYS",  "SCAN",  "SCAR",  "SCAT",  "SCOT",
+"SEAL",  "SEAM",  "SEAR",  "SEAT",  "SEED",  "SEEK",  "SEEM",  "SEEN",
+"SEES",  "SELF",  "SELL",  "SEND",  "SENT",  "SETS",  "SEWN",  "SHAG",
+"SHAM",  "SHAW",  "SHAY",  "SHED",  "SHIM",  "SHIN",  "SHOD",  "SHOE",
+"SHOT",  "SHOW",  "SHUN",  "SHUT",  "SICK",  "SIDE",  "SIFT",  "SIGH",
+"SIGN",  "SILK",  "SILL",  "SILO",  "SILT",  "SINE",  "SING",  "SINK",
+"SIRE",  "SITE",  "SITS",  "SITU",  "SKAT",  "SKEW",  "SKID",  "SKIM",
+"SKIN",  "SKIT",  "SLAB",  "SLAM",  "SLAT",  "SLAY",  "SLED",  "SLEW",
+"SLID",  "SLIM",  "SLIT",  "SLOB",  "SLOG",  "SLOT",  "SLOW",  "SLUG",
+"SLUM",  "SLUR",  "SMOG",  "SMUG",  "SNAG",  "SNOB",  "SNOW",  "SNUB",
+"SNUG",  "SOAK",  "SOAR",  "SOCK",  "SODA",  "SOFA",  "SOFT",  "SOIL",
+"SOLD",  "SOME",  "SONG",  "SOON",  "SOOT",  "SORE",  "SORT",  "SOUL",
+"SOUR",  "SOWN",  "STAB",  "STAG",  "STAN",  "STAR",  "STAY",  "STEM",
+"STEW",  "STIR",  "STOW",  "STUB",  "STUN",  "SUCH",  "SUDS",  "SUIT",
+"SULK",  "SUMS",  "SUNG",  "SUNK",  "SURE",  "SURF",  "SWAB",  "SWAG",
+"SWAM",  "SWAN",  "SWAT",  "SWAY",  "SWIM",  "SWUM",  "TACK",  "TACT",
+"TAIL",  "TAKE",  "TALE",  "TALK",  "TALL",  "TANK",  "TASK",  "TATE",
+"TAUT",  "TEAL",  "TEAM",  "TEAR",  "TECH",  "TEEM",  "TEEN",  "TEET",
+"TELL",  "TEND",  "TENT",  "TERM",  "TERN",  "TESS",  "TEST",  "THAN",
+"THAT",  "THEE",  "THEM",  "THEN",  "THEY",  "THIN",  "THIS",  "THUD",
+
+
+
+Haller                      Standards Track                    [Page 23]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+"THUG",  "TICK",  "TIDE",  "TIDY",  "TIED",  "TIER",  "TILE",  "TILL",
+"TILT",  "TIME",  "TINA",  "TINE",  "TINT",  "TINY",  "TIRE",  "TOAD",
+"TOGO",  "TOIL",  "TOLD",  "TOLL",  "TONE",  "TONG",  "TONY",  "TOOK",
+"TOOL",  "TOOT",  "TORE",  "TORN",  "TOTE",  "TOUR",  "TOUT",  "TOWN",
+"TRAG",  "TRAM",  "TRAY",  "TREE",  "TREK",  "TRIG",  "TRIM",  "TRIO",
+"TROD",  "TROT",  "TROY",  "TRUE",  "TUBA",  "TUBE",  "TUCK",  "TUFT",
+"TUNA",  "TUNE",  "TUNG",  "TURF",  "TURN",  "TUSK",  "TWIG",  "TWIN",
+"TWIT",  "ULAN",  "UNIT",  "URGE",  "USED",  "USER",  "USES",  "UTAH",
+"VAIL",  "VAIN",  "VALE",  "VARY",  "VASE",  "VAST",  "VEAL",  "VEDA",
+"VEIL",  "VEIN",  "VEND",  "VENT",  "VERB",  "VERY",  "VETO",  "VICE",
+"VIEW",  "VINE",  "VISE",  "VOID",  "VOLT",  "VOTE",  "WACK",  "WADE",
+"WAGE",  "WAIL",  "WAIT",  "WAKE",  "WALE",  "WALK",  "WALL",  "WALT",
+"WAND",  "WANE",  "WANG",  "WANT",  "WARD",  "WARM",  "WARN",  "WART",
+"WASH",  "WAST",  "WATS",  "WATT",  "WAVE",  "WAVY",  "WAYS",  "WEAK",
+"WEAL",  "WEAN",  "WEAR",  "WEED",  "WEEK",  "WEIR",  "WELD",  "WELL",
+"WELT",  "WENT",  "WERE",  "WERT",  "WEST",  "WHAM",  "WHAT",  "WHEE",
+"WHEN",  "WHET",  "WHOA",  "WHOM",  "WICK",  "WIFE",  "WILD",  "WILL",
+"WIND",  "WINE",  "WING",  "WINK",  "WINO",  "WIRE",  "WISE",  "WISH",
+"WITH",  "WOLF",  "WONT",  "WOOD",  "WOOL",  "WORD",  "WORE",  "WORK",
+"WORM",  "WORN",  "WOVE",  "WRIT",  "WYNN",  "YALE",  "YANG",  "YANK",
+"YARD",  "YARN",  "YAWL",  "YAWN",  "YEAH",  "YEAR",  "YELL",  "YOGA",
+"YOKE"   };
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 24]
+

+RFC 2289               A One-Time Password System          February 1998
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (1998).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Haller                      Standards Track                    [Page 25]
+

diff --git a/doc/rfc2444.txt b/doc/rfc2444.txt
new file mode 100644
index 0000000..80a65a2
--- /dev/null
+++ b/doc/rfc2444.txt
@@ -0,0 +1,395 @@
+
+
+
+
+
+
+Network Working Group                                          C. Newman
+Request for Comments: 2444                                      Innosoft
+Updates: 2222                                               October 1998
+Category: Standards Track
+
+
+                  The One-Time-Password SASL Mechanism
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (1998).  All Rights Reserved.
+
+Abstract
+
+   OTP [OTP] provides a useful authentication mechanism for situations
+   where there is limited client or server trust.  Currently, OTP is
+   added to protocols in an ad-hoc fashion with heuristic parsing.  This
+   specification defines an OTP SASL [SASL] mechanism so it can be
+   easily and formally integrated into many application protocols.
+
+1. How to Read This Document
+
+   The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
+   "RECOMMENDED" and "MAY" in this document are to be interpreted as
+   defined in "Key words for use in RFCs to Indicate Requirement Levels"
+   [KEYWORDS].
+
+   This memo assumes the reader is familiar with OTP [OTP], OTP extended
+   responses [OTP-EXT] and SASL [SASL].
+
+2. Intended Use
+
+   The OTP SASL mechanism replaces the SKEY SASL mechanism [SASL].  OTP
+   is a good choice for usage scenarios where the client is untrusted
+   (e.g., a kiosk client), as a one-time password will only give the
+   client a single opportunity to act on behalf of the user.  OTP is
+   also a good choice for situations where interactive logins are
+   permitted to the server, as a compromised OTP authentication database
+   is only subject to dictionary attacks, unlike authentication
+   databases for other simple mechanisms such as CRAM-MD5 [CRAM-MD5].
+
+
+
+Newman                      Standards Track                     [Page 1]
+

+RFC 2444                   OTP SASL Mechanism               October 1998
+
+
+   It is important to note that each use of the OTP mechanism causes the
+   authentication database entry for a user to be updated.
+
+   This SASL mechanism provides a formal way to integrate OTP into
+   SASL-enabled protocols including IMAP [IMAP4], ACAP [ACAP], POP3
+   [POP-AUTH] and LDAPv3 [LDAPv3].
+
+3. Profiling OTP for SASL
+
+   OTP [OTP] and OTP extended responses [OTP-EXT] offer a number of
+   options.  However, for authentication to succeed, the client and
+   server need compatible option sets.  This specification defines a
+   single SASL mechanism: OTP.  The following rules apply to this
+   mechanism:
+
+   o   The extended response syntax MUST be used.
+
+   o   Servers MUST support the following four OTP extended responses:
+       "hex", "word", "init-hex" and "init-word".  Servers MUST support
+       the "word" and "init-word" responses for the standard dictionary
+       and SHOULD support alternate dictionaries.  Servers MUST NOT
+       require use of any additional OTP extensions or options.
+
+   o   Clients SHOULD support display of the OTP challenge to the user
+       and entry of an OTP in multi-word format.  Clients MAY also
+       support direct entry of the pass phrase and compute the "hex" or
+       "word" response.
+
+   o   Clients MUST indicate when authentication fails due to the
+       sequence number getting too low and SHOULD offer the user the
+       option to reset the sequence using the "init-hex" or "init-word"
+       response.
+
+   Support for the MD5 algorithm is REQUIRED, and support for the SHA1
+   algorithm is RECOMMENDED.
+
+4. OTP Authentication Mechanism
+
+   The mechanism does not provide any security layer.
+
+   The client begins by sending a message to the server containing the
+   following two pieces of information.
+
+   (1) An authorization identity.  When the empty string is used, this
+   defaults to the authentication identity.  This is used by system
+   administrators or proxy servers to login with a different user
+   identity.  This field may be up to 255 octets and is terminated by a
+   NUL (0) octet.  US-ASCII printable characters are preferred, although
+
+
+
+Newman                      Standards Track                     [Page 2]
+

+RFC 2444                   OTP SASL Mechanism               October 1998
+
+
+   UTF-8 [UTF-8] printable characters are permitted to support
+   international names.  Use of character sets other than US-ASCII and
+   UTF-8 is forbidden.
+
+   (2) An authentication identity.  The identity whose pass phrase will
+   be used.  This field may be up to 255 octets.  US-ASCII printable
+   characters are preferred, although UTF-8 [UTF-8] printable characters
+   are permitted to support international names.  Use of character sets
+   other than US-ASCII and UTF-8 is forbidden.
+
+   The server responds by sending a message containing the OTP challenge
+   as described in OTP [OTP] and OTP extended responses [OTP-EXT].
+
+   If a client sees an unknown hash algorithm name it will not be able
+   to process a pass phrase input by the user.  In this situation the
+   client MAY prompt for the six-word format, issue the cancel sequence
+   as specified by the SASL profile for the protocol in use and try a
+   different SASL mechanism, or close the connection and refuse to
+   authenticate.  As a result of this behavior, a server is restricted
+   to one OTP hash algorithm per user.
+
+   On success, the client generates an extended response in the "hex",
+   "word", "init-hex" or "init-word" format.  The client is not required
+   to terminate the response with a space or a newline and SHOULD NOT
+   include unnecessary whitespace.
+
+   Servers MUST tolerate input of arbitrary length, but MAY fail the
+   authentication if the length of client input exceeds reasonable size.
+
+5. Examples
+
+   In these example, "C:" represents lines sent from the client to the
+   server and "S:" represents lines sent from the server to the client.
+   The user name is "tim" and no authorization identity is provided.
+   The "<NUL>" below represents an ASCII NUL octet.
+
+   The following is an example of the OTP mechanism using the ACAP
+   [ACAP] profile of SASL.  The pass phrase used in this example is:
+             This is a test.
+
+          C: a001 AUTHENTICATE "OTP" {4}
+          C: <NUL>tim
+          S: + "otp-md5 499 ke1234 ext"
+          C: "hex:5bf075d9959d036f"
+          S: a001 OK "AUTHENTICATE completed"
+
+
+
+
+
+
+Newman                      Standards Track                     [Page 3]
+

+RFC 2444                   OTP SASL Mechanism               October 1998
+
+
+        Here is the same example using the six-words response:
+
+          C: a001 AUTHENTICATE "OTP" {4}
+          C: <NUL>tim
+          S: + "otp-md5 499 ke1234 ext"
+          C: "word:BOND FOGY DRAB NE RISE MART"
+          S: a001 OK "AUTHENTICATE completed"
+
+        Here is the same example using the OTP-SHA1 mechanism:
+
+          C: a001 AUTHENTICATE "OTP" {4}
+          C: <NUL>tim
+          S: + "otp-sha1 499 ke1234 ext"
+          C: "hex:c90fc02cc488df5e"
+          S: a001 OK "AUTHENTICATE completed"
+
+        Here is the same example with the init-hex extended response
+
+          C: a001 AUTHENTICATE "OTP" {4}
+          C: <NUL>tim
+          S: + "otp-md5 499 ke1234 ext"
+          C: "init-hex:5bf075d9959d036f:md5 499 ke1235:3712dcb4aa5316c1"
+          S: a001 OK "OTP sequence reset, authentication complete"
+
+     The following is an example of the OTP mechanism using the IMAP
+     [IMAP4] profile of SASL.  The pass phrase used in this example is:
+          this is a test
+
+       C: a001 AUTHENTICATE OTP
+       S: +
+       C: AHRpbQ==
+       S: + b3RwLW1kNSAxMjMga2UxMjM0IGV4dA==
+       C: aGV4OjExZDRjMTQ3ZTIyN2MxZjE=
+       S: a001 OK AUTHENTICATE completed
+
+   Note that the lack of an initial client response and the base64
+   encoding are characteristics of the IMAP profile of SASL.  The server
+   challenge is "otp-md5 123 ke1234 ext" and the client response is
+   "hex:11d4c147e227c1f1".
+
+6. Security Considerations
+
+   This specification introduces no security considerations beyond those
+   those described in SASL [SASL], OTP [OTP] and OTP extended responses
+   [OTP-EXT].  A brief summary of these considerations follows:
+
+   This mechanism does not provide session privacy, server
+   authentication or protection from active attacks.
+
+
+
+Newman                      Standards Track                     [Page 4]
+

+RFC 2444                   OTP SASL Mechanism               October 1998
+
+
+   This mechanism is subject to passive dictionary attacks.  The
+   severity of this attack can be reduced by choosing pass phrases well.
+
+   The server authentication database necessary for use with OTP need
+   not be plaintext-equivalent.
+
+   Server implementations MUST protect against the race attack [OTP].
+
+7. Multinational Considerations
+
+   As remote access is a crucial service, users are encouraged to
+   restrict user names and pass phrases to the US-ASCII character set.
+   However, if characters outside the US-ASCII chracter set are used in
+   user names and pass phrases, then they are interpreted according to
+   UTF-8 [UTF-8].
+
+   Server support for alternate dictionaries is strongly RECOMMENDED to
+   permit use of the six-word format with non-English words.
+
+8. IANA Considerations
+
+   Here is the registration template for the OTP SASL mechanism:
+
+   SASL mechanism name: OTP
+   Security Considerations: See section 6 of this memo
+   Published specification: this memo
+   Person & email address to contact for futher information:
+     see author's address section below
+   Intended usage: COMMON
+   Author/Change controller: see author's address section below
+
+   This memo also amends the SKEY SASL mechanism registration [SASL] by
+   changing its intended usage to OBSOLETE.
+
+9. References
+
+   [ACAP]     Newman, C. and J. Myers, "ACAP -- Application
+              Configuration Access Protocol", RFC 2244, November 1997.
+
+   [CRAM-MD5] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
+              AUTHorize Extension for Simple Challenge/Response", RFC
+              2195, September 1997.
+
+   [IMAP4]    Crispin, M., "Internet Message Access Protocol - Version
+              4rev1", RFC 2060, December 1996.
+
+   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+
+
+Newman                      Standards Track                     [Page 5]
+

+RFC 2444                   OTP SASL Mechanism               October 1998
+
+
+   [LDAPv3]   Wahl, M., Howes, T. and S. Kille, "Lightweight Directory
+              Access Protocol (v3)", RFC 2251, December 1997.
+
+   [MD5]      Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321,
+              April 1992.
+
+   [OTP]      Haller, N., Metz, C., Nesser, P. and M. Straw, "A One-Time
+              Password System", RFC 2289, February 1998.
+
+   [OTP-EXT]  Metz, C., "OTP Extended Responses", RFC 2243, November
+              1997.
+
+   [POP-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
+              December 1994.
+
+   [SASL]     Myers, J., "Simple Authentication and Security Layer
+              (SASL)", RFC 2222, October 1997.
+
+   [UTF-8]    Yergeau, F., "UTF-8, a transformation format of ISO
+              10646", RFC 2279, January 1998.
+
+10. Author's Address
+
+   Chris Newman
+   Innosoft International, Inc.
+   1050 Lakes Drive
+   West Covina, CA 91790 USA
+
+   EMail: chris.newman at innosoft.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                     [Page 6]
+

+RFC 2444                   OTP SASL Mechanism               October 1998
+
+
+11.  Full Copyright Statement
+
+   Copyright (C) The Internet Society (1998).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                     [Page 7]
+

diff --git a/doc/rfc2595.txt b/doc/rfc2595.txt
new file mode 100644
index 0000000..3b2b4c5
--- /dev/null
+++ b/doc/rfc2595.txt
@@ -0,0 +1,843 @@
+
+
+
+
+
+
+Network Working Group                                          C. Newman
+Request for Comments: 2595                                      Innosoft
+Category: Standards Track                                      June 1999
+
+
+                   Using TLS with IMAP, POP3 and ACAP
+
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (1999).  All Rights Reserved.
+
+1. Motivation
+
+   The TLS protocol (formerly known as SSL) provides a way to secure an
+   application protocol from tampering and eavesdropping.  The option of
+   using such security is desirable for IMAP, POP and ACAP due to common
+   connection eavesdropping and hijacking attacks [AUTH].  Although
+   advanced SASL authentication mechanisms can provide a lightweight
+   version of this service, TLS is complimentary to simple
+   authentication-only SASL mechanisms or deployed clear-text password
+   login commands.
+
+   Many sites have a high investment in authentication infrastructure
+   (e.g., a large database of a one-way-function applied to user
+   passwords), so a privacy layer which is not tightly bound to user
+   authentication can protect against network eavesdropping attacks
+   without requiring a new authentication infrastructure and/or forcing
+   all users to change their password.  Recognizing that such sites will
+   desire simple password authentication in combination with TLS
+   encryption, this specification defines the PLAIN SASL mechanism for
+   use with protocols which lack a simple password authentication
+   command such as ACAP and SMTP.  (Note there is a separate RFC for the
+   STARTTLS command in SMTP [SMTPTLS].)
+
+   There is a strong desire in the IETF to eliminate the transmission of
+   clear-text passwords over unencrypted channels.  While SASL can be
+   used for this purpose, TLS provides an additional tool with different
+   deployability characteristics.  A server supporting both TLS with
+
+
+
+
+Newman                      Standards Track                     [Page 1]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+   simple passwords and a challenge/response SASL mechanism is likely to
+   interoperate with a wide variety of clients without resorting to
+   unencrypted clear-text passwords.
+
+   The STARTTLS command rectifies a number of the problems with using a
+   separate port for a "secure" protocol variant.  Some of these are
+   mentioned in section 7.
+
+1.1. Conventions Used in this Document
+
+   The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD NOT",
+   "MAY", and "OPTIONAL" in this document are to be interpreted as
+   described in "Key words for use in RFCs to Indicate Requirement
+   Levels" [KEYWORDS].
+
+   Terms related to authentication are defined in "On Internet
+   Authentication" [AUTH].
+
+   Formal syntax is defined using ABNF [ABNF].
+
+   In examples, "C:" and "S:" indicate lines sent by the client and
+   server respectively.
+
+2. Basic Interoperability and Security Requirements
+
+   The following requirements apply to all implementations of the
+   STARTTLS extension for IMAP, POP3 and ACAP.
+
+2.1. Cipher Suite Requirements
+
+   Implementation of the TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA [TLS] cipher
+   suite is REQUIRED.  This is important as it assures that any two
+   compliant implementations can be configured to interoperate.
+
+   All other cipher suites are OPTIONAL.
+
+2.2. Privacy Operational Mode Security Requirements
+
+   Both clients and servers SHOULD have a privacy operational mode which
+   refuses authentication unless successful activation of an encryption
+   layer (such as that provided by TLS) occurs prior to or at the time
+   of authentication and which will terminate the connection if that
+   encryption layer is deactivated.  Implementations are encouraged to
+   have flexibility with respect to the minimal encryption strength or
+   cipher suites permitted.  A minimalist approach to this
+   recommendation would be an operational mode where the
+   TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA cipher suite is mandatory prior to
+   permitting authentication.
+
+
+
+Newman                      Standards Track                     [Page 2]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+   Clients MAY have an operational mode which uses encryption only when
+   it is advertised by the server, but authentication continues
+   regardless.  For backwards compatibility, servers SHOULD have an
+   operational mode where only the authentication mechanisms required by
+   the relevant base protocol specification are needed to successfully
+   authenticate.
+
+2.3. Clear-Text Password Requirements
+
+   Clients and servers which implement STARTTLS MUST be configurable to
+   refuse all clear-text login commands or mechanisms (including both
+   standards-track and nonstandard mechanisms) unless an encryption
+   layer of adequate strength is active.  Servers which allow
+   unencrypted clear-text logins SHOULD be configurable to refuse
+   clear-text logins both for the entire server, and on a per-user
+   basis.
+
+2.4. Server Identity Check
+
+   During the TLS negotiation, the client MUST check its understanding
+   of the server hostname against the server's identity as presented in
+   the server Certificate message, in order to prevent man-in-the-middle
+   attacks.  Matching is performed according to these rules:
+
+   - The client MUST use the server hostname it used to open the
+     connection as the value to compare against the server name as
+     expressed in the server certificate.  The client MUST NOT use any
+     form of the server hostname derived from an insecure remote source
+     (e.g., insecure DNS lookup).  CNAME canonicalization is not done.
+
+   - If a subjectAltName extension of type dNSName is present in the
+     certificate, it SHOULD be used as the source of the server's
+     identity.
+
+   - Matching is case-insensitive.
+
+   - A "*" wildcard character MAY be used as the left-most name
+     component in the certificate.  For example, *.example.com would
+     match a.example.com, foo.example.com, etc. but would not match
+     example.com.
+
+   - If the certificate contains multiple names (e.g. more than one
+     dNSName field), then a match with any one of the fields is
+     considered acceptable.
+
+   If the match fails, the client SHOULD either ask for explicit user
+   confirmation, or terminate the connection and indicate the server's
+   identity is suspect.
+
+
+
+Newman                      Standards Track                     [Page 3]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+2.5. TLS Security Policy Check
+
+   Both the client and server MUST check the result of the STARTTLS
+   command and subsequent TLS negotiation to see whether acceptable
+   authentication or privacy was achieved.  Ignoring this step
+   completely invalidates using TLS for security.  The decision about
+   whether acceptable authentication or privacy was achieved is made
+   locally, is implementation-dependent, and is beyond the scope of this
+   document.
+
+3. IMAP STARTTLS extension
+
+   When the TLS extension is present in IMAP, "STARTTLS" is listed as a
+   capability in response to the CAPABILITY command.  This extension
+   adds a single command, "STARTTLS" to the IMAP protocol which is used
+   to begin a TLS negotiation.
+
+3.1. STARTTLS Command
+
+   Arguments:  none
+
+   Responses:  no specific responses for this command
+
+   Result:     OK - begin TLS negotiation
+               BAD - command unknown or arguments invalid
+
+      A TLS negotiation begins immediately after the CRLF at the end of
+      the tagged OK response from the server.  Once a client issues a
+      STARTTLS command, it MUST NOT issue further commands until a
+      server response is seen and the TLS negotiation is complete.
+
+      The STARTTLS command is only valid in non-authenticated state.
+      The server remains in non-authenticated state, even if client
+      credentials are supplied during the TLS negotiation.  The SASL
+      [SASL] EXTERNAL mechanism MAY be used to authenticate once TLS
+      client credentials are successfully exchanged, but servers
+      supporting the STARTTLS command are not required to support the
+      EXTERNAL mechanism.
+
+      Once TLS has been started, the client MUST discard cached
+      information about server capabilities and SHOULD re-issue the
+      CAPABILITY command.  This is necessary to protect against
+      man-in-the-middle attacks which alter the capabilities list prior
+      to STARTTLS.  The server MAY advertise different capabilities
+      after STARTTLS.
+
+      The formal syntax for IMAP is amended as follows:
+
+
+
+
+Newman                      Standards Track                     [Page 4]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+        command_any   =/  "STARTTLS"
+
+   Example:    C: a001 CAPABILITY
+               S: * CAPABILITY IMAP4rev1 STARTTLS LOGINDISABLED
+               S: a001 OK CAPABILITY completed
+               C: a002 STARTTLS
+               S: a002 OK Begin TLS negotiation now
+               <TLS negotiation, further commands are under TLS layer>
+               C: a003 CAPABILITY
+               S: * CAPABILITY IMAP4rev1 AUTH=EXTERNAL
+               S: a003 OK CAPABILITY completed
+               C: a004 LOGIN joe password
+               S: a004 OK LOGIN completed
+
+3.2. IMAP LOGINDISABLED capability
+
+   The current IMAP protocol specification (RFC 2060) requires the
+   implementation of the LOGIN command which uses clear-text passwords.
+   Many sites may choose to disable this command unless encryption is
+   active for security reasons.  An IMAP server MAY advertise that the
+   LOGIN command is disabled by including the LOGINDISABLED capability
+   in the capability response.  Such a server will respond with a tagged
+   "NO" response to any attempt to use the LOGIN command.
+
+   An IMAP server which implements STARTTLS MUST implement support for
+   the LOGINDISABLED capability on unencrypted connections.
+
+   An IMAP client which complies with this specification MUST NOT issue
+   the LOGIN command if this capability is present.
+
+   This capability is useful to prevent clients compliant with this
+   specification from sending an unencrypted password in an environment
+   subject to passive attacks.  It has no impact on an environment
+   subject to active attacks as a man-in-the-middle attacker can remove
+   this capability.  Therefore this does not relieve clients of the need
+   to follow the privacy mode recommendation in section 2.2.
+
+   Servers advertising this capability will fail to interoperate with
+   many existing compliant IMAP clients and will be unable to prevent
+   those clients from disclosing the user's password.
+
+4. POP3 STARTTLS extension
+
+   The POP3 STARTTLS extension adds the STLS command to POP3 servers.
+   If this is implemented, the POP3 extension mechanism [POP3EXT] MUST
+   also be implemented to avoid the need for client probing of multiple
+   commands.  The capability name "STLS" indicates this command is
+   present and permitted in the current state.
+
+
+
+Newman                      Standards Track                     [Page 5]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+      STLS
+
+         Arguments: none
+
+         Restrictions:
+             Only permitted in AUTHORIZATION state.
+
+         Discussion:
+             A TLS negotiation begins immediately after the CRLF at the
+             end of the +OK response from the server.  A -ERR response
+             MAY result if a security layer is already active.  Once a
+             client issues a STLS command, it MUST NOT issue further
+             commands until a server response is seen and the TLS
+             negotiation is complete.
+
+             The STLS command is only permitted in AUTHORIZATION state
+             and the server remains in AUTHORIZATION state, even if
+             client credentials are supplied during the TLS negotiation.
+             The AUTH command [POP-AUTH] with the EXTERNAL mechanism
+             [SASL] MAY be used to authenticate once TLS client
+             credentials are successfully exchanged, but servers
+             supporting the STLS command are not required to support the
+             EXTERNAL mechanism.
+
+             Once TLS has been started, the client MUST discard cached
+             information about server capabilities and SHOULD re-issue
+             the CAPA command.  This is necessary to protect against
+             man-in-the-middle attacks which alter the capabilities list
+             prior to STLS.  The server MAY advertise different
+             capabilities after STLS.
+
+         Possible Responses:
+             +OK -ERR
+
+         Examples:
+             C: STLS
+             S: +OK Begin TLS negotiation
+             <TLS negotiation, further commands are under TLS layer>
+               ...
+             C: STLS
+             S: -ERR Command not permitted when TLS active
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                     [Page 6]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+5. ACAP STARTTLS extension
+
+   When the TLS extension is present in ACAP, "STARTTLS" is listed as a
+   capability in the ACAP greeting.  No arguments to this capability are
+   defined at this time.  This extension adds a single command,
+   "STARTTLS" to the ACAP protocol which is used to begin a TLS
+   negotiation.
+
+5.1. STARTTLS Command
+
+   Arguments:  none
+
+   Responses:  no specific responses for this command
+
+   Result:     OK - begin TLS negotiation
+               BAD - command unknown or arguments invalid
+
+      A TLS negotiation begins immediately after the CRLF at the end of
+      the tagged OK response from the server.  Once a client issues a
+      STARTTLS command, it MUST NOT issue further commands until a
+      server response is seen and the TLS negotiation is complete.
+
+      The STARTTLS command is only valid in non-authenticated state.
+      The server remains in non-authenticated state, even if client
+      credentials are supplied during the TLS negotiation.  The SASL
+      [SASL] EXTERNAL mechanism MAY be used to authenticate once TLS
+      client credentials are successfully exchanged, but servers
+      supporting the STARTTLS command are not required to support the
+      EXTERNAL mechanism.
+
+      After the TLS layer is established, the server MUST re-issue an
+      untagged ACAP greeting.  This is necessary to protect against
+      man-in-the-middle attacks which alter the capabilities list prior
+      to STARTTLS.  The client MUST discard cached capability
+      information and replace it with the information from the new ACAP
+      greeting.  The server MAY advertise different capabilities after
+      STARTTLS.
+
+      The formal syntax for ACAP is amended as follows:
+
+        command_any   =/  "STARTTLS"
+
+   Example:    S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
+               C: a002 STARTTLS
+               S: a002 OK "Begin TLS negotiation now"
+               <TLS negotiation, further commands are under TLS layer>
+               S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL")
+
+
+
+
+Newman                      Standards Track                     [Page 7]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+6. PLAIN SASL mechanism
+
+   Clear-text passwords are simple, interoperate with almost all
+   existing operating system authentication databases, and are useful
+   for a smooth transition to a more secure password-based
+   authentication mechanism.  The drawback is that they are unacceptable
+   for use over an unencrypted network connection.
+
+   This defines the "PLAIN" SASL mechanism for use with ACAP and other
+   protocols with no clear-text login command.  The PLAIN SASL mechanism
+   MUST NOT be advertised or used unless a strong encryption layer (such
+   as the provided by TLS) is active or backwards compatibility dictates
+   otherwise.
+
+   The mechanism consists of a single message from the client to the
+   server.  The client sends the authorization identity (identity to
+   login as), followed by a US-ASCII NUL character, followed by the
+   authentication identity (identity whose password will be used),
+   followed by a US-ASCII NUL character, followed by the clear-text
+   password.  The client may leave the authorization identity empty to
+   indicate that it is the same as the authentication identity.
+
+   The server will verify the authentication identity and password with
+   the system authentication database and verify that the authentication
+   credentials permit the client to login as the authorization identity.
+   If both steps succeed, the user is logged in.
+
+   The server MAY also use the password to initialize any new
+   authentication database, such as one suitable for CRAM-MD5
+   [CRAM-MD5].
+
+   Non-US-ASCII characters are permitted as long as they are represented
+   in UTF-8 [UTF-8].  Use of non-visible characters or characters which
+   a user may be unable to enter on some keyboards is discouraged.
+
+   The formal grammar for the client message using Augmented BNF [ABNF]
+   follows.
+
+   message         = [authorize-id] NUL authenticate-id NUL password
+   authenticate-id = 1*UTF8-SAFE      ; MUST accept up to 255 octets
+   authorize-id    = 1*UTF8-SAFE      ; MUST accept up to 255 octets
+   password        = 1*UTF8-SAFE      ; MUST accept up to 255 octets
+   NUL             = %x00
+   UTF8-SAFE       = %x01-09 / %x0B-0C / %x0E-7F / UTF8-2 /
+                     UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6
+   UTF8-1          = %x80-BF
+   UTF8-2          = %xC0-DF UTF8-1
+   UTF8-3          = %xE0-EF 2UTF8-1
+
+
+
+Newman                      Standards Track                     [Page 8]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+   UTF8-4          = %xF0-F7 3UTF8-1
+   UTF8-5          = %xF8-FB 4UTF8-1
+   UTF8-6          = %xFC-FD 5UTF8-1
+
+   Here is an example of how this might be used to initialize a CRAM-MD5
+   authentication database for ACAP:
+
+   Example:    S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
+               C: a001 AUTHENTICATE "CRAM-MD5"
+               S: + "<1896.697170952 at postoffice.reston.mci.net>"
+               C: "tim b913a602c7eda7a495b4e6e7334d3890"
+               S: a001 NO (TRANSITION-NEEDED)
+                  "Please change your password, or use TLS to login"
+               C: a002 STARTTLS
+               S: a002 OK "Begin TLS negotiation now"
+               <TLS negotiation, further commands are under TLS layer>
+               S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL")
+               C: a003 AUTHENTICATE "PLAIN" {21+}
+               C: <NUL>tim<NUL>tanstaaftanstaaf
+               S: a003 OK CRAM-MD5 password initialized
+
+   Note: In this example, <NUL> represents a single ASCII NUL octet.
+
+7. imaps and pop3s ports
+
+   Separate "imaps" and "pop3s" ports were registered for use with SSL.
+   Use of these ports is discouraged in favor of the STARTTLS or STLS
+   commands.
+
+   A number of problems have been observed with separate ports for
+   "secure" variants of protocols.  This is an attempt to enumerate some
+   of those problems.
+
+   - Separate ports lead to a separate URL scheme which intrudes into
+     the user interface in inappropriate ways.  For example, many web
+     pages use language like "click here if your browser supports SSL."
+     This is a decision the browser is often more capable of making than
+     the user.
+
+   - Separate ports imply a model of either "secure" or "not secure."
+     This can be misleading in a number of ways.  First, the "secure"
+     port may not in fact be acceptably secure as an export-crippled
+     cipher suite might be in use.  This can mislead users into a false
+     sense of security.  Second, the normal port might in fact be
+     secured by using a SASL mechanism which includes a security layer.
+     Thus the separate port distinction makes the complex topic of
+     security policy even more confusing.  One common result of this
+     confusion is that firewall administrators are often misled into
+
+
+
+Newman                      Standards Track                     [Page 9]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+     permitting the "secure" port and blocking the standard port.  This
+     could be a poor choice given the common use of SSL with a 40-bit
+     key encryption layer and plain-text password authentication is less
+     secure than strong SASL mechanisms such as GSSAPI with Kerberos 5.
+
+   - Use of separate ports for SSL has caused clients to implement only
+     two security policies: use SSL or don't use SSL.  The desirable
+     security policy "use TLS when available" would be cumbersome with
+     the separate port model, but is simple with STARTTLS.
+
+   - Port numbers are a limited resource.  While they are not yet in
+     short supply, it is unwise to set a precedent that could double (or
+     worse) the speed of their consumption.
+
+
+8. IANA Considerations
+
+   This constitutes registration of the "STARTTLS" and "LOGINDISABLED"
+   IMAP capabilities as required by section 7.2.1 of RFC 2060 [IMAP].
+
+   The registration for the POP3 "STLS" capability follows:
+
+   CAPA tag:                   STLS
+   Arguments:                  none
+   Added commands:             STLS
+   Standard commands affected: May enable USER/PASS as a side-effect.
+     CAPA command SHOULD be re-issued after successful completion.
+   Announced states/Valid states: AUTHORIZATION state only.
+   Specification reference:    this memo
+
+   The registration for the ACAP "STARTTLS" capability follows:
+
+   Capability name:            STARTTLS
+   Capability keyword:         STARTTLS
+   Capability arguments:       none
+   Published Specification(s): this memo
+   Person and email address for further information:
+       see author's address section below
+
+   The registration for the PLAIN SASL mechanism follows:
+
+   SASL mechanism name:        PLAIN
+   Security Considerations:    See section 9 of this memo
+   Published specification:    this memo
+   Person & email address to contact for further information:
+       see author's address section below
+   Intended usage:             COMMON
+   Author/Change controller:   see author's address section below
+
+
+
+Newman                      Standards Track                    [Page 10]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+9. Security Considerations
+
+   TLS only provides protection for data sent over a network connection.
+   Messages transferred over IMAP or POP3 are still available to server
+   administrators and usually subject to eavesdropping, tampering and
+   forgery when transmitted through SMTP or NNTP.  TLS is no substitute
+   for an end-to-end message security mechanism using MIME security
+   multiparts [MIME-SEC].
+
+   A man-in-the-middle attacker can remove STARTTLS from the capability
+   list or generate a failure response to the STARTTLS command.  In
+   order to detect such an attack, clients SHOULD warn the user when
+   session privacy is not active and/or be configurable to refuse to
+   proceed without an acceptable level of security.
+
+   A man-in-the-middle attacker can always cause a down-negotiation to
+   the weakest authentication mechanism or cipher suite available.  For
+   this reason, implementations SHOULD be configurable to refuse weak
+   mechanisms or cipher suites.
+
+   Any protocol interactions prior to the TLS handshake are performed in
+   the clear and can be modified by a man-in-the-middle attacker.  For
+   this reason, clients MUST discard cached information about server
+   capabilities advertised prior to the start of the TLS handshake.
+
+   Clients are encouraged to clearly indicate when the level of
+   encryption active is known to be vulnerable to attack using modern
+   hardware (such as encryption keys with 56 bits of entropy or less).
+
+   The LOGINDISABLED IMAP capability (discussed in section 3.2) only
+   reduces the potential for passive attacks, it provides no protection
+   against active attacks.  The responsibility remains with the client
+   to avoid sending a password over a vulnerable channel.
+
+   The PLAIN mechanism relies on the TLS encryption layer for security.
+   When used without TLS, it is vulnerable to a common network
+   eavesdropping attack.  Therefore PLAIN MUST NOT be advertised or used
+   unless a suitable TLS encryption layer is active or backwards
+   compatibility dictates otherwise.
+
+   When the PLAIN mechanism is used, the server gains the ability to
+   impersonate the user to all services with the same password
+   regardless of any encryption provided by TLS or other network privacy
+   mechanisms.  While many other authentication mechanisms have similar
+   weaknesses, stronger SASL mechanisms such as Kerberos address this
+   issue.  Clients are encouraged to have an operational mode where all
+   mechanisms which are likely to reveal the user's password to the
+   server are disabled.
+
+
+
+Newman                      Standards Track                    [Page 11]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+   The security considerations for TLS apply to STARTTLS and the
+   security considerations for SASL apply to the PLAIN mechanism.
+   Additional security requirements are discussed in section 2.
+
+10. References
+
+   [ABNF]     Crocker, D. and P. Overell, "Augmented BNF for Syntax
+              Specifications: ABNF", RFC 2234, November 1997.
+
+   [ACAP]     Newman, C. and J. Myers, "ACAP -- Application
+              Configuration Access Protocol", RFC 2244, November 1997.
+
+   [AUTH]     Haller, N. and R. Atkinson, "On Internet Authentication",
+              RFC 1704, October 1994.
+
+   [CRAM-MD5] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
+              AUTHorize Extension for Simple Challenge/Response", RFC
+              2195, September 1997.
+
+   [IMAP]     Crispin, M., "Internet Message Access Protocol - Version
+              4rev1", RFC 2060, December 1996.
+
+   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [MIME-SEC] Galvin, J., Murphy, S., Crocker, S. and N. Freed,
+              "Security Multiparts for MIME: Multipart/Signed and
+              Multipart/Encrypted", RFC 1847, October 1995.
+
+   [POP3]     Myers, J. and M. Rose, "Post Office Protocol - Version 3",
+              STD 53, RFC 1939, May 1996.
+
+   [POP3EXT]  Gellens, R., Newman, C. and L. Lundblade, "POP3 Extension
+              Mechanism", RFC 2449, November 1998.
+
+   [POP-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
+              December 1994.
+
+   [SASL]     Myers, J., "Simple Authentication and Security Layer
+              (SASL)", RFC 2222, October 1997.
+
+   [SMTPTLS]  Hoffman, P., "SMTP Service Extension for Secure SMTP over
+              TLS", RFC 2487, January 1999.
+
+   [TLS]      Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
+              RFC 2246, January 1999.
+
+
+
+
+
+Newman                      Standards Track                    [Page 12]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+   [UTF-8]    Yergeau, F., "UTF-8, a transformation format of ISO
+              10646", RFC 2279, January 1998.
+
+
+11. Author's Address
+
+   Chris Newman
+   Innosoft International, Inc.
+   1050 Lakes Drive
+   West Covina, CA 91790 USA
+
+   EMail: chris.newman at innosoft.com
+
+
+A. Appendix -- Compliance Checklist
+
+   An implementation is not compliant if it fails to satisfy one or more
+   of the MUST requirements for the protocols it implements.  An
+   implementation that satisfies all the MUST and all the SHOULD
+   requirements for its protocols is said to be "unconditionally
+   compliant"; one that satisfies all the MUST requirements but not all
+   the SHOULD requirements for its protocols is said to be
+   "conditionally compliant".
+
+   Rules                                                 Section
+   -----                                                 -------
+   Mandatory-to-implement Cipher Suite                      2.1
+   SHOULD have mode where encryption required               2.2
+   server SHOULD have mode where TLS not required           2.2
+   MUST be configurable to refuse all clear-text login
+     commands or mechanisms                                 2.3
+   server SHOULD be configurable to refuse clear-text
+     login commands on entire server and on per-user basis  2.3
+   client MUST check server identity                        2.4
+   client MUST use hostname used to open connection         2.4
+   client MUST NOT use hostname from insecure remote lookup 2.4
+   client SHOULD support subjectAltName of dNSName type     2.4
+   client SHOULD ask for confirmation or terminate on fail  2.4
+   MUST check result of STARTTLS for acceptable privacy     2.5
+   client MUST NOT issue commands after STARTTLS
+      until server response and negotiation done        3.1,4,5.1
+   client MUST discard cached information             3.1,4,5.1,9
+   client SHOULD re-issue CAPABILITY/CAPA command       3.1,4
+   IMAP server with STARTTLS MUST implement LOGINDISABLED   3.2
+   IMAP client MUST NOT issue LOGIN if LOGINDISABLED        3.2
+   POP server MUST implement POP3 extensions                4
+   ACAP server MUST re-issue ACAP greeting                  5.1
+
+
+
+
+Newman                      Standards Track                    [Page 13]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+   client SHOULD warn when session privacy not active and/or
+     refuse to proceed without acceptable security level    9
+   SHOULD be configurable to refuse weak mechanisms or
+     cipher suites                                          9
+
+   The PLAIN mechanism is an optional part of this specification.
+   However if it is implemented the following rules apply:
+
+   Rules                                                 Section
+   -----                                                 -------
+   MUST NOT use PLAIN unless strong encryption active
+     or backwards compatibility dictates otherwise         6,9
+   MUST use UTF-8 encoding for characters in PLAIN          6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                    [Page 14]
+

+RFC 2595           Using TLS with IMAP, POP3 and ACAP          June 1999
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (1999).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Newman                      Standards Track                    [Page 15]
+

diff --git a/doc/rfc2831.txt b/doc/rfc2831.txt
new file mode 100644
index 0000000..c1a54c4
--- /dev/null
+++ b/doc/rfc2831.txt
@@ -0,0 +1,1515 @@
+
+
+
+
+
+
+Network Working Group                                           P. Leach
+Request for Comments: 2831                                     Microsoft
+Category: Standards Track                                      C. Newman
+                                                                Innosoft
+                                                                May 2000
+
+
+            Using Digest Authentication as a SASL Mechanism
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+Abstract
+
+   This specification defines how HTTP Digest Authentication [Digest]
+   can be used as a SASL [RFC 2222] mechanism for any protocol that has
+   a SASL profile. It is intended both as an improvement over CRAM-MD5
+   [RFC 2195] and as a convenient way to support a single authentication
+   mechanism for web, mail, LDAP, and other protocols.
+
+Table of Contents
+
+   1 INTRODUCTION.....................................................2
+    1.1 CONVENTIONS AND NOTATION......................................2
+    1.2 REQUIREMENTS..................................................3
+   2 AUTHENTICATION...................................................3
+    2.1 INITIAL AUTHENTICATION........................................3
+     2.1.1 Step One...................................................3
+     2.1.2 Step Two...................................................6
+     2.1.3 Step Three................................................12
+    2.2 SUBSEQUENT AUTHENTICATION....................................12
+     2.2.1 Step one..................................................13
+     2.2.2 Step Two..................................................13
+    2.3 INTEGRITY PROTECTION.........................................13
+    2.4 CONFIDENTIALITY PROTECTION...................................14
+   3 SECURITY CONSIDERATIONS.........................................15
+    3.1 AUTHENTICATION OF CLIENTS USING DIGEST AUTHENTICATION........15
+    3.2 COMPARISON OF DIGEST WITH PLAINTEXT PASSWORDS................16
+    3.3 REPLAY ATTACKS...............................................16
+
+
+
+Leach & Newman              Standards Track                     [Page 1]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+    3.4 ONLINE DICTIONARY ATTACKS....................................16
+    3.5 OFFLINE DICTIONARY ATTACKS...................................16
+    3.6 MAN IN THE MIDDLE............................................17
+    3.7 CHOSEN PLAINTEXT ATTACKS.....................................17
+    3.8 SPOOFING BY COUNTERFEIT SERVERS..............................17
+    3.9 STORING PASSWORDS............................................17
+    3.10 MULTIPLE REALMS.............................................18
+    3.11 SUMMARY.....................................................18
+   4 EXAMPLE.........................................................18
+   5 REFERENCES......................................................20
+   6 AUTHORS' ADDRESSES..............................................21
+   7 ABNF............................................................21
+    7.1 AUGMENTED BNF................................................21
+    7.2 BASIC RULES..................................................23
+   8 SAMPLE CODE.....................................................25
+   9 FULL COPYRIGHT STATEMENT........................................27
+
+1  Introduction
+
+   This specification describes the use of HTTP Digest Access
+   Authentication as a SASL mechanism. The authentication type
+   associated with the Digest SASL mechanism is "DIGEST-MD5".
+
+   This specification is intended to be upward compatible with the
+   "md5-sess" algorithm of HTTP/1.1 Digest Access Authentication
+   specified in [Digest]. The only difference in the "md5-sess"
+   algorithm is that some directives not needed in a SASL mechanism have
+   had their values defaulted.
+
+   There is one new feature for use as a SASL mechanism: integrity
+   protection on application protocol messages after an authentication
+   exchange.
+
+   Also, compared to CRAM-MD5, DIGEST-MD5 prevents chosen plaintext
+   attacks, and permits the use of third party authentication servers,
+   mutual authentication, and optimized reauthentication if a client has
+   recently authenticated to a server.
+
+1.1  Conventions and Notation
+
+   This specification uses the same ABNF notation and lexical
+   conventions as HTTP/1.1 specification; see appendix A.
+
+   Let { a, b, ... } be the concatenation of the octet strings a, b, ...
+
+   Let H(s) be the 16 octet MD5 hash [RFC 1321] of the octet string s.
+
+
+
+
+
+Leach & Newman              Standards Track                     [Page 2]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   Let KD(k, s) be H({k, ":", s}), i.e., the 16 octet hash of the string
+   k, a colon and the string s.
+
+   Let HEX(n) be the representation of the 16 octet MD5 hash n as a
+   string of 32 hex digits (with alphabetic characters always in lower
+   case, since MD5 is case sensitive).
+
+   Let HMAC(k, s) be the 16 octet HMAC-MD5 [RFC 2104] of the octet
+   string s using the octet string k as a key.
+
+   The value of a quoted string constant as an octet string does not
+   include any terminating null character.
+
+1.2  Requirements
+
+   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+   document are to be interpreted as described in RFC 2119 [RFC 2119].
+
+   An implementation is not compliant if it fails to satisfy one or more
+   of the MUST level requirements for the protocols it implements. An
+   implementation that satisfies all the MUST level and all the SHOULD
+   level requirements for its protocols is said to be "unconditionally
+   compliant"; one that satisfies all the MUST level requirements but
+   not all the SHOULD level requirements for its protocols is said to be
+   "conditionally compliant."
+
+2  Authentication
+
+   The following sections describe how to use Digest as a SASL
+   authentication mechanism.
+
+2.1  Initial Authentication
+
+   If the client has not recently authenticated to the server, then it
+   must perform "initial authentication", as defined in this section. If
+   it has recently authenticated, then a more efficient form is
+   available, defined in the next section.
+
+2.1.1  Step One
+
+   The server starts by sending a challenge. The data encoded in the
+   challenge contains a string formatted according to the rules for a
+   "digest-challenge" defined as follows:
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                     [Page 3]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   digest-challenge  =
+         1#( realm | nonce | qop-options | stale | maxbuf | charset
+               algorithm | cipher-opts | auth-param )
+
+        realm             = "realm" "=" <"> realm-value <">
+        realm-value       = qdstr-val
+        nonce             = "nonce" "=" <"> nonce-value <">
+        nonce-value       = qdstr-val
+        qop-options       = "qop" "=" <"> qop-list <">
+        qop-list          = 1#qop-value
+        qop-value         = "auth" | "auth-int" | "auth-conf" |
+                             token
+        stale             = "stale" "=" "true"
+        maxbuf            = "maxbuf" "=" maxbuf-value
+        maxbuf-value      = 1*DIGIT
+        charset           = "charset" "=" "utf-8"
+        algorithm         = "algorithm" "=" "md5-sess"
+        cipher-opts       = "cipher" "=" <"> 1#cipher-value <">
+        cipher-value      = "3des" | "des" | "rc4-40" | "rc4" |
+                            "rc4-56" | token
+        auth-param        = token "=" ( token | quoted-string )
+
+   The meanings of the values of the directives used above are as
+   follows:
+
+   realm
+      Mechanistically, a string which can enable users to know which
+      username and password to use, in case they might have different
+      ones for different servers. Conceptually, it is the name of a
+      collection of accounts that might include the user's account. This
+      string should contain at least the name of the host performing the
+      authentication and might additionally indicate the collection of
+      users who might have access. An example might be
+      "registered_users at gotham.news.example.com".  This directive is
+      optional; if not present, the client SHOULD solicit it from the
+      user or be able to compute a default; a plausible default might be
+      the realm supplied by the user when they logged in to the client
+      system. Multiple realm directives are allowed, in which case the
+      user or client must choose one as the realm for which to supply to
+      username and password.
+
+   nonce
+      A server-specified data string which MUST be different each time a
+      digest-challenge is sent as part of initial authentication.  It is
+      recommended that this string be base64 or hexadecimal data. Note
+      that since the string is passed as a quoted string, the
+      double-quote character is not allowed unless escaped (see section
+      7.2). The contents of the nonce are implementation dependent. The
+
+
+
+Leach & Newman              Standards Track                     [Page 4]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+      security of the implementation depends on a good choice. It is
+      RECOMMENDED that it contain at least 64 bits of entropy. The nonce
+      is opaque to the client. This directive is required and MUST
+      appear exactly once; if not present, or if multiple instances are
+      present, the client should abort the authentication exchange.
+
+   qop-options
+      A quoted string of one or more tokens indicating the "quality of
+      protection" values supported by the server.  The value "auth"
+      indicates authentication; the value "auth-int" indicates
+      authentication with integrity protection; the value "auth-conf"
+      indicates authentication with integrity protection and encryption.
+      This directive is optional; if not present it defaults to "auth".
+      The client MUST ignore unrecognized options; if the client
+      recognizes no option, it should abort the authentication exchange.
+
+   stale
+      The "stale" directive is not used in initial authentication. See
+      the next section for its use in subsequent authentications. This
+      directive may appear at most once; if multiple instances are
+      present, the client should abort the authentication exchange.
+
+   maxbuf
+      A number indicating the size of the largest buffer the server is
+      able to receive when using "auth-int" or "auth-conf". If this
+      directive is missing, the default value is 65536. This directive
+      may appear at most once; if multiple instances are present, the
+      client should abort the authentication exchange.
+
+   charset
+      This directive, if present, specifies that the server supports
+      UTF-8 encoding for the username and password. If not present, the
+      username and password must be encoded in ISO 8859-1 (of which
+      US-ASCII is a subset). The directive is needed for backwards
+      compatibility with HTTP Digest, which only supports ISO 8859-1.
+      This directive may appear at most once; if multiple instances are
+      present, the client should abort the authentication exchange.
+
+   algorithm
+      This directive is required for backwards compatibility with HTTP
+      Digest., which supports other algorithms. . This directive is
+      required and MUST appear exactly once; if not present, or if
+      multiple instances are present, the client should abort the
+      authentication exchange.
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                     [Page 5]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   cipher-opts
+      A list of ciphers that the server supports. This directive must be
+      present exactly once if "auth-conf" is offered in the
+      "qop-options" directive, in which case the "3des" and "des" modes
+      are mandatory-to-implement. The client MUST ignore unrecognized
+      options; if the client recognizes no option, it should abort the
+      authentication exchange.
+
+      des
+         the Data Encryption Standard (DES) cipher [FIPS] in cipher
+         block chaining (CBC) mode with a 56 bit key.
+
+      3des
+         the "triple DES" cipher in CBC mode with EDE with the same key
+         for each E stage (aka "two keys mode") for a total key length
+         of 112 bits.
+
+      rc4, rc4-40, rc4-56
+         the RC4 cipher with a 128 bit, 40 bit, and 56 bit key,
+         respectively.
+
+   auth-param This construct allows for future extensions; it may appear
+      more than once. The client MUST ignore any unrecognized
+      directives.
+
+   For use as a SASL mechanism, note that the following changes are made
+   to "digest-challenge" from HTTP: the following Digest options (called
+   "directives" in HTTP terminology) are unused (i.e., MUST NOT be sent,
+   and MUST be ignored if received):
+
+    opaque
+    domain
+
+   The size of a digest-challenge MUST be less than 2048 bytes.
+
+2.1.2  Step Two
+
+   The client makes note of the "digest-challenge" and then responds
+   with a string formatted and computed according to the rules for a
+   "digest-response" defined as follows:
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                     [Page 6]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   digest-response  = 1#( username | realm | nonce | cnonce |
+                          nonce-count | qop | digest-uri | response |
+                          maxbuf | charset | cipher | authzid |
+                          auth-param )
+
+       username         = "username" "=" <"> username-value <">
+       username-value   = qdstr-val
+       cnonce           = "cnonce" "=" <"> cnonce-value <">
+       cnonce-value     = qdstr-val
+       nonce-count      = "nc" "=" nc-value
+       nc-value         = 8LHEX
+       qop              = "qop" "=" qop-value
+       digest-uri       = "digest-uri" "=" <"> digest-uri-value <">
+       digest-uri-value  = serv-type "/" host [ "/" serv-name ]
+       serv-type        = 1*ALPHA
+       host             = 1*( ALPHA | DIGIT | "-" | "." )
+       serv-name        = host
+       response         = "response" "=" response-value
+       response-value   = 32LHEX
+       LHEX             = "0" | "1" | "2" | "3" |
+                          "4" | "5" | "6" | "7" |
+                          "8" | "9" | "a" | "b" |
+                          "c" | "d" | "e" | "f"
+       cipher           = "cipher" "=" cipher-value
+       authzid          = "authzid" "=" <"> authzid-value <">
+       authzid-value    = qdstr-val
+
+
+   username
+      The user's name in the specified realm, encoded according to the
+      value of the "charset" directive. This directive is required and
+      MUST be present exactly once; otherwise, authentication fails.
+
+   realm
+      The realm containing the user's account. This directive is
+      required if the server provided any realms in the
+      "digest-challenge", in which case it may appear exactly once and
+      its value SHOULD be one of those realms. If the directive is
+      missing, "realm-value" will set to the empty string when computing
+      A1 (see below for details).
+
+   nonce
+      The server-specified data string received in the preceding
+      digest-challenge. This directive is required and MUST be present
+      exactly once; otherwise, authentication fails.
+
+
+
+
+
+
+Leach & Newman              Standards Track                     [Page 7]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   cnonce
+      A client-specified data string which MUST be different each time a
+      digest-response is sent as part of initial authentication. The
+      cnonce-value is an opaque quoted string value provided by the
+      client and used by both client and server to avoid chosen
+      plaintext attacks, and to provide mutual authentication. The
+      security of the implementation depends on a good choice. It is
+      RECOMMENDED that it contain at least 64 bits of entropy. This
+      directive is required and MUST be present exactly once; otherwise,
+      authentication fails.
+
+   nonce-count
+      The nc-value is the hexadecimal count of the number of requests
+      (including the current request) that the client has sent with the
+      nonce value in this request.  For example, in the first request
+      sent in response to a given nonce value, the client sends
+      "nc=00000001". The purpose of this directive is to allow the
+      server to detect request replays by maintaining its own copy of
+      this count - if the same nc-value is seen twice, then the request
+      is a replay.   See the description below of the construction of
+      the response value. This directive may appear at most once; if
+      multiple instances are present, the client should abort the
+      authentication exchange.
+
+   qop
+      Indicates what "quality of protection" the client accepted. If
+      present, it may appear exactly once and  its value MUST be one of
+      the alternatives in qop-options. If not present, it defaults to
+      "auth". These values affect the computation of the response. Note
+      that this is a single token, not a quoted list of alternatives.
+
+   serv-type
+      Indicates the type of service, such as "www" for web service,
+      "ftp" for FTP service, "smtp" for mail delivery service, etc. The
+      service name as defined in the SASL profile for the protocol see
+      section 4 of [RFC 2222], registered in the IANA registry of
+      "service" elements for the GSSAPI host-based service name form
+      [RFC 2078].
+
+   host
+      The DNS host name or IP address for the service requested.  The
+      DNS host name must be the fully-qualified canonical name of the
+      host. The DNS host name is the preferred form; see notes on server
+      processing of the digest-uri.
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                     [Page 8]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   serv-name
+      Indicates the name of the service if it is replicated. The service
+      is considered to be replicated if the client's service-location
+      process involves resolution using standard DNS lookup operations,
+      and if these operations involve DNS records (such as SRV, or MX)
+      which resolve one DNS name into a set of other DNS names. In this
+      case, the initial name used by the client is the "serv-name", and
+      the final name is the "host" component. For example, the incoming
+      mail service for "example.com" may be replicated through the use
+      of MX records stored in the DNS, one of which points at an SMTP
+      server called "mail3.example.com"; it's "serv-name" would be
+      "example.com", it's "host" would be "mail3.example.com". If the
+      service is not replicated, or the serv-name is identical to the
+      host, then the serv-name component MUST be omitted.
+
+   digest-uri
+      Indicates the principal name of the service with which the client
+      wishes to connect, formed from the serv-type, host, and serv-name.
+      For example, the FTP service on "ftp.example.com" would have a
+      "digest-uri" value of "ftp/ftp.example.com"; the SMTP server from
+      the example above would have a "digest-uri" value of
+      "smtp/mail3.example.com/example.com".
+
+   Servers SHOULD check that the supplied value is correct. This will
+   detect accidental connection to the incorrect server. It is also so
+   that clients will be trained to provide values that will work with
+   implementations that use a shared back-end authentication service
+   that can provide server authentication.
+
+   The serv-type component should match the service being offered. The
+   host component should match one of the host names of the host on
+   which the service is running, or it's IP address. Servers SHOULD NOT
+   normally support the IP address form, because server authentication
+   by IP address is not very useful; they should only do so if the DNS
+   is unavailable or unreliable. The serv-name component should match
+   one of the service's configured service names.
+
+   This directive may appear at most once; if multiple instances are
+   present, the client should abort the authentication exchange.
+
+   Note: In the HTTP use of Digest authentication, the digest-uri is the
+   URI (usually a URL) of the resource requested -- hence the name of
+   the directive.
+
+   response
+      A string of 32 hex digits computed as defined below, which proves
+      that the user knows a password. This directive is required and
+      MUST be present exactly once; otherwise, authentication fails.
+
+
+
+Leach & Newman              Standards Track                     [Page 9]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   maxbuf
+      A number indicating the size of the largest buffer the client is
+      able to receive. If this directive is missing, the default value
+      is 65536. This directive may appear at most once; if multiple
+      instances are present, the server should abort the authentication
+      exchange.
+
+   charset
+      This directive, if present, specifies that the client has used
+      UTF-8 encoding for the username and password. If not present, the
+      username and password must be encoded in ISO 8859-1 (of which
+      US-ASCII is a subset). The client should send this directive only
+      if the server has indicated it supports UTF-8. The directive is
+      needed for backwards compatibility with HTTP Digest, which only
+      supports ISO 8859-1.
+
+   LHEX
+      32 hex digits, where the alphabetic characters MUST be lower case,
+      because MD5 is not case insensitive.
+
+   cipher
+      The cipher chosen by the client. This directive MUST appear
+      exactly once if "auth-conf" is negotiated; if required and not
+      present, authentication fails.
+
+   authzid
+      The "authorization ID" as per RFC 2222, encoded in UTF-8. This
+      directive is optional. If present, and the authenticating user has
+      sufficient privilege, and the server supports it, then after
+      authentication the server will use this identity for making all
+      accesses and access checks. If the client specifies it, and the
+      server does not support it, then the response-value will be
+      incorrect, and authentication will fail.
+
+   The size of a digest-response MUST be less than 4096 bytes.
+
+2.1.2.1   Response-value
+
+   The definition of "response-value" above indicates the encoding for
+   its value -- 32 lower case hex characters. The following definitions
+   show how the value is computed.
+
+   Although qop-value and components of digest-uri-value may be
+   case-insensitive, the case which the client supplies in step two is
+   preserved for the purpose of computing and verifying the
+   response-value.
+
+      response-value  =
+
+
+
+Leach & Newman              Standards Track                    [Page 10]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+         HEX( KD ( HEX(H(A1)),
+                 { nonce-value, ":" nc-value, ":",
+                   cnonce-value, ":", qop-value, ":", HEX(H(A2)) }))
+
+   If authzid is specified, then A1 is
+
+
+      A1 = { H( { username-value, ":", realm-value, ":", passwd } ),
+           ":", nonce-value, ":", cnonce-value, ":", authzid-value }
+
+   If authzid is not specified, then A1 is
+
+
+      A1 = { H( { username-value, ":", realm-value, ":", passwd } ),
+           ":", nonce-value, ":", cnonce-value }
+
+   where
+
+         passwd   = *OCTET
+
+   The "username-value", "realm-value" and "passwd" are encoded
+   according to the value of the "charset" directive. If "charset=UTF-8"
+   is present, and all the characters of either "username-value" or
+   "passwd" are in the ISO 8859-1 character set, then it must be
+   converted to ISO 8859-1 before being hashed. This is so that
+   authentication databases that store the hashed username, realm and
+   password (which is common) can be shared compatibly with HTTP, which
+   specifies ISO 8859-1. A sample implementation of this conversion is
+   in section 8.
+
+   If the "qop" directive's value is "auth", then A2 is:
+
+      A2       = { "AUTHENTICATE:", digest-uri-value }
+
+   If the "qop" value is "auth-int" or "auth-conf" then A2 is:
+
+      A2       = { "AUTHENTICATE:", digest-uri-value,
+               ":00000000000000000000000000000000" }
+
+   Note that "AUTHENTICATE:" must be in upper case, and the second
+   string constant is a string with a colon followed by 32 zeros.
+
+   These apparently strange values of A2 are for compatibility with
+   HTTP; they were arrived at by setting "Method" to "AUTHENTICATE" and
+   the hash of the entity body to zero in the HTTP digest calculation of
+   A2.
+
+   Also, in the HTTP usage of Digest, several directives in the
+
+
+
+Leach & Newman              Standards Track                    [Page 11]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   "digest-challenge" sent by the server have to be returned by the
+   client in the "digest-response". These are:
+
+    opaque
+    algorithm
+
+   These directives are not needed when Digest is used as a SASL
+   mechanism (i.e., MUST NOT be sent, and MUST be ignored if received).
+
+2.1.3  Step Three
+
+   The server receives and validates the "digest-response". The server
+   checks that the nonce-count is "00000001". If it supports subsequent
+   authentication (see section 2.2), it saves the value of the nonce and
+   the nonce-count. It sends a message formatted as follows:
+
+    response-auth = "rspauth" "=" response-value
+
+   where response-value is calculated as above, using the values sent in
+   step two, except that if qop is "auth", then A2 is
+
+       A2 = { ":", digest-uri-value }
+
+   And if qop is "auth-int" or "auth-conf" then A2 is
+
+       A2 = { ":", digest-uri-value, ":00000000000000000000000000000000" }
+
+   Compared to its use in HTTP, the following Digest directives in the
+   "digest-response" are unused:
+
+       nextnonce
+       qop
+       cnonce
+       nonce-count
+
+2.2  Subsequent Authentication
+
+   If the client has previously authenticated to the server, and
+   remembers the values of username, realm, nonce, nonce-count, cnonce,
+   and qop that it used in that authentication, and the SASL profile for
+   a protocol permits an initial client response, then it MAY perform
+   "subsequent authentication", as defined in this section.
+
+
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 12]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+2.2.1  Step one
+
+   The client uses the values from the previous authentication and sends
+   an initial response with a string formatted and computed according to
+   the rules for a "digest-response", as defined above, but with a
+   nonce-count one greater than used in the last "digest-response".
+
+2.2.2  Step Two
+
+   The server receives the "digest-response". If the server does not
+   support subsequent authentication, then it sends a
+   "digest-challenge", and authentication proceeds as in initial
+   authentication. If the server has no saved nonce and nonce-count from
+   a previous authentication, then it sends a "digest-challenge", and
+   authentication proceeds as in initial authentication. Otherwise, the
+   server validates the "digest-response", checks that the nonce-count
+   is one greater than that used in the previous authentication using
+   that nonce, and saves the new value of nonce-count.
+
+   If the response is invalid, then the server sends a
+   "digest-challenge", and authentication proceeds as in initial
+   authentication (and should be configurable to log an authentication
+   failure in some sort of security audit log, since the failure may be
+   a symptom of an attack). The nonce-count MUST NOT be incremented in
+   this case: to do so would allow a denial of service attack by sending
+   an out-of-order nonce-count.
+
+   If the response is valid, the server MAY choose to deem that
+   authentication has succeeded. However, if it has been too long since
+   the previous authentication, or for any other reason, the server MAY
+   send a new "digest-challenge" with a new value for nonce. The
+   challenge MAY contain a "stale" directive with value "true", which
+   says that the client may respond to the challenge using the password
+   it used in the previous response; otherwise, the client must solicit
+   the password anew from the user. This permits the server to make sure
+   that the user has presented their password recently. (The directive
+   name refers to the previous nonce being stale, not to the last use of
+   the password.) Except for the handling of "stale", after sending the
+   "digest-challenge" authentication proceeds as in the case of initial
+   authentication.
+
+2.3   Integrity Protection
+
+   If the server offered "qop=auth-int" and the client responded
+   "qop=auth-int", then subsequent messages, up to but not including the
+   next subsequent authentication, between the client and the server
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 13]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   MUST be integrity protected. Using as a base session key the value of
+   H(A1) as defined above the client and server calculate a pair of
+   message integrity keys as follows.
+
+   The key for integrity protecting messages from client to server is:
+
+   Kic = MD5({H(A1),
+   "Digest session key to client-to-server signing key magic constant"})
+
+   The key for integrity protecting messages from server to client is:
+
+   Kis = MD5({H(A1),
+   "Digest session key to server-to-client signing key magic constant"})
+
+   where MD5 is as specified in [RFC 1321]. If message integrity is
+   negotiated, a MAC block for each message is appended to the message.
+   The MAC block is 16 bytes: the first 10 bytes of the HMAC-MD5 [RFC
+   2104] of the message, a 2-byte message type number in network byte
+   order with value 1, and the 4-byte sequence number in network byte
+   order. The message type is to allow for future extensions such as
+   rekeying.
+
+   MAC(Ki, SeqNum, msg) = (HMAC(Ki, {SeqNum, msg})[0..9], 0x0001,
+   SeqNum)
+
+   where Ki is Kic for messages sent by the client and Kis for those
+   sent by the server. The sequence number is initialized to zero, and
+   incremented by one for each message sent.
+
+   Upon receipt, MAC(Ki, SeqNum, msg) is computed and compared with the
+   received value; the message is discarded if they differ.
+
+2.4   Confidentiality Protection
+
+   If the server sent a "cipher-opts" directive and the client responded
+   with a "cipher" directive, then subsequent messages between the
+   client and the server MUST be confidentiality protected. Using as a
+   base session key the value of H(A1) as defined above the client and
+   server calculate a pair of message integrity keys as follows.
+
+   The key for confidentiality protecting messages from client to server
+   is:
+
+   Kcc = MD5({H(A1)[0..n],
+   "Digest H(A1) to client-to-server sealing key magic constant"})
+
+   The key for confidentiality protecting messages from server to client
+   is:
+
+
+
+Leach & Newman              Standards Track                    [Page 14]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   Kcs = MD5({H(A1)[0..n],
+   "Digest H(A1) to server-to-client sealing key magic constant"})
+
+   where MD5 is as specified in [RFC 1321]. For cipher "rc4-40" n is 5;
+   for "rc4-56" n is 7; for the rest n is 16. The key for the "rc-*"
+   ciphers is all 16 bytes of Kcc or Kcs; the key for "des" is the first
+   7 bytes; the key for "3des" is the first 14 bytes. The IV for "des"
+   and "3des" is the last 8 bytes of Kcc or Kcs.
+
+   If message confidentiality is negotiated, each message is encrypted
+   with the chosen cipher and a MAC block is appended to the message.
+
+   The MAC block is a variable length padding prefix followed by 16
+   bytes formatted as follows: the first 10 bytes of the HMAC-MD5 [RFC
+   2104] of the message, a 2-byte message type number in network byte
+   order with value 1, and the 4-byte sequence number in network byte
+   order. If the blocksize of the chosen cipher is not 1 byte, the
+   padding prefix is one or more octets each containing the number of
+   padding bytes, such that total length of the encrypted part of the
+   message is a multiple of the blocksize. The padding and first 10
+   bytes of the MAC block are encrypted along with the message.
+
+   SEAL(Ki, Kc, SeqNum, msg) =
+         {CIPHER(Kc, {msg, pad, HMAC(Ki, {SeqNum, msg})[0..9])}), 0x0001,
+          SeqNum}
+
+   where CIPHER is the chosen cipher, Ki and Kc are Kic and Kcc for
+   messages sent by the client and Kis and Kcs for those sent by the
+   server. The sequence number is initialized to zero, and incremented
+   by one for each message sent.
+
+   Upon receipt, the message is decrypted, HMAC(Ki, {SeqNum, msg}) is
+   computed and compared with the received value; the message is
+   discarded if they differ.
+
+3  Security Considerations
+
+3.1   Authentication of Clients using Digest Authentication
+
+   Digest Authentication does not provide a strong authentication
+   mechanism, when compared to public key based mechanisms, for example.
+   However, since it prevents chosen plaintext attacks, it is stronger
+   than (e.g.) CRAM-MD5, which has been proposed for use with LDAP [10],
+   POP and IMAP (see RFC 2195 [9]).   It is intended to replace the much
+   weaker and even more dangerous use of plaintext passwords; however,
+   since it is still a password based mechanism it avoids some of the
+   potential deployabilty issues with public-key, OTP or similar
+   mechanisms.
+
+
+
+Leach & Newman              Standards Track                    [Page 15]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   Digest Authentication offers no confidentiality protection beyond
+   protecting the actual password. All of the rest of the challenge and
+   response are available to an eavesdropper, including the user's name
+   and authentication realm.
+
+3.2   Comparison of Digest with Plaintext Passwords
+
+   The greatest threat to the type of transactions for which these
+   protocols are used is network snooping. This kind of transaction
+   might involve, for example, online access to a mail service whose use
+   is restricted to paying subscribers. With plaintext password
+   authentication an eavesdropper can obtain the password of the user.
+   This not only permits him to access anything in the database, but,
+   often worse, will permit access to anything else the user protects
+   with the same password.
+
+3.3   Replay Attacks
+
+   Replay attacks are defeated if the client or the server chooses a
+   fresh nonce for each authentication, as this specification requires.
+
+3.4  Online dictionary attacks
+
+   If the attacker can eavesdrop, then it can test any overheard
+   nonce/response pairs against a (potentially very large) list of
+   common words. Such a list is usually much smaller than the total
+   number of possible passwords. The cost of computing the response for
+   each password on the list is paid once for each challenge.
+
+   The server can mitigate this attack by not allowing users to select
+   passwords that are in a dictionary.
+
+3.5  Offline dictionary attacks
+
+   If the attacker can choose the challenge, then it can precompute the
+   possible responses to that challenge for a list of common words. Such
+   a list is usually much smaller than the total number of possible
+   passwords. The cost of computing the response for each password on
+   the list is paid just once.
+
+   Offline dictionary attacks are defeated if the client chooses a fresh
+   nonce for each authentication, as this specification requires.
+
+
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 16]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+3.6  Man in the Middle
+
+   Digest authentication is vulnerable to "man in the middle" (MITM)
+   attacks. Clearly, a MITM would present all the problems of
+   eavesdropping. But it also offers some additional opportunities to
+   the attacker.
+
+   A possible man-in-the-middle attack would be to substitute a weaker
+   qop scheme for the one(s) sent by the server; the server will not be
+   able to detect this attack. For this reason, the client should always
+   use the strongest scheme that it understands from the choices
+   offered, and should never choose a scheme that does not meet its
+   minimum requirements.
+
+3.7  Chosen plaintext attacks
+
+   A chosen plaintext attack is where a MITM or a malicious server can
+   arbitrarily choose the challenge that the client will use to compute
+   the response. The ability to choose the challenge is known to make
+   cryptanalysis much easier [8].
+
+   However, Digest does not permit the attack to choose the challenge as
+   long as the client chooses a fresh nonce for each authentication, as
+   this specification requires.
+
+3.8  Spoofing by Counterfeit Servers
+
+   If a user can be led to believe that she is connecting to a host
+   containing information protected by a password she knows, when in
+   fact she is connecting to a hostile server, then the hostile server
+   can obtain challenge/response pairs where it was able to partly
+   choose the challenge. There is no known way that this can be
+   exploited.
+
+3.9  Storing passwords
+
+   Digest authentication requires that the authenticating agent (usually
+   the server) store some data derived from the user's name and password
+   in a "password file" associated with a given realm. Normally this
+   might contain pairs consisting of username and H({ username-value,
+   ":", realm-value, ":", passwd }), which is adequate to compute H(A1)
+   as described above without directly exposing the user's password.
+
+   The security implications of this are that if this password file is
+   compromised, then an attacker gains immediate access to documents on
+   the server using this realm. Unlike, say a standard UNIX password
+   file, this information need not be decrypted in order to access
+   documents in the server realm associated with this file. On the other
+
+
+
+Leach & Newman              Standards Track                    [Page 17]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   hand, decryption, or more likely a brute force attack, would be
+   necessary to obtain the user's password. This is the reason that the
+   realm is part of the digested data stored in the password file. It
+   means that if one Digest authentication password file is compromised,
+   it does not automatically compromise others with the same username
+   and password (though it does expose them to brute force attack).
+
+   There are two important security consequences of this. First the
+   password file must be protected as if it contained plaintext
+   passwords, because for the purpose of accessing documents in its
+   realm, it effectively does.
+
+   A second consequence of this is that the realm string should be
+   unique among all realms that any single user is likely to use. In
+   particular a realm string should include the name of the host doing
+   the authentication.
+
+3.10  Multiple realms
+
+   Use of multiple realms may mean both that compromise of a the
+   security database for a single realm does not compromise all
+   security, and that there are more things to protect in order to keep
+   the whole system secure.
+
+3.11  Summary
+
+   By modern cryptographic standards Digest Authentication is weak,
+   compared to (say) public key based mechanisms. But for a large range
+   of purposes it is valuable as a replacement for plaintext passwords.
+   Its strength may vary depending on the implementation.
+
+4  Example
+
+   This example shows the use of the Digest SASL mechanism with the
+   IMAP4 AUTHENTICATE command [RFC 2060].
+
+   In this example, "C:" and "S:" represent a line sent by the client or
+   server respectively including a CRLF at the end.  Linebreaks and
+   indentation within a "C:" or "S:" are editorial and not part of the
+   protocol. The password in this example was "secret".  Note that the
+   base64 encoding of the challenges and responses is part of the IMAP4
+   AUTHENTICATE command, not part of the Digest specification itself.
+
+    S: * OK elwood.innosoft.com PMDF IMAP4rev1 V6.0-9
+    C: c CAPABILITY
+    S: * CAPABILITY IMAP4 IMAP4rev1 ACL LITERAL+ NAMESPACE QUOTA
+                UIDPLUS AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=PLAIN
+    S: c OK Completed
+
+
+
+Leach & Newman              Standards Track                    [Page 18]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+    C: a AUTHENTICATE DIGEST-MD5
+    S: + cmVhbG09ImVsd29vZC5pbm5vc29mdC5jb20iLG5vbmNlPSJPQTZNRzl0
+         RVFHbTJoaCIscW9wPSJhdXRoIixhbGdvcml0aG09bWQ1LXNlc3MsY2hh
+         cnNldD11dGYtOA==
+    C: Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iY2hyaXMiLHJlYWxtPSJlbHdvb2
+       QuaW5ub3NvZnQuY29tIixub25jZT0iT0E2TUc5dEVRR20yaGgiLG5jPTAw
+       MDAwMDAxLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLGRpZ2VzdC11cmk9Im
+       ltYXAvZWx3b29kLmlubm9zb2Z0LmNvbSIscmVzcG9uc2U9ZDM4OGRhZDkw
+       ZDRiYmQ3NjBhMTUyMzIxZjIxNDNhZjcscW9wPWF1dGg=
+    S: + cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
+    C:
+    S: a OK User logged in
+    ---
+
+    The base64-decoded version of the SASL exchange is:
+
+    S: realm="elwood.innosoft.com",nonce="OA6MG9tEQGm2hh",qop="auth",
+       algorithm=md5-sess,charset=utf-8
+    C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
+       nonce="OA6MG9tEQGm2hh",nc=00000001,cnonce="OA6MHXh6VqTrRk",
+       digest-uri="imap/elwood.innosoft.com",
+       response=d388dad90d4bbd760a152321f2143af7,qop=auth
+    S: rspauth=ea40f60335c427b5527b84dbabcdfffd
+
+    The password in this example was "secret".
+
+   This example shows the use of the Digest SASL mechanism with the
+   ACAP, using the same notational conventions and password as in the
+   previous example. Note that ACAP does not base64 encode and uses
+   fewer round trips that IMAP4.
+
+    S: * ACAP (IMPLEMENTATION "Test ACAP server") (SASL "CRAM-MD5"
+               "DIGEST-MD5" "PLAIN")
+    C: a AUTHENTICATE "DIGEST-MD5"
+    S: + {94}
+    S: realm="elwood.innosoft.com",nonce="OA9BSXrbuRhWay",qop="auth",
+       algorithm=md5-sess,charset=utf-8
+    C: {206}
+    C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
+       nonce="OA9BSXrbuRhWay",nc=00000001,cnonce="OA9BSuZWMSpW8m",
+       digest-uri="acap/elwood.innosoft.com",
+       response=6084c6db3fede7352c551284490fd0fc,qop=auth
+    S: a OK (SASL {40}
+    S: rspauth=2f0b3d7c3c2e486600ef710726aa2eae) "AUTHENTICATE
+    Completed"
+    ---
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 19]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   The server uses the values of all the directives, plus knowledge of
+   the users password (or the hash of the user's name, server's realm
+   and the user's password) to verify the computations above. If they
+   check, then the user has authenticated.
+
+5   References
+
+   [Digest]   Franks, J., et al., "HTTP Authentication: Basic and Digest
+              Access Authentication", RFC 2617, June 1999.
+
+   [ISO-8859] ISO-8859. International Standard--Information Processing--
+              8-bit Single-Byte Coded Graphic Character Sets --
+              Part 1: Latin alphabet No. 1, ISO-8859-1:1987.
+              Part 2: Latin alphabet No. 2, ISO-8859-2, 1987.
+              Part 3: Latin alphabet No. 3, ISO-8859-3, 1988.
+              Part 4: Latin alphabet No. 4, ISO-8859-4, 1988.
+              Part 5: Latin/Cyrillic alphabet, ISO-8859-5, 1988.
+              Part 6: Latin/Arabic alphabet, ISO-8859-6, 1987.
+              Part 7: Latin/Greek alphabet, ISO-8859-7, 1987.
+              Part 8: Latin/Hebrew alphabet, ISO-8859-8, 1988.
+              Part 9: Latin alphabet No. 5, ISO-8859-9, 1990.
+
+   [RFC 822]  Crocker, D., "Standard for The Format of ARPA Internet
+              Text Messages," STD 11, RFC 822, August 1982.
+
+   [RFC 1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
+              April 1992.
+
+   [RFC 2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
+              Part Three: Message Header Extensions for Non-ASCII Text",
+              RFC 2047, November 1996.
+
+   [RFC 2052] Gulbrandsen, A. and P. Vixie, "A DNS RR for specifying the
+              location of services (DNS SRV)", RFC 2052, October 1996.
+
+   [RFC 2060] Crispin, M., "Internet Message Access Protocol - Version
+              4rev1", RFC 2060, December 1996.
+
+   [RFC 2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC:  Keyed-
+              Hashing for  Message Authentication", RFC 2104, February
+              1997.
+
+   [RFC 2195] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
+              AUTHorize Extension for Simple Challenge/Response", RFC
+              2195, September 1997.
+
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 20]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [RFC 2222] Myers, J., "Simple Authentication and Security Layer
+              (SASL)", RFC 2222, October 1997.
+
+   [USASCII]  US-ASCII. Coded Character Set - 7-Bit American Standard
+              Code for Information Interchange. Standard ANSI X3.4-1986,
+              ANSI, 1986.
+
+6  Authors' Addresses
+
+   Paul Leach
+   Microsoft
+   1 Microsoft Way
+   Redmond, WA  98052
+
+   EMail: paulle at microsoft.com
+
+
+   Chris Newman
+   Innosoft International, Inc.
+   1050 Lakes Drive
+   West Covina, CA 91790 USA
+
+   EMail: chris.newman at innosoft.com
+
+7  ABNF
+
+   What follows is the definition of the notation as is used in the
+   HTTP/1.1 specification (RFC 2616) and the HTTP authentication
+   specification (RFC 2617); it is reproduced here for ease of
+   reference. Since it is intended that a single Digest implementation
+   can support both HTTP and SASL-based protocols, the same notation is
+   used in both to facilitate comparison and prevention of unwanted
+   differences. Since it is cut-and-paste from the HTTP specifications,
+   not all productions may be used in this specification. It is also not
+   quite legal ABNF; again, the errors were copied from the HTTP
+   specifications.
+
+7.1   Augmented BNF
+
+   All of the mechanisms specified in this document are described in
+   both prose and an augmented Backus-Naur Form (BNF) similar to that
+   used by RFC 822 [RFC 822]. Implementers will need to be familiar with
+   the notation in order to understand this specification.
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 21]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   The augmented BNF includes the following constructs:
+
+   name = definition
+      The name of a rule is simply the name itself (without any
+      enclosing "<" and ">") and is separated from its definition by the
+      equal "=" character. White space is only significant in that
+      indentation of continuation lines is used to indicate a rule
+      definition that spans more than one line. Certain basic rules are
+      in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle
+      brackets are used within definitions whenever their presence will
+      facilitate discerning the use of rule names.
+
+   "literal"
+      Quotation marks surround literal text. Unless stated otherwise,
+      the text is case-insensitive.
+
+   rule1 | rule2
+      Elements separated by a bar ("|") are alternatives, e.g., "yes |
+      no" will accept yes or no.
+
+   (rule1 rule2)
+      Elements enclosed in parentheses are treated as a single element.
+      Thus, "(elem (foo | bar) elem)" allows the token sequences
+      "elem foo elem" and "elem bar elem".
+
+   *rule
+      The character "*" preceding an element indicates repetition. The
+      full form is "<n>*<m>element" indicating at least <n> and at most
+      <m> occurrences of element. Default values are 0 and infinity so
+      that "*(element)" allows any number, including zero; "1*element"
+      requires at least one; and "1*2element" allows one or two.
+
+   [rule]
+      Square brackets enclose optional elements; "[foo bar]" is
+      equivalent to "*1(foo bar)".
+
+   N rule
+      Specific repetition: "<n>(element)" is equivalent to
+      "<n>*<n>(element)"; that is, exactly <n> occurrences of (element).
+      Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three
+      alphabetic characters.
+
+   #rule
+      A construct "#" is defined, similar to "*", for defining lists of
+      elements. The full form is "<n>#<m>element" indicating at least
+      <n> and at most <m> elements, each separated by one or more commas
+      (",") and OPTIONAL linear white space (LWS). This makes the usual
+      form of lists very easy; a rule such as
+
+
+
+Leach & Newman              Standards Track                    [Page 22]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+        ( *LWS element *( *LWS "," *LWS element ))
+      can be shown as
+        1#element
+      Wherever this construct is used, null elements are allowed, but do
+      not contribute to the count of elements present. That is,
+      "(element), , (element) " is permitted, but counts as only two
+      elements.  Therefore, where at least one element is required, at
+      least one non-null element MUST be present. Default values are 0
+      and infinity so that "#element" allows any number, including zero;
+      "1#element" requires at least one; and "1#2element" allows one or
+      two.
+
+   ; comment
+      A semi-colon, set off some distance to the right of rule text,
+      starts a comment that continues to the end of line. This is a
+      simple way of including useful notes in parallel with the
+      specifications.
+
+   implied *LWS
+      The grammar described by this specification is word-based. Except
+      where noted otherwise, linear white space (LWS) can be included
+      between any two adjacent words (token or quoted-string), and
+      between adjacent words and separators, without changing the
+      interpretation of a field. At least one delimiter (LWS and/or
+      separators) MUST exist between any two tokens (for the definition
+      of "token" below), since they would otherwise be interpreted as a
+      single token.
+
+7.2   Basic Rules
+
+   The following rules are used throughout this specification to
+   describe basic parsing constructs. The US-ASCII coded character set
+   is defined by ANSI X3.4-1986 [USASCII].
+
+       OCTET          = <any 8-bit sequence of data>
+       CHAR           = <any US-ASCII character (octets 0 - 127)>
+       UPALPHA        = <any US-ASCII uppercase letter "A".."Z">
+       LOALPHA        = <any US-ASCII lowercase letter "a".."z">
+       ALPHA          = UPALPHA | LOALPHA
+       DIGIT          = <any US-ASCII digit "0".."9">
+       CTL            = <any US-ASCII control character
+                        (octets 0 - 31) and DEL (127)>
+       CR             = <US-ASCII CR, carriage return (13)>
+       LF             = <US-ASCII LF, linefeed (10)>
+       SP             = <US-ASCII SP, space (32)>
+       HT             = <US-ASCII HT, horizontal-tab (9)>
+       <">            = <US-ASCII double-quote mark (34)>
+       CRLF           = CR LF
+
+
+
+Leach & Newman              Standards Track                    [Page 23]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+
+   All linear white space, including folding, has the same semantics as
+   SP. A recipient MAY replace any linear white space with a single SP
+   before interpreting the field value or forwarding the message
+   downstream.
+
+       LWS            = [CRLF] 1*( SP | HT )
+
+   The TEXT rule is only used for descriptive field contents and values
+   that are not intended to be interpreted by the message parser. Words
+   of *TEXT MAY contain characters from character sets other than
+   ISO-8859-1 [ISO 8859] only when encoded according to the rules of RFC
+   2047 [RFC 2047].
+
+       TEXT           = <any OCTET except CTLs,
+                        but including LWS>
+
+   A CRLF is allowed in the definition of TEXT only as part of a header
+   field continuation. It is expected that the folding LWS will be
+   replaced with a single SP before interpretation of the TEXT value.
+
+   Hexadecimal numeric characters are used in several protocol elements.
+
+       HEX            = "A" | "B" | "C" | "D" | "E" | "F"
+                      | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
+
+   Many HTTP/1.1 header field values consist of words separated by LWS
+   or special characters. These special characters MUST be in a quoted
+   string to be used within a parameter value.
+
+       token          = 1*<any CHAR except CTLs or separators>
+       separators     = "(" | ")" | "<" | ">" | "@"
+                      | "," | ";" | ":" | "\" | <">
+                      | "/" | "[" | "]" | "?" | "="
+                      | "{" | "}" | SP | HT
+
+   A string of text is parsed as a single word if it is quoted using
+   double-quote marks.
+
+      quoted-string  = ( <"> qdstr-val <"> )
+      qdstr-val      = *( qdtext | quoted-pair )
+      qdtext         = <any TEXT except <">>
+
+   Note that LWS is NOT implicit between the double-quote marks (<">)
+   surrounding a qdstr-val and the qdstr-val; any LWS will be considered
+   part of the qdstr-val.  This is also the case for quotation marks
+   surrounding any other construct.
+
+
+
+
+Leach & Newman              Standards Track                    [Page 24]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+   The backslash character ("\") MAY be used as a single-character
+   quoting mechanism only within qdstr-val and comment constructs.
+
+       quoted-pair    = "\" CHAR
+
+   The value of this construct is CHAR. Note that an effect of this rule
+   is that backslash must be quoted.
+
+8  Sample Code
+
+   The sample implementation in [Digest] also applies to DIGEST-MD5.
+
+   The following code implements the conversion from UTF-8 to 8859-1 if
+   necessary.
+
+    /* if the string is entirely in the 8859-1 subset of UTF-8, then
+     * translate to 8859-1 prior to MD5
+     */
+    void MD5_UTF8_8859_1(MD5_CTX *ctx, const unsigned char *base,
+        int len)
+    {
+        const unsigned char *scan, *end;
+        unsigned char cbuf;
+
+        end = base + len;
+        for (scan = base; scan < end; ++scan) {
+            if (*scan > 0xC3) break; /* abort if outside 8859-1 */
+            if (*scan >= 0xC0 && *scan <= 0xC3) {
+                if (++scan == end || *scan < 0x80 || *scan > 0xBF)
+                    break;
+            }
+        }
+        /* if we found a character outside 8859-1, don't alter string
+         */
+        if (scan < end) {
+            MD5Update(ctx, base, len);
+            return;
+        }
+
+        /* convert to 8859-1 prior to applying hash
+         */
+        do {
+            for (scan = base; scan < end && *scan < 0xC0; ++scan)
+                ;
+            if (scan != base) MD5Update(ctx, base, scan - base);
+            if (scan + 1 >= end) break;
+            cbuf = ((scan[0] & 0x3) << 6) | (scan[1] & 0x3f);
+            MD5Update(ctx, &cbuf, 1);
+
+
+
+Leach & Newman              Standards Track                    [Page 25]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+            base = scan + 2;
+        } while (base < end);
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 26]
+

+RFC 2831                 Digest SASL Mechanism                  May 2000
+
+
+9  Full Copyright Statement
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Leach & Newman              Standards Track                    [Page 27]
+

diff --git a/doc/rfc2945.txt b/doc/rfc2945.txt
new file mode 100644
index 0000000..983c441
--- /dev/null
+++ b/doc/rfc2945.txt
@@ -0,0 +1,451 @@
+
+
+
+
+
+
+Network Working Group                                              T. Wu
+Request for Comments: 2945                           Stanford University
+Category: Standards Track                                 September 2000
+
+
+             The SRP Authentication and Key Exchange System
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+Abstract
+
+   This document describes a cryptographically strong network
+   authentication mechanism known as the Secure Remote Password (SRP)
+   protocol.  This mechanism is suitable for negotiating secure
+   connections using a user-supplied password, while eliminating the
+   security problems traditionally associated with reusable passwords.
+   This system also performs a secure key exchange in the process of
+   authentication, allowing security layers (privacy and/or integrity
+   protection) to be enabled during the session.  Trusted key servers
+   and certificate infrastructures are not required, and clients are not
+   required to store or manage any long-term keys.  SRP offers both
+   security and deployment advantages over existing challenge-response
+   techniques, making it an ideal drop-in replacement where secure
+   password authentication is needed.
+
+1. Introduction
+
+   The lack of a secure authentication mechanism that is also easy to
+   use has been a long-standing problem with the vast majority of
+   Internet protocols currently in use.  The problem is two-fold: Users
+   like to use passwords that they can remember, but most password-based
+   authentication systems offer little protection against even passive
+   attackers, especially if weak and easily-guessed passwords are used.
+
+   Eavesdropping on a TCP/IP network can be carried out very easily and
+   very effectively against protocols that transmit passwords in the
+   clear.  Even so-called "challenge-response" techniques like the one
+   described in [RFC 2095] and [RFC 1760], which are designed to defeat
+
+
+
+Wu                          Standards Track                     [Page 1]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+   simple sniffing attacks, can be compromised by what is known as a
+   "dictionary attack".  This occurs when an attacker captures the
+   messages exchanged during a legitimate run of the protocol and uses
+   that information to verify a series of guessed passwords taken from a
+   precompiled "dictionary" of common passwords.  This works because
+   users often choose simple, easy-to-remember passwords, which
+   invariably are also easy to guess.
+
+   Many existing mechanisms also require the password database on the
+   host to be kept secret because the password P or some private hash
+   h(P) is stored there and would compromise security if revealed.  That
+   approach often degenerates into "security through obscurity" and goes
+   against the UNIX convention of keeping a "public" password file whose
+   contents can be revealed without destroying system security.
+
+   SRP meets the strictest requirements laid down in [RFC 1704] for a
+   non-disclosing authentication protocol.  It offers complete
+   protection against both passive and active attacks, and accomplishes
+   this efficiently using a single Diffie-Hellman-style round of
+   computation, making it feasible to use in both interactive and non-
+   interactive authentication for a wide range of Internet protocols.
+   Since it retains its security when used with low-entropy passwords,
+   it can be seamlessly integrated into existing user applications.
+
+2. Conventions and Terminology
+
+   The protocol described by this document is sometimes referred to as
+   "SRP-3" for historical purposes.  This particular protocol is
+   described in [SRP] and is believed to have very good logical and
+   cryptographic resistance to both eavesdropping and active attacks.
+
+   This document does not attempt to describe SRP in the context of any
+   particular Internet protocol; instead it describes an abstract
+   protocol that can be easily fitted to a particular application.  For
+   example, the specific format of messages (including padding) is not
+   specified.  Those issues have been left to the protocol implementor
+   to decide.
+
+   The one implementation issue worth specifying here is the mapping
+   between strings and integers.  Internet protocols are byte-oriented,
+   while SRP performs algebraic operations on its messages, so it is
+   logical to define at least one method by which integers can be
+   converted into a string of bytes and vice versa.
+
+   An n-byte string S can be converted to an integer as follows:
+
+   i = S[n-1] + 256 * S[n-2] + 256^2 * S[n-3] + ... + 256^(n-1) * S[0]
+
+
+
+
+Wu                          Standards Track                     [Page 2]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+   where i is the integer and S[x] is the value of the x'th byte of S.
+   In human terms, the string of bytes is the integer expressed in base
+   256, with the most significant digit first.  When converting back to
+   a string, S[0] must be non-zero (padding is considered to be a
+   separate, independent process).  This conversion method is suitable
+   for file storage, in-memory representation, and network transmission
+   of large integer values.  Unless otherwise specified, this mapping
+   will be assumed.
+
+   If implementations require padding a string that represents an
+   integer value, it is recommended that they use zero bytes and add
+   them to the beginning of the string.  The conversion back to integer
+   automatically discards leading zero bytes, making this padding scheme
+   less prone to error.
+
+   The SHA hash function, when used in this document, refers to the
+   SHA-1 message digest algorithm described in [SHA1].
+
+3. The SRP-SHA1 mechanism
+
+   This section describes an implementation of the SRP authentication
+   and key-exchange protocol that employs the SHA hash function to
+   generate session keys and authentication proofs.
+
+   The host stores user passwords as triplets of the form
+
+        { <username>, <password verifier>, <salt> }
+
+   Password entries are generated as follows:
+
+        <salt> = random()
+        x = SHA(<salt> | SHA(<username> | ":" | <raw password>))
+        <password verifier> = v = g^x % N
+
+   The | symbol indicates string concatenation, the ^ operator is the
+   exponentiation operation, and the % operator is the integer remainder
+   operation.  Most implementations perform the exponentiation and
+   remainder in a single stage to avoid generating unwieldy intermediate
+   results.  Note that the 160-bit output of SHA is implicitly converted
+   to an integer before it is operated upon.
+
+   Authentication is generally initiated by the client.
+
+      Client                             Host
+     --------                           ------
+      U = <username>              -->
+                                     <--    s = <salt from passwd file>
+
+
+
+
+Wu                          Standards Track                     [Page 3]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+   Upon identifying himself to the host, the client will receive the
+   salt stored on the host under his username.
+
+      a = random()
+      A = g^a % N                 -->
+                                         v = <stored password verifier>
+                                         b = random()
+                                  <--    B = (v + g^b) % N
+
+      p = <raw password>
+      x = SHA(s | SHA(U | ":" | p))
+
+      S = (B - g^x) ^ (a + u * x) % N    S = (A * v^u) ^ b % N
+      K = SHA_Interleave(S)              K = SHA_Interleave(S)
+      (this function is described
+       in the next section)
+
+   The client generates a random number, raises g to that power modulo
+   the field prime, and sends the result to the host.  The host does the
+   same thing and also adds the public verifier before sending it to the
+   client.  Both sides then construct the shared session key based on
+   the respective formulae.
+
+   The parameter u is a 32-bit unsigned integer which takes its value
+   from the first 32 bits of the SHA1 hash of B, MSB first.
+
+   The client MUST abort authentication if B % N is zero.
+
+   The host MUST abort the authentication attempt if A % N is zero.  The
+   host MUST send B after receiving A from the client, never before.
+
+   At this point, the client and server should have a common session key
+   that is secure (i.e. not known to an outside party).  To finish
+   authentication, they must prove to each other that their keys are
+   identical.
+
+        M = H(H(N) XOR H(g) | H(U) | s | A | B | K)
+                                    -->
+                                    <--    H(A | M | K)
+
+   The server will calculate M using its own K and compare it against
+   the client's response.  If they do not match, the server MUST abort
+   and signal an error before it attempts to answer the client's
+   challenge.  Not doing so could compromise the security of the user's
+   password.
+
+
+
+
+
+
+Wu                          Standards Track                     [Page 4]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+   If the server receives a correct response, it issues its own proof to
+   the client.  The client will compute the expected response using its
+   own K to verify the authenticity of the server.  If the client
+   responded correctly, the server MUST respond with its hash value.
+
+   The transactions in this protocol description do not necessarily have
+   a one-to-one correspondence with actual protocol messages.  This
+   description is only intended to illustrate the relationships between
+   the different parameters and how they are computed.  It is possible,
+   for example, for an implementation of the SRP-SHA1 mechanism to
+   consolidate some of the flows as follows:
+
+        Client                             Host
+       --------                           ------
+        U, A                        -->
+                                    <--    s, B
+        H(H(N) XOR H(g) | H(U) | s | A | B | K)
+                                    -->
+                                    <--    H(A | M | K)
+
+   The values of N and g used in this protocol must be agreed upon by
+   the two parties in question.  They can be set in advance, or the host
+   can supply them to the client.  In the latter case, the host should
+   send the parameters in the first message along with the salt.  For
+   maximum security, N should be a safe prime (i.e. a number of the form
+   N = 2q + 1, where q is also prime).  Also, g should be a generator
+   modulo N (see [SRP] for details), which means that for any X where 0
+   < X < N, there exists a value x for which g^x % N == X.
+
+3.1.  Interleaved SHA
+
+   The SHA_Interleave function used in SRP-SHA1 is used to generate a
+   session key that is twice as long as the 160-bit output of SHA1.  To
+   compute this function, remove all leading zero bytes from the input.
+   If the length of the resulting string is odd, also remove the first
+   byte.  Call the resulting string T.  Extract the even-numbered bytes
+   into a string E and the odd-numbered bytes into a string F, i.e.
+
+     E = T[0] | T[2] | T[4] | ...
+     F = T[1] | T[3] | T[5] | ...
+
+   Both E and F should be exactly half the length of T.  Hash each one
+   with regular SHA1, i.e.
+
+     G = SHA(E)
+     H = SHA(F)
+
+
+
+
+
+Wu                          Standards Track                     [Page 5]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+   Interleave the two hashes back together to form the output, i.e.
+
+     result = G[0] | H[0] | G[1] | H[1] | ... | G[19] | H[19]
+
+   The result will be 40 bytes (320 bits) long.
+
+3.2.  Other Hash Algorithms
+
+   SRP can be used with hash functions other than SHA.  If the hash
+   function produces an output of a different length than SHA (20
+   bytes), it may change the length of some of the messages in the
+   protocol, but the fundamental operation will be unaffected.
+
+   Earlier versions of the SRP mechanism used the MD5 hash function,
+   described in [RFC 1321].  Keyed hash transforms are also recommended
+   for use with SRP; one possible construction uses HMAC [RFC 2104],
+   using K to key the hash in each direction instead of concatenating it
+   with the other parameters.
+
+   Any hash function used with SRP should produce an output of at least
+   16 bytes and have the property that small changes in the input cause
+   significant nonlinear changes in the output.  [SRP] covers these
+   issues in more depth.
+
+4. Security Considerations
+
+   This entire memo discusses an authentication and key-exchange system
+   that protects passwords and exchanges keys across an untrusted
+   network.  This system improves security by eliminating the need to
+   send cleartext passwords over the network and by enabling encryption
+   through its secure key-exchange mechanism.
+
+   The private values for a and b correspond roughly to the private
+   values in a Diffie-Hellman exchange and have similar constraints of
+   length and entropy.  Implementations may choose to increase the
+   length of the parameter u, as long as both client and server agree,
+   but it is not recommended that it be shorter than 32 bits.
+
+   SRP has been designed not only to counter the threat of casual
+   password-sniffing, but also to prevent a determined attacker equipped
+   with a dictionary of passwords from guessing at passwords using
+   captured network traffic.  The SRP protocol itself also resists
+   active network attacks, and implementations can use the securely
+   exchanged keys to protect the session against hijacking and provide
+   confidentiality.
+
+
+
+
+
+
+Wu                          Standards Track                     [Page 6]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+   SRP also has the added advantage of permitting the host to store
+   passwords in a form that is not directly useful to an attacker.  Even
+   if the host's password database were publicly revealed, the attacker
+   would still need an expensive dictionary search to obtain any
+   passwords.  The exponential computation required to validate a guess
+   in this case is much more time-consuming than the hash currently used
+   by most UNIX systems.  Hosts are still advised, though, to try their
+   best to keep their password files secure.
+
+5. References
+
+   [RFC 1321]  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
+               April 1992.
+
+   [RFC 1704]  Haller, N. and R. Atkinson, "On Internet Authentication",
+               RFC 1704, October 1994.
+
+   [RFC 1760]  Haller, N., "The S/Key One-Time Password System", RFC
+               1760, Feburary 1995.
+
+   [RFC 2095]  Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
+               AUTHorize Extension for Simple Challenge/Response", RFC
+               2095, January 1997.
+
+   [RFC 2104]  Krawczyk, H., Bellare, M. and  R. Canetti, "HMAC: Keyed-
+               Hashing for Message Authentication", RFC 2104, February
+               1997.
+
+   [SHA1]      National Institute of Standards and Technology (NIST),
+               "Announcing the Secure Hash Standard", FIPS 180-1, U.S.
+               Department of Commerce, April 1995.
+
+   [SRP]       T. Wu, "The Secure Remote Password Protocol", In
+               Proceedings of the 1998 Internet Society Symposium on
+               Network and Distributed Systems Security, San Diego, CA,
+               pp. 97-111.
+
+6. Author's Address
+
+   Thomas Wu
+   Stanford University
+   Stanford, CA 94305
+
+   EMail: tjw at cs.Stanford.EDU
+
+
+
+
+
+
+
+Wu                          Standards Track                     [Page 7]
+

+RFC 2945        SRP Authentication & Key Exchange System  September 2000
+
+
+7.  Full Copyright Statement
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Wu                          Standards Track                     [Page 8]
+

diff --git a/doc/rfc3174.txt b/doc/rfc3174.txt
new file mode 100644
index 0000000..ebe515d
--- /dev/null
+++ b/doc/rfc3174.txt
@@ -0,0 +1,1235 @@
+
+
+
+
+
+
+Network Working Group                                   D. Eastlake, 3rd
+Request for Comments: 3174                                      Motorola
+Category: Informational                                         P. Jones
+                                                           Cisco Systems
+                                                          September 2001
+
+
+                   US Secure Hash Algorithm 1 (SHA1)
+
+Status of this Memo
+
+   This memo provides information for the Internet community.  It does
+   not specify an Internet standard of any kind.  Distribution of this
+   memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2001).  All Rights Reserved.
+
+Abstract
+
+   The purpose of this document is to make the SHA-1 (Secure Hash
+   Algorithm 1) hash algorithm conveniently available to the Internet
+   community.  The United States of America has adopted the SHA-1 hash
+   algorithm described herein as a Federal Information Processing
+   Standard.  Most of the text herein was taken by the authors from FIPS
+   180-1.  Only the C code implementation is "original".
+
+Acknowledgements
+
+   Most of the text herein was taken from [FIPS 180-1].  Only the C code
+   implementation is "original" but its style is similar to the
+   previously published MD4 and MD5 RFCs [RFCs 1320, 1321].
+
+   The SHA-1 is based on principles similar to those used by Professor
+   Ronald L. Rivest of MIT when designing the MD4 message digest
+   algorithm [MD4] and is modeled after that algorithm [RFC 1320].
+
+   Useful comments from the following, which have been incorporated
+   herein, are gratefully acknowledged:
+
+      Tony Hansen
+      Garrett Wollman
+
+
+
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 1]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+Table of Contents
+
+   1. Overview of Contents...........................................  2
+   2. Definitions of Bit Strings and Integers........................  3
+   3. Operations on Words............................................  3
+   4. Message Padding................................................  4
+   5. Functions and Constants Used...................................  6
+   6. Computing the Message Digest...................................  6
+   6.1 Method 1......................................................  6
+   6.2 Method 2......................................................  7
+   7. C Code.........................................................  8
+   7.1 .h file.......................................................  8
+   7.2 .c file....................................................... 10
+   7.3 Test Driver................................................... 18
+   8. Security Considerations........................................ 20
+   References........................................................ 21
+   Authors' Addresses................................................ 21
+   Full Copyright Statement.......................................... 22
+
+1. Overview of Contents
+
+   NOTE: The text below is mostly taken from [FIPS 180-1] and assertions
+   therein of the security of SHA-1 are made by the US Government, the
+   author of [FIPS 180-1], and not by the authors of this document.
+
+   This document specifies a Secure Hash Algorithm, SHA-1, for computing
+   a condensed representation of a message or a data file.  When a
+   message of any length < 2^64 bits is input, the SHA-1 produces a
+   160-bit output called a message digest.  The message digest can then,
+   for example, be input to a signature algorithm which generates or
+   verifies the signature for the message.  Signing the message digest
+   rather than the message often improves the efficiency of the process
+   because the message digest is usually much smaller in size than the
+   message.  The same hash algorithm must be used by the verifier of a
+   digital signature as was used by the creator of the digital
+   signature.  Any change to the message in transit will, with very high
+   probability, result in a different message digest, and the signature
+   will fail to verify.
+
+   The SHA-1 is called secure because it is computationally infeasible
+   to find a message which corresponds to a given message digest, or to
+   find two different messages which produce the same message digest.
+   Any change to a message in transit will, with very high probability,
+   result in a different message digest, and the signature will fail to
+   verify.
+
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 2]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+   Section 2 below defines the terminology and functions used as
+   building blocks to form SHA-1.
+
+2. Definitions of Bit Strings and Integers
+
+   The following terminology related to bit strings and integers will be
+   used:
+
+   a. A hex digit is an element of the set {0, 1, ... , 9, A, ... , F}.
+      A hex digit is the representation of a 4-bit string.  Examples:  7
+      = 0111, A = 1010.
+
+   b. A word equals a 32-bit string which may be represented as a
+      sequence of 8 hex digits.  To convert a word to 8 hex digits each
+      4-bit string is converted to its hex equivalent as described in
+      (a) above.  Example:
+
+      1010 0001 0000 0011 1111 1110 0010 0011 = A103FE23.
+
+   c. An integer between 0 and 2^32 - 1 inclusive may be represented as
+      a word.  The least significant four bits of the integer are
+      represented by the right-most hex digit of the word
+      representation.  Example: the integer 291 = 2^8+2^5+2^1+2^0 =
+      256+32+2+1 is represented by the hex word, 00000123.
+
+      If z is an integer, 0 <= z < 2^64, then z = (2^32)x + y where 0 <=
+      x < 2^32 and 0 <= y < 2^32.  Since x and y can be represented as
+      words X and Y, respectively, z can be represented as the pair of
+      words (X,Y).
+
+   d. block = 512-bit string.  A block (e.g., B) may be represented as a
+      sequence of 16 words.
+
+3. Operations on Words
+
+   The following logical operators will be applied to words:
+
+   a. Bitwise logical word operations
+
+      X AND Y  =  bitwise logical "and" of  X and Y.
+
+      X OR Y   =  bitwise logical "inclusive-or" of X and Y.
+
+      X XOR Y  =  bitwise logical "exclusive-or" of X and Y.
+
+      NOT X    =  bitwise logical "complement" of X.
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 3]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+      Example:
+
+               01101100101110011101001001111011
+         XOR   01100101110000010110100110110111
+               --------------------------------
+           =   00001001011110001011101111001100
+
+   b. The operation X + Y is defined as follows:  words X and Y
+      represent integers x and y, where 0 <= x < 2^32 and 0 <= y < 2^32.
+      For positive integers n and m, let n mod m be the remainder upon
+      dividing n by m.  Compute
+
+         z  =  (x + y) mod 2^32.
+
+      Then 0 <= z < 2^32.  Convert z to a word,  Z, and define Z = X +
+      Y.
+
+   c. The circular left shift operation S^n(X), where X is a word and n
+      is an integer with 0 <= n < 32, is defined by
+
+         S^n(X)  =  (X << n) OR (X >> 32-n).
+
+      In the above, X << n is obtained as follows: discard the left-most
+      n bits of X and then pad the result with n zeroes on the right
+      (the result will still be 32 bits).  X >> n is obtained by
+      discarding the right-most n bits of X and then padding the result
+      with n zeroes on the left.  Thus S^n(X) is equivalent to a
+      circular shift of X by n positions to the left.
+
+4. Message Padding
+
+   SHA-1 is used to compute a message digest for a message or data file
+   that is provided as input.  The message or data file should be
+   considered to be a bit string.  The length of the message is the
+   number of bits in the message (the empty message has length 0).  If
+   the number of bits in a message is a multiple of 8, for compactness
+   we can represent the message in hex.  The purpose of message padding
+   is to make the total length of a padded message a multiple of 512.
+   SHA-1 sequentially processes blocks of 512 bits when computing the
+   message digest.  The following specifies how this padding shall be
+   performed.  As a summary, a "1" followed by m "0"s followed by a 64-
+   bit integer are appended to the end of the message to produce a
+   padded message of length 512 * n.  The 64-bit integer is the length
+   of the original message.  The padded message is then processed by the
+   SHA-1 as n 512-bit blocks.
+
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 4]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+   Suppose a message has length l < 2^64.  Before it is input to the
+   SHA-1, the message is padded on the right as follows:
+
+   a. "1" is appended.  Example: if the original message is "01010000",
+      this is padded to "010100001".
+
+   b. "0"s are appended.  The number of "0"s will depend on the original
+      length of the message.  The last 64 bits of the last 512-bit block
+      are reserved
+
+      for the length l of the original message.
+
+      Example:  Suppose the original message is the bit string
+
+         01100001 01100010 01100011 01100100 01100101.
+
+      After step (a) this gives
+
+         01100001 01100010 01100011 01100100 01100101 1.
+
+      Since l = 40, the number of bits in the above is 41 and 407 "0"s
+      are appended, making the total now 448.  This gives (in hex)
+
+         61626364 65800000 00000000 00000000
+         00000000 00000000 00000000 00000000
+         00000000 00000000 00000000 00000000
+         00000000 00000000.
+
+   c. Obtain the 2-word representation of l, the number of bits in the
+      original message.  If l < 2^32 then the first word is all zeroes.
+      Append these two words to the padded message.
+
+      Example: Suppose the original message is as in (b).  Then l = 40
+      (note that l is computed before any padding).  The two-word
+      representation of 40 is hex 00000000 00000028.  Hence the final
+      padded message is hex
+
+         61626364 65800000 00000000 00000000
+         00000000 00000000 00000000 00000000
+         00000000 00000000 00000000 00000000
+         00000000 00000000 00000000 00000028.
+
+      The padded message will contain 16 * n words for some n > 0.
+      The padded message is regarded as a sequence of n blocks M(1) ,
+      M(2), first characters (or bits) of the message.
+
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 5]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+5. Functions and Constants Used
+
+   A sequence of logical functions f(0), f(1),..., f(79) is used in
+   SHA-1.  Each f(t), 0 <= t <= 79, operates on three 32-bit words B, C,
+   D and produces a 32-bit word as output.  f(t;B,C,D) is defined as
+   follows: for words B, C, D,
+
+      f(t;B,C,D) = (B AND C) OR ((NOT B) AND D)         ( 0 <= t <= 19)
+
+      f(t;B,C,D) = B XOR C XOR D                        (20 <= t <= 39)
+
+      f(t;B,C,D) = (B AND C) OR (B AND D) OR (C AND D)  (40 <= t <= 59)
+
+      f(t;B,C,D) = B XOR C XOR D                        (60 <= t <= 79).
+
+   A sequence of constant words K(0), K(1), ... , K(79) is used in the
+   SHA-1.  In hex these are given by
+
+      K(t) = 5A827999         ( 0 <= t <= 19)
+
+      K(t) = 6ED9EBA1         (20 <= t <= 39)
+
+      K(t) = 8F1BBCDC         (40 <= t <= 59)
+
+      K(t) = CA62C1D6         (60 <= t <= 79).
+
+6. Computing the Message Digest
+
+   The methods given in 6.1 and 6.2 below yield the same message digest.
+   Although using method 2 saves sixty-four 32-bit words of storage, it
+   is likely to lengthen execution time due to the increased complexity
+   of the address computations for the { W[t] } in step (c).  There are
+   other computation methods which give identical results.
+
+6.1 Method 1
+
+   The message digest is computed using the message padded as described
+   in section 4.  The computation is described using two buffers, each
+   consisting of five 32-bit words, and a sequence of eighty 32-bit
+   words.  The words of the first 5-word buffer are labeled A,B,C,D,E.
+   The words of the second 5-word buffer are labeled H0, H1, H2, H3, H4.
+   The words of the 80-word sequence are labeled W(0), W(1),..., W(79).
+   A single word buffer TEMP is also employed.
+
+   To generate the message digest, the 16-word blocks M(1), M(2),...,
+   M(n) defined in section 4 are processed in order.  The processing of
+   each M(i) involves 80 steps.
+
+
+
+
+Eastlake & Jones             Informational                      [Page 6]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+   Before processing any blocks, the H's are initialized as follows: in
+   hex,
+
+      H0 = 67452301
+
+      H1 = EFCDAB89
+
+      H2 = 98BADCFE
+
+      H3 = 10325476
+
+      H4 = C3D2E1F0.
+
+   Now M(1), M(2), ... , M(n) are processed.  To process M(i), we
+   proceed as follows:
+
+      a. Divide M(i) into 16 words W(0), W(1), ... , W(15), where W(0)
+         is the left-most word.
+
+      b. For t = 16 to 79 let
+
+         W(t) = S^1(W(t-3) XOR W(t-8) XOR W(t-14) XOR W(t-16)).
+
+      c. Let A = H0, B = H1, C = H2, D = H3, E = H4.
+
+      d. For t = 0 to 79 do
+
+         TEMP = S^5(A) + f(t;B,C,D) + E + W(t) + K(t);
+
+         E = D;  D = C;  C = S^30(B);  B = A; A = TEMP;
+
+      e. Let H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4
+         + E.
+
+   After processing M(n), the message digest is the 160-bit string
+   represented by the 5 words
+
+         H0 H1 H2 H3 H4.
+
+6.2 Method 2
+
+   The method above assumes that the sequence W(0), ... , W(79) is
+   implemented as an array of eighty 32-bit words.  This is efficient
+   from the standpoint of minimization of execution time, since the
+   addresses of W(t-3), ...  ,W(t-16) in step (b) are easily computed.
+   If space is at a premium, an alternative is to regard { W(t) } as a
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 7]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+   circular queue, which may be implemented using an array of sixteen
+   32-bit words W[0], ... W[15].  In this case, in hex let
+
+   MASK = 0000000F.  Then processing of M(i) is as follows:
+
+      a. Divide M(i) into 16 words W[0], ... , W[15], where W[0] is the
+         left-most word.
+
+      b. Let A = H0, B = H1, C = H2, D = H3, E = H4.
+
+      c. For t = 0 to 79 do
+
+         s = t AND MASK;
+
+         if (t >= 16) W[s] = S^1(W[(s + 13) AND MASK] XOR W[(s + 8) AND
+         MASK] XOR W[(s + 2) AND MASK] XOR W[s]);
+
+         TEMP = S^5(A) + f(t;B,C,D) + E + W[s] + K(t);
+
+         E = D; D = C; C = S^30(B); B = A; A = TEMP;
+
+      d. Let H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4
+         + E.
+
+7. C Code
+
+   Below is a demonstration implementation of SHA-1 in C.  Section 7.1
+   contains the header file, 7.2 the C code, and 7.3 a test driver.
+
+7.1 .h file
+
+/*
+ *  sha1.h
+ *
+ *  Description:
+ *      This is the header file for code which implements the Secure
+ *      Hashing Algorithm 1 as defined in FIPS PUB 180-1 published
+ *      April 17, 1995.
+ *
+ *      Many of the variable names in this code, especially the
+ *      single character names, were used because those were the names
+ *      used in the publication.
+ *
+ *      Please read the file sha1.c for more information.
+ *
+ */
+
+
+
+
+
+Eastlake & Jones             Informational                      [Page 8]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+#ifndef _SHA1_H_
+#define _SHA1_H_
+
+#include <stdint.h>
+/*
+ * If you do not have the ISO standard stdint.h header file, then you
+ * must typdef the following:
+ *    name              meaning
+ *  uint32_t         unsigned 32 bit integer
+ *  uint8_t          unsigned 8 bit integer (i.e., unsigned char)
+ *  int_least16_t    integer of >= 16 bits
+ *
+ */
+
+#ifndef _SHA_enum_
+#define _SHA_enum_
+enum
+{
+    shaSuccess = 0,
+    shaNull,            /* Null pointer parameter */
+    shaInputTooLong,    /* input data too long */
+    shaStateError       /* called Input after Result */
+};
+#endif
+#define SHA1HashSize 20
+
+/*
+ *  This structure will hold context information for the SHA-1
+ *  hashing operation
+ */
+typedef struct SHA1Context
+{
+    uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest  */
+
+    uint32_t Length_Low;            /* Message length in bits      */
+    uint32_t Length_High;           /* Message length in bits      */
+
+                               /* Index into message block array   */
+    int_least16_t Message_Block_Index;
+    uint8_t Message_Block[64];      /* 512-bit message blocks      */
+
+    int Computed;               /* Is the digest computed?         */
+    int Corrupted;             /* Is the message digest corrupted? */
+} SHA1Context;
+
+/*
+ *  Function Prototypes
+ */
+
+
+
+Eastlake & Jones             Informational                      [Page 9]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+int SHA1Reset(  SHA1Context *);
+int SHA1Input(  SHA1Context *,
+                const uint8_t *,
+                unsigned int);
+int SHA1Result( SHA1Context *,
+                uint8_t Message_Digest[SHA1HashSize]);
+
+#endif
+
+7.2 .c file
+
+/*
+ *  sha1.c
+ *
+ *  Description:
+ *      This file implements the Secure Hashing Algorithm 1 as
+ *      defined in FIPS PUB 180-1 published April 17, 1995.
+ *
+ *      The SHA-1, produces a 160-bit message digest for a given
+ *      data stream.  It should take about 2**n steps to find a
+ *      message with the same digest as a given message and
+ *      2**(n/2) to find any two messages with the same digest,
+ *      when n is the digest size in bits.  Therefore, this
+ *      algorithm can serve as a means of providing a
+ *      "fingerprint" for a message.
+ *
+ *  Portability Issues:
+ *      SHA-1 is defined in terms of 32-bit "words".  This code
+ *      uses <stdint.h> (included via "sha1.h" to define 32 and 8
+ *      bit unsigned integer types.  If your C compiler does not
+ *      support 32 bit unsigned integers, this code is not
+ *      appropriate.
+ *
+ *  Caveats:
+ *      SHA-1 is designed to work with messages less than 2^64 bits
+ *      long.  Although SHA-1 allows a message digest to be generated
+ *      for messages of any number of bits less than 2^64, this
+ *      implementation only works with messages with a length that is
+ *      a multiple of the size of an 8-bit character.
+ *
+ */
+
+
+
+
+
+
+
+
+
+
+Eastlake & Jones             Informational                     [Page 10]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+#include "sha1.h"
+
+/*
+ *  Define the SHA1 circular left shift macro
+ */
+#define SHA1CircularShift(bits,word) \
+                (((word) << (bits)) | ((word) >> (32-(bits))))
+
+/* Local Function Prototyptes */
+void SHA1PadMessage(SHA1Context *);
+void SHA1ProcessMessageBlock(SHA1Context *);
+
+/*
+ *  SHA1Reset
+ *
+ *  Description:
+ *      This function will initialize the SHA1Context in preparation
+ *      for computing a new SHA1 message digest.
+ *
+ *  Parameters:
+ *      context: [in/out]
+ *          The context to reset.
+ *
+ *  Returns:
+ *      sha Error Code.
+ *
+ */
+int SHA1Reset(SHA1Context *context)
+{
+    if (!context)
+    {
+        return shaNull;
+    }
+
+    context->Length_Low             = 0;
+    context->Length_High            = 0;
+    context->Message_Block_Index    = 0;
+
+    context->Intermediate_Hash[0]   = 0x67452301;
+    context->Intermediate_Hash[1]   = 0xEFCDAB89;
+    context->Intermediate_Hash[2]   = 0x98BADCFE;
+    context->Intermediate_Hash[3]   = 0x10325476;
+    context->Intermediate_Hash[4]   = 0xC3D2E1F0;
+
+    context->Computed   = 0;
+    context->Corrupted  = 0;
+
+
+
+
+
+Eastlake & Jones             Informational                     [Page 11]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+    return shaSuccess;
+}
+
+/*
+ *  SHA1Result
+ *
+ *  Description:
+ *      This function will return the 160-bit message digest into the
+ *      Message_Digest array  provided by the caller.
+ *      NOTE: The first octet of hash is stored in the 0th element,
+ *            the last octet of hash in the 19th element.
+ *
+ *  Parameters:
+ *      context: [in/out]
+ *          The context to use to calculate the SHA-1 hash.
+ *      Message_Digest: [out]
+ *          Where the digest is returned.
+ *
+ *  Returns:
+ *      sha Error Code.
+ *
+ */
+int SHA1Result( SHA1Context *context,
+                uint8_t Message_Digest[SHA1HashSize])
+{
+    int i;
+
+    if (!context || !Message_Digest)
+    {
+        return shaNull;
+    }
+
+    if (context->Corrupted)
+    {
+        return context->Corrupted;
+    }
+
+    if (!context->Computed)
+    {
+        SHA1PadMessage(context);
+        for(i=0; i<64; ++i)
+        {
+            /* message may be sensitive, clear it out */
+            context->Message_Block[i] = 0;
+        }
+        context->Length_Low = 0;    /* and clear length */
+        context->Length_High = 0;
+        context->Computed = 1;
+
+
+
+Eastlake & Jones             Informational                     [Page 12]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+    }
+
+    for(i = 0; i < SHA1HashSize; ++i)
+    {
+        Message_Digest[i] = context->Intermediate_Hash[i>>2]
+                            >> 8 * ( 3 - ( i & 0x03 ) );
+    }
+
+    return shaSuccess;
+}
+
+/*
+ *  SHA1Input
+ *
+ *  Description:
+ *      This function accepts an array of octets as the next portion
+ *      of the message.
+ *
+ *  Parameters:
+ *      context: [in/out]
+ *          The SHA context to update
+ *      message_array: [in]
+ *          An array of characters representing the next portion of
+ *          the message.
+ *      length: [in]
+ *          The length of the message in message_array
+ *
+ *  Returns:
+ *      sha Error Code.
+ *
+ */
+int SHA1Input(    SHA1Context    *context,
+                  const uint8_t  *message_array,
+                  unsigned       length)
+{
+    if (!length)
+    {
+        return shaSuccess;
+    }
+
+    if (!context || !message_array)
+    {
+        return shaNull;
+    }
+
+    if (context->Computed)
+    {
+        context->Corrupted = shaStateError;
+
+
+
+Eastlake & Jones             Informational                     [Page 13]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+        return shaStateError;
+    }
+
+    if (context->Corrupted)
+    {
+         return context->Corrupted;
+    }
+    while(length-- && !context->Corrupted)
+    {
+    context->Message_Block[context->Message_Block_Index++] =
+                    (*message_array & 0xFF);
+
+    context->Length_Low += 8;
+    if (context->Length_Low == 0)
+    {
+        context->Length_High++;
+        if (context->Length_High == 0)
+        {
+            /* Message is too long */
+            context->Corrupted = 1;
+        }
+    }
+
+    if (context->Message_Block_Index == 64)
+    {
+        SHA1ProcessMessageBlock(context);
+    }
+
+    message_array++;
+    }
+
+    return shaSuccess;
+}
+
+/*
+ *  SHA1ProcessMessageBlock
+ *
+ *  Description:
+ *      This function will process the next 512 bits of the message
+ *      stored in the Message_Block array.
+ *
+ *  Parameters:
+ *      None.
+ *
+ *  Returns:
+ *      Nothing.
+ *
+ *  Comments:
+
+
+
+Eastlake & Jones             Informational                     [Page 14]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+ *      Many of the variable names in this code, especially the
+ *      single character names, were used because those were the
+ *      names used in the publication.
+ *
+ *
+ */
+void SHA1ProcessMessageBlock(SHA1Context *context)
+{
+    const uint32_t K[] =    {       /* Constants defined in SHA-1   */
+                            0x5A827999,
+                            0x6ED9EBA1,
+                            0x8F1BBCDC,
+                            0xCA62C1D6
+                            };
+    int           t;                 /* Loop counter                */
+    uint32_t      temp;              /* Temporary word value        */
+    uint32_t      W[80];             /* Word sequence               */
+    uint32_t      A, B, C, D, E;     /* Word buffers                */
+
+    /*
+     *  Initialize the first 16 words in the array W
+     */
+    for(t = 0; t < 16; t++)
+    {
+        W[t] = context->Message_Block[t * 4] << 24;
+        W[t] |= context->Message_Block[t * 4 + 1] << 16;
+        W[t] |= context->Message_Block[t * 4 + 2] << 8;
+        W[t] |= context->Message_Block[t * 4 + 3];
+    }
+
+    for(t = 16; t < 80; t++)
+    {
+       W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
+    }
+
+    A = context->Intermediate_Hash[0];
+    B = context->Intermediate_Hash[1];
+    C = context->Intermediate_Hash[2];
+    D = context->Intermediate_Hash[3];
+    E = context->Intermediate_Hash[4];
+
+    for(t = 0; t < 20; t++)
+    {
+        temp =  SHA1CircularShift(5,A) +
+                ((B & C) | ((~B) & D)) + E + W[t] + K[0];
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+
+
+
+Eastlake & Jones             Informational                     [Page 15]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+        B = A;
+        A = temp;
+    }
+
+    for(t = 20; t < 40; t++)
+    {
+        temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    for(t = 40; t < 60; t++)
+    {
+        temp = SHA1CircularShift(5,A) +
+               ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    for(t = 60; t < 80; t++)
+    {
+        temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    context->Intermediate_Hash[0] += A;
+    context->Intermediate_Hash[1] += B;
+    context->Intermediate_Hash[2] += C;
+    context->Intermediate_Hash[3] += D;
+    context->Intermediate_Hash[4] += E;
+
+    context->Message_Block_Index = 0;
+}
+
+
+/*
+ *  SHA1PadMessage
+ *
+
+
+
+Eastlake & Jones             Informational                     [Page 16]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+ *  Description:
+ *      According to the standard, the message must be padded to an even
+ *      512 bits.  The first padding bit must be a '1'.  The last 64
+ *      bits represent the length of the original message.  All bits in
+ *      between should be 0.  This function will pad the message
+ *      according to those rules by filling the Message_Block array
+ *      accordingly.  It will also call the ProcessMessageBlock function
+ *      provided appropriately.  When it returns, it can be assumed that
+ *      the message digest has been computed.
+ *
+ *  Parameters:
+ *      context: [in/out]
+ *          The context to pad
+ *      ProcessMessageBlock: [in]
+ *          The appropriate SHA*ProcessMessageBlock function
+ *  Returns:
+ *      Nothing.
+ *
+ */
+
+void SHA1PadMessage(SHA1Context *context)
+{
+    /*
+     *  Check to see if the current message block is too small to hold
+     *  the initial padding bits and length.  If so, we will pad the
+     *  block, process it, and then continue padding into a second
+     *  block.
+     */
+    if (context->Message_Block_Index > 55)
+    {
+        context->Message_Block[context->Message_Block_Index++] = 0x80;
+        while(context->Message_Block_Index < 64)
+        {
+            context->Message_Block[context->Message_Block_Index++] = 0;
+        }
+
+        SHA1ProcessMessageBlock(context);
+
+        while(context->Message_Block_Index < 56)
+        {
+            context->Message_Block[context->Message_Block_Index++] = 0;
+        }
+    }
+    else
+    {
+        context->Message_Block[context->Message_Block_Index++] = 0x80;
+        while(context->Message_Block_Index < 56)
+        {
+
+
+
+Eastlake & Jones             Informational                     [Page 17]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+            context->Message_Block[context->Message_Block_Index++] = 0;
+        }
+    }
+
+    /*
+     *  Store the message length as the last 8 octets
+     */
+    context->Message_Block[56] = context->Length_High >> 24;
+    context->Message_Block[57] = context->Length_High >> 16;
+    context->Message_Block[58] = context->Length_High >> 8;
+    context->Message_Block[59] = context->Length_High;
+    context->Message_Block[60] = context->Length_Low >> 24;
+    context->Message_Block[61] = context->Length_Low >> 16;
+    context->Message_Block[62] = context->Length_Low >> 8;
+    context->Message_Block[63] = context->Length_Low;
+
+    SHA1ProcessMessageBlock(context);
+}
+
+7.3 Test Driver
+
+   The following code is a main program test driver to exercise the code
+   in sha1.c.
+
+/*
+ *  sha1test.c
+ *
+ *  Description:
+ *      This file will exercise the SHA-1 code performing the three
+ *      tests documented in FIPS PUB 180-1 plus one which calls
+ *      SHA1Input with an exact multiple of 512 bits, plus a few
+ *      error test checks.
+ *
+ *  Portability Issues:
+ *      None.
+ *
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include "sha1.h"
+
+/*
+ *  Define patterns for testing
+ */
+#define TEST1   "abc"
+#define TEST2a  "abcdbcdecdefdefgefghfghighijhi"
+
+
+
+Eastlake & Jones             Informational                     [Page 18]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+#define TEST2b  "jkijkljklmklmnlmnomnopnopq"
+#define TEST2   TEST2a TEST2b
+#define TEST3   "a"
+#define TEST4a  "01234567012345670123456701234567"
+#define TEST4b  "01234567012345670123456701234567"
+    /* an exact multiple of 512 bits */
+#define TEST4   TEST4a TEST4b
+char *testarray[4] =
+{
+    TEST1,
+    TEST2,
+    TEST3,
+    TEST4
+};
+long int repeatcount[4] = { 1, 1, 1000000, 10 };
+char *resultarray[4] =
+{
+    "A9 99 3E 36 47 06 81 6A BA 3E 25 71 78 50 C2 6C 9C D0 D8 9D",
+    "84 98 3E 44 1C 3B D2 6E BA AE 4A A1 F9 51 29 E5 E5 46 70 F1",
+    "34 AA 97 3C D4 C4 DA A4 F6 1E EB 2B DB AD 27 31 65 34 01 6F",
+    "DE A3 56 A2 CD DD 90 C7 A7 EC ED C5 EB B5 63 93 4F 46 04 52"
+};
+
+int main()
+{
+    SHA1Context sha;
+    int i, j, err;
+    uint8_t Message_Digest[20];
+
+    /*
+     *  Perform SHA-1 tests
+     */
+    for(j = 0; j < 4; ++j)
+    {
+        printf( "\nTest %d: %d, '%s'\n",
+                j+1,
+                repeatcount[j],
+                testarray[j]);
+
+        err = SHA1Reset(&sha);
+        if (err)
+        {
+            fprintf(stderr, "SHA1Reset Error %d.\n", err );
+            break;    /* out of for j loop */
+        }
+
+        for(i = 0; i < repeatcount[j]; ++i)
+        {
+
+
+
+Eastlake & Jones             Informational                     [Page 19]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+            err = SHA1Input(&sha,
+                  (const unsigned char *) testarray[j],
+                  strlen(testarray[j]));
+            if (err)
+            {
+                fprintf(stderr, "SHA1Input Error %d.\n", err );
+                break;    /* out of for i loop */
+            }
+        }
+
+        err = SHA1Result(&sha, Message_Digest);
+        if (err)
+        {
+            fprintf(stderr,
+            "SHA1Result Error %d, could not compute message digest.\n",
+            err );
+        }
+        else
+        {
+            printf("\t");
+            for(i = 0; i < 20 ; ++i)
+            {
+                printf("%02X ", Message_Digest[i]);
+            }
+            printf("\n");
+        }
+        printf("Should match:\n");
+        printf("\t%s\n", resultarray[j]);
+    }
+
+    /* Test some error returns */
+    err = SHA1Input(&sha,(const unsigned char *) testarray[1], 1);
+    printf ("\nError %d. Should be %d.\n", err, shaStateError );
+    err = SHA1Reset(0);
+    printf ("\nError %d. Should be %d.\n", err, shaNull );
+    return 0;
+}
+
+8. Security Considerations
+
+   This document is intended to provide convenient open source access by
+   the Internet community to the United States of America Federal
+   Information Processing Standard Secure Hash Function SHA-1 [FIPS
+   180-1].  No independent assertion of the security of this hash
+   function by the authors for any particular use is intended.
+
+
+
+
+
+
+Eastlake & Jones             Informational                     [Page 20]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+References
+
+   [FIPS 180-1] "Secure Hash Standard", United States of American,
+                National Institute of Science and Technology, Federal
+                Information Processing Standard (FIPS) 180-1, April
+                1993.
+
+   [MD4]        "The MD4 Message Digest Algorithm," Advances in
+                Cryptology - CRYPTO '90 Proceedings, Springer-Verlag,
+                1991, pp. 303-311.
+
+   [RFC 1320]   Rivest, R., "The MD4 Message-Digest Algorithm", RFC
+                1320, April 1992.
+
+   [RFC 1321]   Rivest, R., "The MD5 Message-Digest Algorithm", RFC
+                1321, April 1992.
+
+   [RFC 1750]   Eastlake, D., Crocker, S. and J. Schiller, "Randomness
+                Requirements for Security", RFC 1750, December 1994.
+
+Authors' Addresses
+
+   Donald E. Eastlake, 3rd
+   Motorola
+   155 Beaver Street
+   Milford, MA 01757 USA
+
+   Phone:   +1 508-634-2066 (h)
+            +1 508-261-5434 (w)
+   Fax:     +1 508-261-4777
+   EMail:   Donald.Eastlake at motorola.com
+
+
+   Paul E. Jones
+   Cisco Systems, Inc.
+   7025 Kit Creek Road
+   Research Triangle Park, NC 27709 USA
+
+   Phone:   +1 919 392 6948
+   EMail:   paulej at packetizer.com
+
+
+
+
+
+
+
+
+
+
+
+Eastlake & Jones             Informational                     [Page 21]
+

+RFC 3174           US Secure Hash Algorithm 1 (SHA1)      September 2001
+
+
+Full Copyright Statement
+
+   Copyright (C) The Internet Society (2001).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Eastlake & Jones             Informational                     [Page 22]
+

diff --git a/include/.gitignore b/include/.gitignore
new file mode 100644
index 0000000..a6fab3c
--- /dev/null
+++ b/include/.gitignore
@@ -0,0 +1,8 @@
+Makefile.in
+Makefile
+.deps
+.libs
+*.l[ao]
+*.o
+makemd5
+md5global.h
diff --git a/include/Makefile.am b/include/Makefile.am
index 5ea5be2..c942efa 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -51,9 +51,15 @@ noinst_PROGRAMS = makemd5
 
 makemd5_SOURCES = makemd5.c
 
-md5global.h: makemd5
-	-rm -f md5global.h
-	./makemd5 md5global.h
+makemd5$(BUILD_EXEEXT) $(makemd5_OBJECTS): CC=$(CC_FOR_BUILD)
+makemd5$(BUILD_EXEEXT) $(makemd5_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD)
+makemd5$(BUILD_EXEEXT): LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+md5global.h: makemd5$(BUILD_EXEEXT) Makefile
+	-rm -f $@
+	./$< $@
+
+BUILT_SOURCES = md5global.h
 
 EXTRA_DIST = NTMakefile
 DISTCLEANFILES = md5global.h
@@ -63,3 +69,6 @@ framedir = /Library/Frameworks/SASL2.framework
 frameheaderdir = $(framedir)/Versions/A/Headers
 frameheader_DATA = $(saslinclude_HEADERS)
 endif
+
+# TODO: automake, don't build it
+makemd5$(EXEEXT):
diff --git a/include/Makefile.in b/include/Makefile.in
deleted file mode 100644
index 3848674..0000000
--- a/include/Makefile.in
+++ /dev/null
@@ -1,653 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for SASL includes
-# Rob Earhart
-#
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-noinst_PROGRAMS = makemd5$(EXEEXT)
-subdir = include
-DIST_COMMON = $(noinst_HEADERS) $(saslinclude_HEADERS) \
-	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_makemd5_OBJECTS = makemd5.$(OBJEXT)
-makemd5_OBJECTS = $(am_makemd5_OBJECTS)
-makemd5_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(makemd5_SOURCES)
-DIST_SOURCES = $(makemd5_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(frameheaderdir)" \
-	"$(DESTDIR)$(saslincludedir)"
-DATA = $(frameheader_DATA)
-HEADERS = $(noinst_HEADERS) $(saslinclude_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-noinst_HEADERS = gai.h exits.h
-saslincludedir = $(includedir)/sasl
-saslinclude_HEADERS = hmac-md5.h md5.h md5global.h sasl.h saslplug.h saslutil.h prop.h
-makemd5_SOURCES = makemd5.c
-EXTRA_DIST = NTMakefile
-DISTCLEANFILES = md5global.h
- at MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
- at MACOSX_TRUE@frameheaderdir = $(framedir)/Versions/A/Headers
- at MACOSX_TRUE@frameheader_DATA = $(saslinclude_HEADERS)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu include/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-makemd5$(EXEEXT): $(makemd5_OBJECTS) $(makemd5_DEPENDENCIES) 
-	@rm -f makemd5$(EXEEXT)
-	$(LINK) $(makemd5_OBJECTS) $(makemd5_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/makemd5.Po at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-frameheaderDATA: $(frameheader_DATA)
-	@$(NORMAL_INSTALL)
-	test -z "$(frameheaderdir)" || $(MKDIR_P) "$(DESTDIR)$(frameheaderdir)"
-	@list='$(frameheader_DATA)'; test -n "$(frameheaderdir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(frameheaderdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(frameheaderdir)" || exit $$?; \
-	done
-
-uninstall-frameheaderDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(frameheader_DATA)'; test -n "$(frameheaderdir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(frameheaderdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(frameheaderdir)" && rm -f $$files
-install-saslincludeHEADERS: $(saslinclude_HEADERS)
-	@$(NORMAL_INSTALL)
-	test -z "$(saslincludedir)" || $(MKDIR_P) "$(DESTDIR)$(saslincludedir)"
-	@list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(saslincludedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(saslincludedir)" || exit $$?; \
-	done
-
-uninstall-saslincludeHEADERS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(saslincludedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(saslincludedir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(frameheaderdir)" "$(DESTDIR)$(saslincludedir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-frameheaderDATA install-saslincludeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-frameheaderDATA uninstall-saslincludeHEADERS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstPROGRAMS ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am \
-	install-frameheaderDATA install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am \
-	install-saslincludeHEADERS install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-frameheaderDATA \
-	uninstall-saslincludeHEADERS
-
-
-md5global.h: makemd5
-	-rm -f md5global.h
-	./makemd5 md5global.h
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/include/md5global.h b/include/md5global.h
deleted file mode 100644
index fbd7455..0000000
--- a/include/md5global.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* GLOBAL.H - RSAREF types and constants
- */
-#ifndef MD5GLOBAL_H
-#define MD5GLOBAL_H
-
-/* PROTOTYPES should be set to one if and only if the compiler supports
-  function argument prototyping.
-The following makes PROTOTYPES default to 0 if it has not already
-  been defined with C compiler flags.
- */
-#ifndef PROTOTYPES
-#define PROTOTYPES 0
-#endif
-
-/* POINTER defines a generic pointer type */
-typedef unsigned char *POINTER;
-
-typedef signed char INT1;		/*  8 bits */
-typedef short INT2;			/* 16 bits */
-typedef int INT4;			/* 32 bits */
-/* There is no 64 bit type */
-typedef unsigned char UINT1;		/*  8 bits */
-typedef unsigned short UINT2;		/* 16 bits */
-typedef unsigned int UINT4;		/* 32 bits */
-/* There is no 64 bit type */
-
-/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
-If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
-returns an empty list.
-*/
-#if PROTOTYPES
-#define PROTO_LIST(list) list
-#else
-#define PROTO_LIST(list) ()
-#endif
-
-#endif /* MD5GLOBAL_H */
-
diff --git a/include/sasl.h b/include/sasl.h
index fef4d51..54afd9c 100755
--- a/include/sasl.h
+++ b/include/sasl.h
@@ -121,6 +121,8 @@
 #ifndef SASL_H
 #define SASL_H 1
 
+#include <stddef.h>  /* For size_t */
+
 /* Keep in sync with win32/common.mak */
 #define SASL_VERSION_MAJOR 2
 #define SASL_VERSION_MINOR 1
@@ -177,6 +179,7 @@
 				       because of some constrains/policy violation */
 
 #define SASL_BADBINDING -32  /* channel binding failure */
+#define SASL_CONFIGERR  -100 /* error when parsing configuration file */
 
 /* max size of a sasl mechanism name */
 #define SASL_MECHNAMEMAX 20
@@ -223,6 +226,8 @@ extern "C" {
  * they must be called before all other SASL functions:
  */
 
+#include <sys/types.h>
+
 /* memory allocation functions which may optionally be replaced:
  */
 typedef void *sasl_malloc_t(size_t);
diff --git a/java/CyrusSasl/Makefile.am b/java/CyrusSasl/Makefile.am
index be1ffc1..1ce772a 100644
--- a/java/CyrusSasl/Makefile.am
+++ b/java/CyrusSasl/Makefile.am
@@ -28,7 +28,7 @@ javasasl_version = 1:0:0
 javasasldir = $(prefix)/lib/java/classes/sasl/CyrusSasl
 javahtmldir = $(prefix)/html/sasl
 
-INCLUDES=-I$(top_srcdir)/include $(JAVA_INCLUDES)
+AM_CPPFLAGS=-I$(top_srcdir)/include $(JAVA_INCLUDES)
 
 javasasl_JAVA = Sasl.java GenericClient.java \
 		ClientFactory.java \
diff --git a/java/CyrusSasl/Makefile.in b/java/CyrusSasl/Makefile.in
deleted file mode 100644
index d20a216..0000000
--- a/java/CyrusSasl/Makefile.in
+++ /dev/null
@@ -1,665 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the Java SASL library
-# Rob Earhart
-#
-################################################################
-#        Copyright 1998 by Carnegie Mellon University
-#
-#                      All Rights Reserved
-#
-#Permission to use, copy, modify, and distribute this software and its
-#documentation for any purpose and without fee is hereby granted,
-#provided that the above copyright notice appear in all copies and that
-#both that copyright notice and this permission notice appear in
-#supporting documentation, and that the name of Carnegie Mellon University
-#not be used in advertising or publicity pertaining to distribution of the
-#software without specific, written prior permission.
-#
-#CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-#SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, 
-#IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, 
-#INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
-#LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#PERFORMANCE OF THIS SOFTWARE.
-################################################################
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java/CyrusSasl
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(javasasldir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libjavasasl_la_LIBADD =
-am_libjavasasl_la_OBJECTS = javasasl.lo
-libjavasasl_la_OBJECTS = $(am_libjavasasl_la_OBJECTS)
-libjavasasl_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(libjavasasl_la_LDFLAGS) $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libjavasasl_la_SOURCES)
-DIST_SOURCES = $(libjavasasl_la_SOURCES)
-CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-javasasl_version = 1:0:0
-javasasldir = $(prefix)/lib/java/classes/sasl/CyrusSasl
-javahtmldir = $(prefix)/html/sasl
-INCLUDES = -I$(top_srcdir)/include $(JAVA_INCLUDES)
-javasasl_JAVA = Sasl.java GenericClient.java \
-		ClientFactory.java \
-	        GenericCommon.java SaslClient.java \
-	        SaslClientFactory.java SaslException.java \
-	        SaslInputStream.java SaslOutputStream.java\
-		SaslUtils.java ServerFactory.java \
-                SaslServerFactory.java SaslServer.java \
-                GenericServer.java
-
-EXTRA_DIST = $(javasasl_JAVA)
-CLASSES = $(javasasl_JAVA:.java=.class)
-lib_LTLIBRARIES = libjavasasl.la
-libjavasasl_la_SOURCES = javasasl.h javasasl.c
-libjavasasl_la_LDFLAGS = -export_dynamic -L../../lib/.libs -lsasl2 -version-info $(javasasl_version) $(wildcard ../lib/*.lo)
-BUILT_SOURCES = javasasl.h $(CLASSES)
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/CyrusSasl/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/CyrusSasl/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-	}
-
-uninstall-libLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-	done
-
-clean-libLTLIBRARIES:
-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libjavasasl.la: $(libjavasasl_la_OBJECTS) $(libjavasasl_la_DEPENDENCIES) 
-	$(libjavasasl_la_LINK) -rpath $(libdir) $(libjavasasl_la_OBJECTS) $(libjavasasl_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/javasasl.Plo at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-classjavasasl.stamp: $(javasasl_JAVA)
-	@list1='$?'; list2=; if test -n "$$list1"; then \
-	  for p in $$list1; do \
-	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	    list2="$$list2 $$d$$p"; \
-	  done; \
-	  echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
-	  $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
-	else :; fi
-	echo timestamp > classjavasasl.stamp
-install-javasaslJAVA: classjavasasl.stamp
-	@$(NORMAL_INSTALL)
-	test -z "$(javasasldir)" || $(MKDIR_P) "$(DESTDIR)$(javasasldir)"
-	@test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
-	set x *.class; shift; test "$$1" != "*.class" || exit 0; \
-	echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(javasasldir)/$$p'"; \
-	$(INSTALL_DATA) "$$@" "$(DESTDIR)$(javasasldir)"
-
-uninstall-javasaslJAVA:
-	@$(NORMAL_UNINSTALL)
-	@test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
-	set x *.class; shift; test "$$1" != "*.class" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(javasasldir)' && rm -f" "$$@" ")"; \
-	cd "$(DESTDIR)$(javasasldir)" && rm -f "$$@"
-
-clean-javasaslJAVA:
-	-rm -f *.class classjavasasl.stamp
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LTLIBRARIES) classjavasasl.stamp
-installdirs:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(javasasldir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-generic clean-javasaslJAVA clean-libLTLIBRARIES \
-	clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-javasaslJAVA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-javasaslJAVA uninstall-libLTLIBRARIES
-
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-javasaslJAVA clean-libLTLIBRARIES clean-libtool ctags \
-	distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-javasaslJAVA install-libLTLIBRARIES \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-javasaslJAVA uninstall-libLTLIBRARIES
-
-
-$(srcdir)/javasasl.c: javasasl.h
-
-javasasl.h: $(CLASSES)
-	$(CLASSPATH_ENV) $(JAVAH) -o $@ -jni $(patsubst %.class,CyrusSasl.%,$^)
-
-# force build of class files
-$(CLASSES): classjavasasl.stamp
-
-#install-data-local:
-# xxx broken
-#	$(mkinstalldirs) $(javahtmldir)
-#	$(CLASSPATH_ENV) $(JAVADOC) -d $(javahtmldir) sasl
-#	-if test ! -h $(javahtmldir)/images; \
-#	then \
-#	  $(LN_S) $(JAVA_BASE)/docs/api/images $(javahtmldir)/images; \
-#	fi
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/java/CyrusSasl/javasasl.h b/java/CyrusSasl/javasasl.h
deleted file mode 100644
index a9d4a42..0000000
--- a/java/CyrusSasl/javasasl.h
+++ /dev/null
@@ -1,324 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class CyrusSasl_Sasl */
-
-#ifndef _Included_CyrusSasl_Sasl
-#define _Included_CyrusSasl_Sasl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_GenericClient */
-
-#ifndef _Included_CyrusSasl_GenericClient
-#define _Included_CyrusSasl_GenericClient
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     CyrusSasl_GenericClient
- * Method:    jni_sasl_client_start
- * Signature: (ILjava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericClient_jni_1sasl_1client_1start
-  (JNIEnv *, jobject, jint, jstring);
-
-/*
- * Class:     CyrusSasl_GenericClient
- * Method:    jni_sasl_client_step
- * Signature: (I[BI)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericClient_jni_1sasl_1client_1step
-  (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_ClientFactory */
-
-#ifndef _Included_CyrusSasl_ClientFactory
-#define _Included_CyrusSasl_ClientFactory
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     CyrusSasl_ClientFactory
- * Method:    jni_sasl_client_init
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_CyrusSasl_ClientFactory_jni_1sasl_1client_1init
-  (JNIEnv *, jobject, jstring);
-
-/*
- * Class:     CyrusSasl_ClientFactory
- * Method:    jni_sasl_client_new
- * Signature: (Ljava/lang/String;Ljava/lang/String;IZ)I
- */
-JNIEXPORT jint JNICALL Java_CyrusSasl_ClientFactory_jni_1sasl_1client_1new
-  (JNIEnv *, jobject, jstring, jstring, jint, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_GenericCommon */
-
-#ifndef _Included_CyrusSasl_GenericCommon
-#define _Included_CyrusSasl_GenericCommon
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_set_prop_string
- * Signature: (IILjava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1prop_1string
-  (JNIEnv *, jobject, jint, jint, jstring);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_set_prop_int
- * Signature: (III)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1prop_1int
-  (JNIEnv *, jobject, jint, jint, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_set_prop_bytes
- * Signature: (II[B)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1prop_1bytes
-  (JNIEnv *, jobject, jint, jint, jbyteArray);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_set_server
- * Signature: (I[BI)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1server
-  (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_set_client
- * Signature: (I[BI)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1client
-  (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_setSecurity
- * Signature: (III)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1setSecurity
-  (JNIEnv *, jobject, jint, jint, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_getSecurity
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1getSecurity
-  (JNIEnv *, jobject, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_encode
- * Signature: (I[BI)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1encode
-  (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_decode
- * Signature: (I[BI)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1decode
-  (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-/*
- * Class:     CyrusSasl_GenericCommon
- * Method:    jni_sasl_dispose
- * Signature: (I)V
- */
-JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1dispose
-  (JNIEnv *, jobject, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslClient */
-
-#ifndef _Included_CyrusSasl_SaslClient
-#define _Included_CyrusSasl_SaslClient
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslClientFactory */
-
-#ifndef _Included_CyrusSasl_SaslClientFactory
-#define _Included_CyrusSasl_SaslClientFactory
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslException */
-
-#ifndef _Included_CyrusSasl_SaslException
-#define _Included_CyrusSasl_SaslException
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef CyrusSasl_SaslException_serialVersionUID
-#define CyrusSasl_SaslException_serialVersionUID -3042686055658047285LL
-#undef CyrusSasl_SaslException_serialVersionUID
-#define CyrusSasl_SaslException_serialVersionUID -3387516993124229948LL
-#undef CyrusSasl_SaslException_serialVersionUID
-#define CyrusSasl_SaslException_serialVersionUID 7818375828146090155LL
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslInputStream */
-
-#ifndef _Included_CyrusSasl_SaslInputStream
-#define _Included_CyrusSasl_SaslInputStream
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef CyrusSasl_SaslInputStream_SKIP_BUFFER_SIZE
-#define CyrusSasl_SaslInputStream_SKIP_BUFFER_SIZE 2048L
-#undef CyrusSasl_SaslInputStream_DoEncrypt
-#define CyrusSasl_SaslInputStream_DoEncrypt 1L
-#undef CyrusSasl_SaslInputStream_DoDebug
-#define CyrusSasl_SaslInputStream_DoDebug 0L
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslOutputStream */
-
-#ifndef _Included_CyrusSasl_SaslOutputStream
-#define _Included_CyrusSasl_SaslOutputStream
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef CyrusSasl_SaslOutputStream_DoEncrypt
-#define CyrusSasl_SaslOutputStream_DoEncrypt 1L
-#undef CyrusSasl_SaslOutputStream_DoDebug
-#define CyrusSasl_SaslOutputStream_DoDebug 0L
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslUtils */
-
-#ifndef _Included_CyrusSasl_SaslUtils
-#define _Included_CyrusSasl_SaslUtils
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_ServerFactory */
-
-#ifndef _Included_CyrusSasl_ServerFactory
-#define _Included_CyrusSasl_ServerFactory
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     CyrusSasl_ServerFactory
- * Method:    jni_sasl_server_init
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_CyrusSasl_ServerFactory_jni_1sasl_1server_1init
-  (JNIEnv *, jobject, jstring);
-
-/*
- * Class:     CyrusSasl_ServerFactory
- * Method:    jni_sasl_server_new
- * Signature: (Ljava/lang/String;Ljava/lang/String;I)I
- */
-JNIEXPORT jint JNICALL Java_CyrusSasl_ServerFactory_jni_1sasl_1server_1new
-  (JNIEnv *, jobject, jstring, jstring, jint);
-
-/*
- * Class:     CyrusSasl_ServerFactory
- * Method:    jni_sasl_server_getlist
- * Signature: (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_CyrusSasl_ServerFactory_jni_1sasl_1server_1getlist
-  (JNIEnv *, jobject, jint, jstring, jstring, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslServerFactory */
-
-#ifndef _Included_CyrusSasl_SaslServerFactory
-#define _Included_CyrusSasl_SaslServerFactory
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_SaslServer */
-
-#ifndef _Included_CyrusSasl_SaslServer
-#define _Included_CyrusSasl_SaslServer
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class CyrusSasl_GenericServer */
-
-#ifndef _Included_CyrusSasl_GenericServer
-#define _Included_CyrusSasl_GenericServer
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     CyrusSasl_GenericServer
- * Method:    jni_sasl_server_start
- * Signature: (ILjava/lang/String;[BI)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericServer_jni_1sasl_1server_1start
-  (JNIEnv *, jobject, jint, jstring, jbyteArray, jint);
-
-/*
- * Class:     CyrusSasl_GenericServer
- * Method:    jni_sasl_server_step
- * Signature: (I[BI)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericServer_jni_1sasl_1server_1step
-  (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/java/Makefile.in b/java/Makefile.in
deleted file mode 100644
index 58d2001..0000000
--- a/java/Makefile.in
+++ /dev/null
@@ -1,635 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the Java SASL library
-# Rob Earhart
-#
-################################################################
-#        Copyright 1998 by Carnegie Mellon University
-#
-#                      All Rights Reserved
-#
-#Permission to use, copy, modify, and distribute this software and its
-#documentation for any purpose and without fee is hereby granted,
-#provided that the above copyright notice appear in all copies and that
-#both that copyright notice and this permission notice appear in
-#supporting documentation, and that the name of Carnegie Mellon University
-#not be used in advertising or publicity pertaining to distribution of the
-#software without specific, written prior permission.
-#
-#CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-#SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, 
-#IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, 
-#INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
-#LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#PERFORMANCE OF THIS SOFTWARE.
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = CyrusSasl javax Test
-EXTRA_DIST = doc
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/java/Test/Makefile.in b/java/Test/Makefile.in
deleted file mode 100644
index 33e9fe1..0000000
--- a/java/Test/Makefile.in
+++ /dev/null
@@ -1,434 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the Java SASL library
-# Rob Earhart
-#
-################################################################
-#        Copyright 1998 by Carnegie Mellon University
-#
-#                      All Rights Reserved
-#
-#Permission to use, copy, modify, and distribute this software and its
-#documentation for any purpose and without fee is hereby granted,
-#provided that the above copyright notice appear in all copies and that
-#both that copyright notice and this permission notice appear in
-#supporting documentation, and that the name of Carnegie Mellon University
-#not be used in advertising or publicity pertaining to distribution of the
-#software without specific, written prior permission.
-#
-#CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-#SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, 
-#IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, 
-#INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
-#LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#PERFORMANCE OF THIS SOFTWARE.
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java/Test
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = ServerHandler.java Handler.java jimtest.java testserver.java \
-	     jimtest-compile.sh jimtest.sh
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/Test/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/Test/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/java/doc/draft-weltman-java-sasl-02.txt b/java/doc/draft-weltman-java-sasl-02.txt
new file mode 100644
index 0000000..89dc9c9
--- /dev/null
+++ b/java/doc/draft-weltman-java-sasl-02.txt
@@ -0,0 +1,1444 @@
+
+    Internet Draft                                    Rob Weltman
+                                                        Netscape Communications Corp.
+                                                      Rosanna Lee
+  draft-weltman-java-sasl-02.txt                        Sun Microsystems
+                                                      Rob Earhart
+                                                        Carnegie Mellon
+                                                        June 4, 1999
+
+
+              The Java SASL Application Program Interface
+
+
+Status of this Memo
+
+   This document is an Internet-Draft and is in full conformance with
+   all provisions of Section 10 of RFC2026.
+
+   Internet-Drafts are working documents of the Internet Task Force
+   (IETF), its areas, and its working groups.  Note that other groups
+   may also distribute working documents as Internet-Drafts.
+
+   Internet-Drafts are draft documents valid for a maximum of six
+   months and may be updated, replaced, or obsoleted by other documents
+   at any time.  It is inappropriate to use Internet Drafts as
+   reference material or to cite them other than as "work in progress."
+
+   The list of current Internet-Drafts can be accessed at
+   http://www.ietf.org/ietf/1id-abstracts.txt
+
+   The list of Internet-Draft Shadow Directories can be accessed at
+   http://www.ietf.org/shadow.html.
+
+
+
+Abstract
+
+   This document defines a client-side and a server-side Java language
+   interface for using the Simple Authentication and Security Layer
+   (SASL) mechanisms for adding authentication support to connection-
+   based protocols. The interface promotes sharing of SASL mechanism
+   drivers and security layers between applications using different
+   protocols. It complements but does not replace [SASL], which defines
+   and exemplifies use of the SASL protocol in a language-independent
+   way.
+
+
+
+
+
+
+
+
+
+
+
+
+ Expires 12/99                                                [Page 1]
+

+JAVA SASL API                                                June 1999
+
+
+1    Overview of the SASL classes..........................5
+1.1  Interfaces     .......................................5
+1.2  Classes        .......................................5
+2    Overview of SASL API Use..............................6
+3    The java SASL classes.................................7
+3.1  public class Sasl.....................................7
+3.1.1     createSaslClient.................................7
+3.1.2     setSaslClientFactory.............................9
+3.1.3     createSaslServer.................................9
+3.1.4     setSaslServerFactory............................10
+3.2  public interface SaslClient..........................11
+3.2.1     createInitialResponse...........................11
+3.2.2     evaluateChallenge...............................11
+3.2.3     isComplete......................................11
+3.2.4     getSecurityLayer................................11
+3.2.5     getMechanismName................................12
+3.3  public interface SaslClientFactory...................12
+3.3.1     createSaslClient................................12
+3.3.2     getMechanismNames...............................13
+3.4  public interface SaslServer..........................13
+3.4.1     evaluateResponse................................13
+3.4.2     isComplete......................................14
+3.4.3     getSecurityLayer................................14
+3.4.4     getMechanismName................................14
+3.4.5     getAuthorizationID..............................14
+3.5  public interface SaslServerFactory...................15
+3.5.1     createSaslServer................................15
+3.5.2     getMechanismNames...............................16
+3.6  public class SaslException...........................16
+3.6.1     Constructors....................................16
+3.6.2     getException....................................17
+3.6.3     printStackTrace.................................17
+3.7  public interface SecurityLayer.......................17
+3.7.1         encode......................................17
+3.7.2         decode......................................18
+4    Security Considerations..............................19
+5    Bibliography   ......................................19
+6    Authors' Addresses...................................19
+7    Acknowledgements.....................................19
+8    Appendix A - Sample java LDAP program using SASL.....20
+9    Appendix B - Changes from java-sasl-01.txt...........24
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires 12/99                                                 [Page 2]
+

+JAVA SASL API                                                June 1999
+
+Introduction
+
+
+   See [SASL], section 3, for an introduction to and overview of the
+   SASL framework for authentication and negotiation of a security
+   layer. The following presents an outline of the concepts.
+
+    ---------------     -------------------      -----------------
+    | Application |-----| Protocol Driver |------| MD5           |
+    ---------------     -------------------   |  -----------------
+                                              |
+                                              |  -----------------
+                                              |--| Kerberos v5   |
+                                              |  -----------------
+                                              |
+                                              |  -----------------
+                                              |--| PKCS-11       |
+                                              |  -----------------
+                                              |
+                                              |
+                                              |
+                                              |  - - - - - - - - -
+                                              |--| xxxYYYxxx     |
+                                                 - - - - - - - - -
+
+   An application chooses a Protocol Driver specific to the protocol it
+   wants to use, and specifies one or more acceptable mechanisms. The
+   Protocol Driver controls the socket, and knows the format/packaging
+   of bytes sent down and received from the socket, but does not know
+   how to authenticate or to encrypt/ decrypt the bytes. It uses one of
+   the Mechanism Drivers to help it perform authentication. The
+   Protocol Driver examines each byte string received from the server
+   during the authentication in a protocol-specific way to determine if
+   the authentication process has been completed. If not, the byte
+   string is passed to the Mechanism Driver to be interpreted as a
+   server challenge; the Mechanism Driver returns an appropriate
+   response, which the Protocol Driver can encode in a protocol-
+   specific way and return to the server.
+
+   If the Protocol Driver concludes from the byte string received from
+   the server that authentication is complete, it may query the
+   Mechanism Driver if it considers the authentication process
+   complete, in order to thwart early completion messages inserted by
+   an intruder.
+
+   On completed authentication, the Protocol Driver may receive from
+   the Mechanism Driver a Security Layer object. From this point on,
+   any data exchanged throught the socket is passed to the Security
+   Layer object for encoding/decoding.
+
+   A complication here is that some authentication methods may require
+   additional user/application input.  That means that a Mechanism
+   Driver may need to call up to an application during the
+   authentication process. To satisfy this requirement, the application
+
+
+Expires 12/99                                                 [Page 3]
+

+JAVA SASL API                                                June 1999
+
+   can supply a javax.security.auth.callback.CallbackHandler instance
+   [JAAS] that can be used by the Mechanism Driver to prompt the user
+   for additional input.
+
+   Protocol Drivers are protocol-dependent, and may be built in to a
+   protocol package or an application. There is a generalized framework
+   for registering and finding Mechanism Drivers. The framework uses a
+   factory to produce an appropriate Mechanism Driver. The factory may
+   be preconfigured, explicitly specified by the caller, specified as a
+   list of packages by the caller, or be identified based on a list of
+   packages in the System properties.
+
+   The Mechanism Drivers are protocol-independent, and don't deal
+   directly with network connections, just byte arrays, so they can be
+   implemented in a generalizable way for all protocols.
+
+   A Security Layer Driver typically inherits a state object from the
+   Mechanism Driver, where parameters and resolutions reached during
+   authentication have been stored.
+
+   Different Mechanism Drivers may require different parameters to
+   carry out the authentication process. This is handled by passing a
+   java.util.Hashtable object as an argument to instantiation methods.
+
+   In the following discussion, 'client' refers to the client-side
+   protocol driver that is using the SASL mechanism while 'server'
+   refers to the server-side protocol driver that is using the SASL
+   mechanism.
+
+   In the Java SASL environment, the SaslClient interface represents
+   the client's view of the Mechanism Driver, while the SaslServer
+   interface represents the server's view.
+
+   ---------------                                     ---------------
+   | Application |--+                               +--|   Server    |
+   ---------------  |                               |  ---------------
+                    |                               |
+       -------------------                       -------------------
+       | Protocol Driver |--+   <- - - - ->   +--| Protocol Driver |
+       -------------------  |                 |  -------------------
+                            |                 |
+                 -------------------     -------------------
+                 |   SaslClient    |     |    SaslServer   |
+                 -------------------     -------------------
+                               |              |
+          -----------------    |              |   -----------------
+          | MD5           |----|              |---| MD5           |
+          -----------------    |              |   -----------------
+                               |              |
+          -----------------    |              |   -----------------
+          | Kerberos v5   |----|              |---| Kerberos v5   |
+          -----------------    |              |   -----------------
+                               |              |
+          -----------------    |              |   -----------------
+
+
+Expires 12/99                                                 [Page 4]
+

+JAVA SASL API                                                June 1999
+
+          | PKCS-11       |----|              |---| PKCS-11       |
+          -----------------    |              |   -----------------
+                               |              |
+          - - - - - - - - -    |              |   - - - - - - - - -
+          | xxxYYYxxx     |----+              +---| xxxYYYxxx     |
+          - - - - - - - - -                       - - - - - - - - -
+
+   A client using the Java SASL API may communicate with any server
+   implementing the SASL protocol, and a server may use the API to
+   process authentication requests from any client using the SASL
+   protocol. It is not required that both sides use the same language
+   bindings.
+
+1     Overview of the SASL classes
+
+
+1.1   Interfaces
+
+
+   SaslClient                  Performs SASL authentication as a
+                               client.
+
+   SaslClientFactory           An interface for creating instances of
+                               SaslClient. It is not normally accessed
+                               directly by a client, which will use the
+                               Sasl static methods instead. However, a
+                               particular environment may provide and
+                               install a new or different
+                               SaslClientFactory.
+
+   SaslServer                  Performs SASL authentication as a
+                               server.
+
+   SaslServerFactory           An interface for creating instances of
+                               SaslServer. It is not normally accessed
+                               directly by a server, which will use the
+                               Sasl static methods instead. However, a
+                               particular environment may provide and
+                               install a new or different
+                               SaslServerFactory.
+
+   SecurityLayer               An interface for encoding and decoding
+                               data.
+
+
+1.2   Classes
+
+
+   Sasl                        A static class for creating SASL clients
+                               and servers. It transparently locates
+                               and uses any available
+                               SaslClientFactory/SaslServerFactory
+                               instances.
+
+
+
+Expires 12/99                                                 [Page 5]
+

+JAVA SASL API                                                June 1999
+
+   SaslException               Exception thrown on errors and failures
+                               in the authentication process.
+
+
+2     Overview of SASL API Use
+
+   An application generally uses the SASL API as follows:
+
+   -    Pass a list of acceptable or known Mechanisms to
+        Sasl.createSaslClient. The method returns an object
+        implementing SaslClient on success.
+
+   -    Create an object implementing the client authentication
+        callback interfaces, which can provide credentials when
+        required by the SaslClient.
+
+   -    Have the SaslClient object begin the authentication process by
+        providing an initial server response, if the protocol supports
+        an initial response.
+
+   -    Responses/challenges are exchanged with the server. If a
+        response indicates authentication has completed, SaslClient is
+        queried for validation, and a SecurityLayer object may be
+        obtained from it. If not, the SaslClient is queried for an
+        appropriate next response to the server. This continues until
+        authentication has completed.
+
+   -    For the rest of the session, messages to the server are encoded
+        first by the Security Layer (if one has been provided by
+        SaslClient), and messages from the server are decoded by it
+        before processing in the application.
+
+
+   A server generally uses the SASL API as follows:
+
+   -    It receives a request from the client requesting authentication
+        for a particular SASL mechanism, accompanied by an optional
+        an initial response.
+
+   -    It processes the initial response and generates a challenge
+        specific for the SASL mechanism to be sent back to the client
+        if the response is processed successfully. If the response is
+        not processed successfully, it sends an error to the client and
+        terminates the authentication session.
+
+   -    Responses/challenges are exchanged with the client. If the
+        server cannot successful process a response, the server sends
+        an error to the client and terminates the authentication. If
+        the server has completed the authentication and has no more
+        challenges to send, it sends a success indication to the
+        client.
+
+   -    If the authentication has completed successfully, the server
+        extracts the authorization ID of the client from the SaslServer
+
+
+Expires 12/99                                                 [Page 6]
+

+JAVA SASL API                                                June 1999
+
+        instance (if appropriate) to be used for subsequent access
+        control checks.
+
+   -    For the rest of the session, messages to and from the client
+        are encoded and decoded by the Security Layer, if one has been
+        provided by SaslServer.
+
+   The following sections describe the SASL classes in more detail.
+
+
+3     The Java SASL classes
+
+
+3.1   public class Sasl
+
+   A class capable of providing a SaslClient or SaslServer.
+
+
+3.1.1 createSaslClient
+
+   public static SaslClient
+   createSaslClient(String[] mechanisms,
+                    String authorizationID,
+                    String protocol,
+                    String serverName,
+                    Hashtable props,
+                    javax.security.auth.callback.CallbackHandler cbh)
+                    throws SaslException
+
+   Creates a SaslClient using the parameters supplied. It returns null
+   if no SaslClient can be created using the parameters supplied.
+   Throws SaslException if it cannot create a SaslClient because of an
+   error.
+
+   The algorithm for selection is as follows:
+
+      1.If a factory has been installed via setSaslClientFactory(), try
+        it first. If non-null answer produced, return it.
+      2.Use the packages listed in the javax.security.sasl.client.pkgs
+        property from props to load in a factory and try to create a
+        SaslClient, by looking for a class named ClientFactory. Repeat
+        this for each package on the list until a non-null answer is
+        produced. If non-null answer produced, return it.
+      3.Repeat previous step using the javax.security.sasl.client.pkgs
+        System property.
+      4.If no non-null answer produced, return null.
+
+   Parameters are:
+
+      mechanisms     The non-null list of mechanism names to try. Each
+                      is the IANA-registered name of a SASL mechanism.
+                      (e.g. "GSSAPI", "CRAM-MD5").
+
+
+
+
+Expires 12/99                                                 [Page 7]
+

+JAVA SASL API                                                June 1999
+
+      authorizationIDThe possibly null protocol-dependent
+                      identification to be used for authorization, e.g.
+                      user name or distinguished name. When the SASL
+                      authentication completes successfully, the entity
+                      named by authorizationId is granted access. If
+                      null, access is granted to a protocol-dependent
+                      default (for example, in LDAP this is the DN in
+                      the bind request).
+
+      protocol       The non-null string name of the protocol for
+                      which the authentication is being performed, e.g
+                      "pop", "ldap".
+
+      serverName     The non-null fully qualified host name of the
+                      server to authenticate to.
+
+      props          The possibly null additional configuration
+                      properties for the session, e.g.
+
+           javax.security.sasl.encryption.minimum  Minimum key length;
+                                                    default "0" (no
+                                                    session
+                                                    protection). "1"
+                                                    means integrity
+                                                    protection only.
+
+           javax.security.sasl.encryption.maximum  Maximum key length;
+                                                    default "256".
+
+           javax.security.sasl.server.authentication   "true" if
+                                                    server must
+                                                    authenticate to
+                                                    client; default
+                                                    "false".
+
+           javax.security.sasl.ip.local            IP address in
+                                                    dotted decimal
+                                                    format, for
+                                                    kerberos v4; no
+                                                    default.
+
+           javax.security.sasl.ip.remote           IP address in
+                                                    dotted decimal
+                                                    format, for
+                                                    kerberos v4; no
+                                                    default.
+
+           javax.security.sasl.maxbuffer           Maximum size of
+                                                    security layer
+                                                    frames; default "0"
+                                                    (client will
+                                                    not use the
+                                                    security layer).
+
+
+
+Expires 12/99                                                 [Page 8]
+

+JAVA SASL API                                                June 1999
+
+           javax.security.sasl.client.pkgs         A space-separated
+                                                    list of package
+                                                    names to use when
+                                                    locating a
+                                                    SaslClientFactory.
+
+      cbh            The possibly null callback handler to used by the
+                      SASL mechanisms to get further information  from
+                      the application/library to complete the
+                      authentication. For example, a SASL mechanism
+                      might require the authentication ID and password
+                      from the caller. The authentication ID may be
+                      requested with a NameCallback, and the password
+                      with a PasswordCallback.
+
+
+3.1.2 setSaslClientFactory
+
+   public static void
+   setSaslClientFactory(SaslClientFactory fac)
+
+   Sets the default SaslClientFactory to use. This method sets fac to
+   be the default factory. It can only be called with a non-null value
+   once per VM. If a factory has been set already, this method throws
+   IllegalStateException.
+
+   Parameters are:
+
+      fac            The possibly null factory to set. If null, it
+                      doesn't do anything.
+
+
+
+3.1.3 createSaslServer
+
+   public static SaslServer
+   createSaslServer(String mechanism,
+                    String protocol,
+                    String serverName,
+                    Hashtable props,
+                    javax.security.auth.callback.CallbackHandler cbh)
+                    throws SaslException
+
+   This method creates a SaslServer for the specified mechanism. It
+   returns null if no SaslServer can be created for the specified
+   mechanism.
+
+   The algorithm for selection is as follows:
+
+      1.If a factory has been installed via setSaslServerFactory(), try
+        it first. If non-null answer produced, return it.
+      2.Use the packages listed in the javax.security.sasl.server.pkgs
+        property in props, if present, to load in a factory and try to
+        create a SaslServer, by looking for a class named
+
+
+Expires 12/99                                                 [Page 9]
+

+JAVA SASL API                                                June 1999
+
+        ServerFactory. Repeat this for each package on the list until a
+        non-null answer is produced. If non-null answer produced,
+        return it.
+      3.Use the packages listed in the javax.security.sasl.server.pkgs
+        System property to load in a factory and try to create a
+        SaslServer. Repeat this for each package on the list until a
+        non-null answer is produced. If non-null answer produced,
+        return it.
+      4.If no non-null answer produced, return null.
+
+   Parameters are:
+
+      mechanism      A non-null IANA-registered name of a SASL
+                      mechanism (e.g. "GSSAPI", "CRAM-MD5").
+
+      protocol       The non-null string name of the protocol for
+                      which the authentication is being performed, e.g
+                      "pop", "ldap".
+
+      serverName     The non-null fully qualified host name of the
+                      server to authenticate to.
+
+      props          The possibly null properties to be used by the
+                      SASL mechanisms to configure the authentication
+                      exchange. See Sasl.createSaslClient for examples
+                      of properties.
+
+      cbh            The possibly null callback handler to used by the
+                      SASL mechanisms to get further information  from
+                      the application/library to complete the
+                      authentication. For example, a SASL mechanism
+                      might require the authentication ID and password
+                      from the caller. The authentication ID may be
+                      requested with a NameCallback, and the password
+                      with a PasswordCallback.
+
+
+3.1.4 setSaslServerFactory
+
+   public static void
+   setSaslServerFactory(SaslServerFactory fac)
+
+   Sets the default SaslServerFactory to use. This method sets fac to
+   be the default factory. It can only be called with a non-null value
+   once per VM. If a factory has been set already, this method throws
+   IllegalStateException.
+
+   Parameters are:
+
+      fac            The possibly null factory to set. If null, it
+                      doesn't do anything.
+
+
+
+
+
+Expires 12/99                                                [Page 10]
+

+JAVA SASL API                                                June 1999
+
+3.2   public interface SaslClient
+
+   An object implementing this interface can negotiate authentication
+   using one of the IANA-registered mechanisms.
+
+
+3.2.1 createInitialResponse
+
+   public byte[]
+   createInitialResponse() throws SaslException
+
+   This method prepares a byte array to use for the initial response to
+   start the authentication process. A SaslException is thrown if the
+   driver cannot initiate authentication.  The return value may be
+   null, indicating there is no initial response to send to the server.
+
+
+3.2.2 evaluateChallenge
+
+   public byte[]
+   evaluateChallenge(byte[] challenge)
+                    throws SaslException
+
+   If a challenge is received from the server during the authentication
+   process, this method is called to prepare an appropriate next
+   response to submit to the server. The response is null if the
+   challenge accompanied a "SUCCESS" status and the challenge only
+   contains data for the client to update its state and no response
+   needs to be sent to the server. A SaslException is thrown if an
+   error occurred while processing the challenge or generating a
+   response.
+
+   Parameters are:
+
+      challenge      The non-null challenge received from the server.
+
+
+3.2.3 isComplete
+
+   public boolean
+   isComplete()
+
+   This method may be called at any time to determine if the
+   authentication process is finished. Typically, the protocol driver
+   will not do this until it has received something from the server
+   which indicates (in a protocol-specific manner) that the process has
+   completed.
+
+3.2.4 getSecurityLayer
+
+   public SecurityLayer
+   getSecurityLayer() throws SaslException
+
+
+
+
+Expires 12/99                                                [Page 11]
+

+JAVA SASL API                                                June 1999
+
+   Once authentication is complete, this method may be called to obtain
+   an object capable of encoding/decoding data content for the rest of
+   the session. An exception is thrown if authentication is not yet
+   complete. It may return null if the mechanism does not define a
+   security layer, or if none was negotiated.
+
+
+3.2.5 getMechanismName
+
+   public String
+   getMechanismName()
+
+   Report the IANA-registered name of the mechanism used by this
+   client, e.g. "GSSAPI" or "CRAM-MD5".
+
+
+
+3.3   public interface SaslClientFactory
+
+   An object implementing this interface can provide a SaslClient.
+   Implementations must be thread-safe and handle multiple simultaneous
+   requests.
+
+
+3.3.1 createSaslClient
+
+   public SaslClient
+   createSaslClient(String[] mechanisms,
+                    String authorizationID,
+                    String protocol,
+                    String serverName,
+                    Hashtable props,
+                    javax.security.auth.callback.CallbackHandler cbh)
+                    throws SaslException
+
+   Creates a SaslClient using the parameters supplied. It returns null
+   if no SaslClient can be created using the parameters supplied.
+   Throws SaslException if it cannot create a SaslClient because of an
+   error.
+
+   Returns a possibly null SaslClient created using the parameters
+   supplied. If null, this factory cannot produce a SaslClient using
+   the parameters supplied.
+
+      Parameters are:
+
+      mechanisms     The non-null list of mechanism names to try. Each
+                      is the IANA-registered name of a SASL mechanism.
+                      (e.g. "GSSAPI", "CRAM-MD5").
+
+      authorizationID The possibly null protocol-dependent
+                      identification to be used for authorization, e.g.
+                      user name or distinguished name. When the SASL
+                      authentication completes successfully, the entity
+
+
+Expires 12/99                                                [Page 12]
+

+JAVA SASL API                                                June 1999
+
+                      named by authorizationId is granted access. If
+                      null, access is granted to a protocol-dependent
+                      default (for example, in LDAP this is the DN in
+                      the bind request).
+
+      protocol       The non-null string name of the protocol for
+                      which the authentication is being performed, e.g
+                      "pop", "ldap".
+
+      serverName     The non-null fully qualified host name of the
+                      server to authenticate to.
+
+      props          The possibly null properties to be used by the
+                      SASL mechanisms to configure the authentication
+                      exchange. See Sasl.createSaslClient for examples
+                      of properties.
+
+      cbh            The possibly null callback handler to used by the
+                      SASL mechanisms to get further information  from
+                      the application/library to complete the
+                      authentication. For example, a SASL mechanism
+                      might require the authentication ID and password
+                      from the caller. The authentication ID may be
+                      requested with a NameCallback, and the password
+                      with a PasswordCallback.
+
+
+
+3.3.2 getMechanismNames
+
+   public String[]
+   getMechanismNames()
+
+   Returns a non-null array of names of mechanisms supported by this
+   factory.
+
+
+3.4   public interface SaslServer
+
+   An object implementing this interface can negotiate authentication
+   using one of the IANA-registered mechanisms.
+
+
+3.4.1 evaluateResponse
+
+   public byte[]
+   evaluateResponse(byte[] response)
+                    throws SaslException
+
+   If a response is received from the client during the authentication
+   process, this method is called to prepare an appropriate next
+   challenge to submit to the client. The challenge is null if the
+   authentication has succeeded and no more challenge data is to be
+   sent to the client. It is non-null if the authentication must be
+
+
+Expires 12/99                                                [Page 13]
+

+JAVA SASL API                                                June 1999
+
+   continued by sending a challenge to the client, or if the
+   authentication has succeeded but challenge data needs to be
+   processed by the client. A SaslException is thrown if an error
+   occurred while processing the response or generating a challenge.
+   isComplete() should be called after each call to evaluateResponse(),
+   to determine if any further response is needed from the client. The
+   protocol driver will send an indication (in a protocol-specific
+   manner) as to whether the authentication has succeeded, failed, or
+   should be continued, and any accompanying challenge data.
+
+   Parameters are:
+
+      response       Non-null response received from client.
+
+
+3.4.2 isComplete
+
+   public boolean
+   isComplete()
+
+   This method may be called at any time to determine if the
+   authentication process is finished. This method is typically called
+   after each invocation of evaluateResponse() to determine whether the
+   authentication has completed successfully or should be continued.
+
+
+3.4.3 getSecurityLayer
+
+   public SecurityLayer
+   getSecurityLayer() throws SaslException
+
+   Once authentication is complete, this method may be called to obtain
+   an object capable of encoding/decoding data content for the rest of
+   the session. An exception is thrown if authentication is not yet
+   complete. It may return null if the mechanism does not define a
+   security layer, or if none was negotiated.
+
+
+3.4.4 getMechanismName
+
+   public String
+   getMechanismName()
+
+   Returns the non-null IANA-registered name of the mechanism used by
+   this server, e.g. "GSSAPI" or "CRAM-MD5".
+
+
+3.4.5 getAuthorizationID
+
+   public String
+   getAuthorizationID()
+
+   Report the authorization ID in effect for the client of this
+   session. If null, a protocol-dependent default is assumed.
+
+
+Expires 12/99                                                [Page 14]
+

+JAVA SASL API                                                June 1999
+
+
+
+
+3.5   public interface SaslServerFactory
+
+   An object implementing this interface can provide a SaslServer.
+   Implementations must be thread-safe and handle multiple simultaneous
+   requests.
+
+
+3.5.1 createSaslServer
+
+   public SaslServer
+   createSaslServer(String mechanism,
+                    String protocol,
+                    String serverName,
+                    Hashtable props,
+                    javax.security.auth.callback.CallbackHandler cbh)
+                    throws SaslException
+
+   Creates a SaslServer using the mechanism supplied. It returns null
+   if no SaslClient can be created using the parameters supplied.
+   Throws SaslException if it cannot create a SaslClient because of an
+   error.
+
+   Returns a possibly null SaslServer which supports the specified
+   mechanism. If null, this factory cannot produce a SaslServer for the
+   specified mechanism.
+
+      Parameters are:
+
+      mechanism      The non-null IANA-registered name of a SASL
+                      mechanism (e.g. "GSSAPI", "CRAM-MD5").
+
+      protocol       The non-null string name of the protocol for
+                      which the authentication is being performed, e.g
+                      "pop", "ldap".
+
+      serverName     The non-null fully qualified host name of the
+                      server.
+
+      props          The possibly null properties to be used by the
+                      SASL mechanisms to configure the authentication
+                      exchange. See Sasl.createSaslClient for examples
+                      of properties.
+
+      cbh            The possibly null callback handler to used by the
+                      SASL mechanisms to get further information  from
+                      the application/library to complete the
+                      authentication. For example, a SASL mechanism
+                      might require the authentication ID and password
+                      from the caller. The authentication ID may be
+                      requested with a NameCallback, and the password
+                      with a PasswordCallback.
+
+
+Expires 12/99                                                [Page 15]
+

+JAVA SASL API                                                June 1999
+
+
+
+3.5.2 getMechanismNames
+
+   public String[]
+   getMechanismNames()
+
+   Returns a non-null array of names of mechanisms supported by this
+   factory.
+
+
+3.6   public class SaslException
+   extends IOException
+
+   Exception thrown on errors and failures in authentication.
+
+
+3.6.1 Constructors
+
+   public SaslException()
+
+   Constructs a new instance of SaslException. The root exception and
+   the detailed message are null.
+
+
+   public SaslException(String message)
+
+
+   Constructs a default exception with a detailed message and no root
+   exception.
+
+
+   public SaslException(String messag,
+                        Throwable ex)
+
+   Constructs a new instance of SaslException with a detailed message
+   and a root exception. For example, a SaslException might result from
+   a problem with the callback handler, which might throw a
+   NoSuchCallbackException if it does not support the requested
+   callback, or throw an IOException if it had problems obtaining data
+   for the callback. The SaslException's root exception would be then
+   be the exception thrown by the callback handler.
+
+
+   Parameters are:
+
+      message        Possibly null additional detail about the
+                      exception.
+
+      ex             A possibly null root exception that caused this
+                      exception.
+
+
+
+
+
+Expires 12/99                                                [Page 16]
+

+JAVA SASL API                                                June 1999
+
+3.6.2 getException
+
+   public Throwable
+   getException()
+
+   Returns the possibly null root exception that caused this exception.
+
+
+3.6.3 printStackTrace
+
+   public void
+   printStackTrace()
+
+   Prints this exception's stack trace to System.err. If this
+   exception has a root exception, the stack trace of the root
+   exception is printed to System.err instead.
+
+   public void
+   printStackTrace(PrintStream ps)
+
+   Prints this exception's stack trace to a print stream. If this
+   exception has a root exception, the stack trace of the root
+   exception is printed to the print stream instead.
+
+   public void
+   printStackTrace(PrintWriter pw)
+
+   Prints this exception's stack trace to a print writer. If this
+   exception has a root exception, the stack trace of the root
+   exception is printed to the print writer instead.
+
+   Parameters are:
+
+      ps             The non-null print stream to which to print.
+
+      pw             The non-null print writer to which to print.
+
+
+3.7 public interface SecurityLayer
+
+   An object implementing this interface translates buffers back and
+   forth during a session, after the authentication process has
+   completed, to provide a security layer. The security layer may
+   provide data integrity and/or session privacy.
+
+
+3.7.1 encode
+
+   public byte[]
+   encode(byte[] inVals, int offset, int count) throws SASLException
+
+   Take a protocol-dependent byte array and encode it (encrypt, for
+   example) for sending to the server.
+
+
+
+Expires 12/99                                                [Page 17]
+

+JAVA SASL API                                                June 1999
+
+
+   Parameters are:
+
+      inVals         A request to be encoded before sending to the
+                      server.
+
+      offset         The inclusive starting offset in the byte array
+                      inVals to use. 0 <= offset < inVals.length.
+
+      count          The number of bytes in inVals to use.
+                      0 <= count < inVals.length-offset.
+
+
+3.7.2 decode
+
+   public byte[]
+   decode(byte[] outVals, int offset, int count) throws SASLException
+
+   Take an encoded byte array received from the server and decode it.
+
+   Parameters are:
+
+      outVals        A response received from the server, to be
+                      decoded.
+
+      offset         The inclusive starting offset in the byte array
+                      outVals to use. 0 <= offset < outVals.length.
+
+      count          The number of bytes in outVals to use.
+                      0 <= count < outVals.length-offset.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires 12/99                                                [Page 18]
+

+JAVA SASL API                                                June 1999
+
+4     Security Considerations
+
+   When SASL authentication is performed over unsecured connections, it
+   is possible for an active attacker to spoof the server's protocol-
+   specific indication that authentication is complete.  Clients should
+   protect against this attack by verifying the completion of
+   authentication with the mechanism driver by calling the driver's
+   isComplete() method.
+
+   Additional security considerations are discussed in [SASL].
+
+
+5     Bibliography
+
+   [JAAS] Java Software, Sun Microsystems, Inc., "Java Authentication
+        and Authorization Service," http://java.sun.com/security/jaas,
+        March 1999.
+
+   [SASL] J. Myers, "Simple Authentication and Security Layer (SASL)",
+        RFC 2222, October 1997
+
+
+6     Authors' Addresses
+
+      Rob Weltman
+      Netscape Communications Corp.
+      501 E. Middlefield Rd.
+      Mail Stop MV-029
+      Mountain View, CA 94043-4042
+      USA
+      Email: rweltman at netscape.com
+
+      Rosanna Lee
+      Sun Microsystems
+      Mail Stop UCUP02-206
+      901 San Antonio Road
+      Palo Alto, CA  94303
+      USA
+      Email: rosanna.lee at eng.sun.com
+
+      Rob Earhart
+      Carnegie Mellon
+      5000 Forbes Ave.
+      Pittsburgh, PA 15213-3890
+      USA
+      Email: earhart at cmu.edu
+
+
+7     Acknowledgements
+
+   Scott Seligman of Sun Microsystems, Inc. contributed to the
+   architecture and API proposed in this document.
+
+
+
+
+Expires 12/99                                                [Page 19]
+

+JAVA SASL API                                                June 1999
+
+8     Appendix A - Sample java LDAP program using SASL
+
+   /****************************************************************
+    It might look like this in LDAP. The Protocol Driver is
+    implemented as part of the authenticate method of
+    LDAPConnection.
+   ****************************************************************/
+
+   public class LDAPConnection {
+     public void authenticate( String dn,
+                               String[] mechs,
+                               Hashtable props,
+                               CallbackHandler cbh )
+                               throws SaslException {
+
+       // Create SASL client to use for authentication
+       SaslClient saslClnt = Sasl.createSaslClient(
+                   mechs, dn, "ldap", getHost(), props, cbh);
+
+       if (saslClnt == null) {
+           throw new SaslException("SASL client not available");
+       }
+
+       String mechName = saslClnt.getMechanismName();
+       byte[] response = saslClnt.createInitialResponse();
+
+       // Create a bind request message, including the initial
+
+       // response (if any), and send it off
+
+       LDAPSASLBindResponse msg =
+
+           writeRequest( new LDAPSASLBindRequest( dn, mechName,
+
+                                                  response ) );
+
+       // Get the server challenge
+       LDAPSASLBindResponse msg = (LDAPSASLBindResponse)readResponse();
+       // Authentication done?
+       while (!saslClnt.isComplete() &&
+              msg.getStatus() == LDAP_SASL_BIND_IN_PROGRESS) {
+           // No, get an appropriate next response and send it off
+           byte[] challenge = msg.getChallenge();
+           response = saslClnt.evaluateChallenge( challenge );
+           // May be a success message with no further challenge
+           if ( response != null ) {
+               // Wrap the response in another bind request and
+               // send it off
+               writeRequest( new LDAPSASLBindRequest( dn,
+                                               mechName, response ) );
+               msg = (LDAPSASLBindResponse)readResponse();
+           }
+       }
+       // Make sure authentication REALLY is complete
+       if ( !driver.isComplete() ) {
+           /* Authentication session hijacked! */
+           throw new SaslException( "SASL session hijacked!" );
+       }
+        // Get the negotiated security layer, if any
+
+
+Expires 12/99                                                [Page 20]
+

+JAVA SASL API                                                June 1999
+
+        security = saslClnt.getSecurityLayer();
+
+   }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires 12/99                                                [Page 21]
+

+JAVA SASL API                                                June 1999
+
+   /****************************************************************
+    This might be in an application
+   ****************************************************************/
+
+   /**
+    * A sample callback handler. This implementation is created by
+    * using the input that it will return. Other implementations are
+    * typically more sophisticated and might prompt the user on demand
+    * in order to satisfy the callbacks.
+    */
+   class SimpleCallbackHandler implements CallbackHandler {
+       private char[] passwd;
+       private String authenticationID;
+
+       SimpleCallbackHandler(String principal, Object cred)
+                             throws IOException {
+           authenticationID = principal;
+
+           if (cred instanceof String) {
+               passwd = ((String)cred).toCharArray();
+           } else if (cred instanceof char[]) {
+               passwd = (char[])((char[])cred).clone();
+           } else if (cred instanceof byte[]) {
+               // PasswordCallback expects char[]; assume UTF-8
+               // encoding
+               String orig = new String((byte[])cred, "UTF8");
+               passwd = orig.toCharArray();
+           } else {
+               throw new IOException("Unsupported password format: " +
+                                     cred);
+           }
+       }
+
+       public void invokeCallback(Callback[] callbacks)
+           throws java.io.IOException, UnsupportedCallbackException {
+           for (int i = 0; i < callbacks.length; i++) {
+               if (callbacks[i] instanceof NameCallback) {
+                   ((NameCallback)callbacks[i]).setName(
+                                                     authenticationID);
+
+               } else if (callbacks[i] instanceof PasswordCallback) {
+                   ((PasswordCallback)callbacks[i]).setPassword(
+                                                               passwd);
+               } else {
+                   throw new
+                         UnsupportedCallbackException(callbacks[i]);
+               }
+           }
+       }
+   }
+
+
+
+
+
+
+Expires 12/99                                                [Page 22]
+

+JAVA SASL API                                                June 1999
+
+   /***************************************************************
+     And so the application code to do authentication
+   ***************************************************************/
+
+    // Set up all SASL parameters; some may have reasonable defaults
+    Hashtable props = new Hashtable();
+    props.add("javax.security.sasl.encryption.minimum", "40");
+    props.add("javax.security.sasl.encryption.maximum", "128");
+    props.add("javax.security.sasl.server_authentication", "true");
+    props.add("javax.security.sasl.maxbuffer", "4096");
+    // The following two for kerberos v4, only
+    //props.add("javax.security.sasl.ip.local", "192.68.1.10");
+    //props.add("javax.security.sasl.ip.remote", "192.68.1.50");
+
+    // What we want to authenticate as
+    String dn = "cn=Directory Manager";
+
+    // Create an object for possible use by the authentication
+    // process
+    SimpleCallbackHandler cbh = new SimpleCallbackHandler();
+
+    try {
+      // Note: cbh methods may be called during authentication
+      // Note: "connection" includes the SASL Protocol Driver
+      // functionality, and it will internally manage a Mechanism
+      // Driver for GSSAPI, and then a Security Layer object for
+      // data translation
+      String[] mechNames = { "GSSAPI" };
+      connection.authenticate( dn, mechNames, props, cbh );
+    } catch ( SaslException e ) {
+      // Abort, return, maybe try some other authentication
+    }
+
+    // Okay. From here on, everything goes through security, but the
+    // methods have the same signatures as if we were not using SASL
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires 12/99                                                [Page 23]
+

+JAVA SASL API                                                June 1999
+
+9     Appendix B - Changes from draft-weltman-java-sasl-01.txt
+
+   The class hierarchy defined in this document is entirely different
+   from that defined in the previous document.
+
+   For callback handling, the newly released
+   javax.security.auth.callback package is used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Expires 12/99                                                [Page 24]
+

\ No newline at end of file
diff --git a/java/javax/Makefile.in b/java/javax/Makefile.in
deleted file mode 100644
index f60a3f9..0000000
--- a/java/javax/Makefile.in
+++ /dev/null
@@ -1,650 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java/javax
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = security
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/javax/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/java/javax/security/Makefile.in b/java/javax/security/Makefile.in
deleted file mode 100644
index 84046ca..0000000
--- a/java/javax/security/Makefile.in
+++ /dev/null
@@ -1,650 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java/javax/security
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = auth
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/security/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/javax/security/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/java/javax/security/auth/Makefile.in b/java/javax/security/auth/Makefile.in
deleted file mode 100644
index f101ea8..0000000
--- a/java/javax/security/auth/Makefile.in
+++ /dev/null
@@ -1,650 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java/javax/security/auth
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = callback
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/security/auth/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/javax/security/auth/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/java/javax/security/auth/callback/Makefile.in b/java/javax/security/auth/callback/Makefile.in
deleted file mode 100644
index 2a70921..0000000
--- a/java/javax/security/auth/callback/Makefile.in
+++ /dev/null
@@ -1,496 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = java/javax/security/auth/callback
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
-am__installdirs = "$(DESTDIR)$(javasasldir)"
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-javasasldir = $(prefix)/lib/java/classes/sasl/javax/security/auth/callback
-javahtmldir = $(prefix)/html/sasl
-javasasl_JAVA = PasswordCallback.java \
-	Callback.java \
-	RealmCallback.java \
-	CallbackHandler.java \
-	UnsupportedCallbackException.java \
-	NameCallback.java
-
-EXTRA_DIST = $(javasasl_JAVA)
-CLASSES = $(javasasl_JAVA:.java=.class)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/security/auth/callback/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu java/javax/security/auth/callback/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-classjavasasl.stamp: $(javasasl_JAVA)
-	@list1='$?'; list2=; if test -n "$$list1"; then \
-	  for p in $$list1; do \
-	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	    list2="$$list2 $$d$$p"; \
-	  done; \
-	  echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
-	  $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
-	else :; fi
-	echo timestamp > classjavasasl.stamp
-install-javasaslJAVA: classjavasasl.stamp
-	@$(NORMAL_INSTALL)
-	test -z "$(javasasldir)" || $(MKDIR_P) "$(DESTDIR)$(javasasldir)"
-	@test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
-	set x *.class; shift; test "$$1" != "*.class" || exit 0; \
-	echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(javasasldir)/$$p'"; \
-	$(INSTALL_DATA) "$$@" "$(DESTDIR)$(javasasldir)"
-
-uninstall-javasaslJAVA:
-	@$(NORMAL_UNINSTALL)
-	@test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
-	set x *.class; shift; test "$$1" != "*.class" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(javasasldir)' && rm -f" "$$@" ")"; \
-	cd "$(DESTDIR)$(javasasldir)" && rm -f "$$@"
-
-clean-javasaslJAVA:
-	-rm -f *.class classjavasasl.stamp
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile classjavasasl.stamp
-installdirs:
-	for dir in "$(DESTDIR)$(javasasldir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-javasaslJAVA clean-libtool \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-javasaslJAVA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-javasaslJAVA
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic \
-	clean-javasaslJAVA clean-libtool distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-javasaslJAVA install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-javasaslJAVA
-
-
-$(CLASSES): callback.stamp
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/lib/.gitignore b/lib/.gitignore
new file mode 100644
index 0000000..c5c464f
--- /dev/null
+++ b/lib/.gitignore
@@ -0,0 +1,6 @@
+Makefile.in
+Makefile
+.deps
+.libs
+*.l[ao]
+plugin_common.[ch]
diff --git a/lib/Makefile.am b/lib/Makefile.am
index b8964a8..4e68e32 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -45,28 +45,36 @@
 # CURRENT:REVISION:AGE
 sasl_version = 3:0:0
 
-INCLUDES=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
+AM_CPPFLAGS=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
 
-EXTRA_DIST = windlopen.c staticopen.h NTMakefile
+EXTRA_DIST = windlopen.c dlopen.c staticopen.h NTMakefile
 EXTRA_LIBRARIES = libsasl2.a
 noinst_LIBRARIES = @SASL_STATIC_LIBS@
 libsasl2_a_SOURCES=
 
 BUILT_SOURCES = $(SASL_STATIC_SRCS)
 
+if WINDOWS
+DLOPEN_C = windlopen.c
+else
+DLOPEN_C = dlopen.c
+endif
+
 common_headers = saslint.h
-common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
+common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c $(DLOPEN_C) ../plugins/plugin_common.c
 
 LTLIBOBJS = @LTLIBOBJS@
-LIBOBJS = @LIBOBJS@
 LIB_DOOR= @LIB_DOOR@
 
 lib_LTLIBRARIES = libsasl2.la
+noinst_LTLIBRARIES = libobj.la
+
+libobj_la_SOURCES =
+libobj_la_LIBADD = $(LTLIBOBJS)
 
 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
-libsasl2_la_LDFLAGS = -version-info $(sasl_version)
-libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
-libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
+libsasl2_la_LDFLAGS = -version-info $(sasl_version) -no-undefined
+libsasl2_la_LIBADD = libobj.la $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
 
 if MACOSX
 framedir = /Library/Frameworks/SASL2.framework
diff --git a/lib/Makefile.in b/lib/Makefile.in
deleted file mode 100644
index c1fefd8..0000000
--- a/lib/Makefile.in
+++ /dev/null
@@ -1,705 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the SASL library
-# Rob Earhart
-# $Id: Makefile.am,v 1.88 2011/09/05 14:18:10 murch Exp $
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = lib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	getaddrinfo.c getnameinfo.c getsubopt.c snprintf.c
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-libsasl2_a_AR = $(AR) $(ARFLAGS)
-libsasl2_a_LIBADD =
-am_libsasl2_a_OBJECTS =
-libsasl2_a_OBJECTS = $(am_libsasl2_a_OBJECTS)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-am__objects_1 = auxprop.lo canonusr.lo checkpw.lo client.lo common.lo \
-	config.lo external.lo md5.lo saslutil.lo server.lo seterror.lo \
-	dlopen.lo plugin_common.lo
-am__objects_2 =
-am_libsasl2_la_OBJECTS = $(am__objects_1) $(am__objects_2)
-libsasl2_la_OBJECTS = $(am_libsasl2_la_OBJECTS)
-libsasl2_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(libsasl2_la_LDFLAGS) $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libsasl2_a_SOURCES) $(libsasl2_la_SOURCES)
-DIST_SOURCES = $(libsasl2_a_SOURCES) $(libsasl2_la_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# Library version info - here at the top, for sanity
-# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
-# CURRENT:REVISION:AGE
-sasl_version = 3:0:0
-INCLUDES = -DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
-EXTRA_DIST = windlopen.c staticopen.h NTMakefile
-EXTRA_LIBRARIES = libsasl2.a
-noinst_LIBRARIES = @SASL_STATIC_LIBS@
-libsasl2_a_SOURCES = 
-BUILT_SOURCES = $(SASL_STATIC_SRCS)
-common_headers = saslint.h
-common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
-lib_LTLIBRARIES = libsasl2.la
-libsasl2_la_SOURCES = $(common_sources) $(common_headers)
-libsasl2_la_LDFLAGS = -version-info $(sasl_version)
-libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
-libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
- at MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu lib/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
-	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-	}
-
-uninstall-libLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-	done
-
-clean-libLTLIBRARIES:
-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libsasl2.la: $(libsasl2_la_OBJECTS) $(libsasl2_la_DEPENDENCIES) 
-	$(libsasl2_la_LINK) -rpath $(libdir) $(libsasl2_la_OBJECTS) $(libsasl2_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getnameinfo.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getsubopt.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auxprop.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/canonusr.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/checkpw.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/client.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/common.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/config.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dlopen.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/external.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/md5.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/plugin_common.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/saslutil.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/server.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/seterror.Plo at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-plugin_common.lo: ../plugins/plugin_common.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plugin_common.lo -MD -MP -MF $(DEPDIR)/plugin_common.Tpo -c -o plugin_common.lo `test -f '../plugins/plugin_common.c' || echo '$(srcdir)/'`../plugins/plugin_common.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/plugin_common.Tpo $(DEPDIR)/plugin_common.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../plugins/plugin_common.c' object='plugin_common.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plugin_common.lo `test -f '../plugins/plugin_common.c' || echo '$(srcdir)/'`../plugins/plugin_common.c
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES)
-installdirs:
-	for dir in "$(DESTDIR)$(libdir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
-	clean-noinstLIBRARIES mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf $(DEPDIR) ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-	@$(NORMAL_INSTALL)
-	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf $(DEPDIR) ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-libLTLIBRARIES
-
-.MAKE: all check install install-am install-exec-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libLTLIBRARIES clean-libtool clean-noinstLIBRARIES ctags \
-	distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-exec-hook install-html install-html-am \
-	install-info install-info-am install-libLTLIBRARIES \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-libLTLIBRARIES
-
- at MACOSX_TRUE@install-exec-hook:
- at MACOSX_TRUE@	$(mkinstalldirs) $(framedir)/Versions/A
- at MACOSX_TRUE@	ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
- at MACOSX_TRUE@	cd $(framedir) ; ln -fs Versions/A/SASL2 .
- at MACOSX_FALSE@install-exec-hook:
-
-libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
-	@echo adding static plugins and dependencies
-	$(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
-	@for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
-	if test ! -f $$i; then continue; fi; . $$i; \
-	for j in $$dependency_libs foo; do \
-	case $$j in foo) ;; \
-	-L*) for k in $$depdirs foo; do \
-	    if test $$k = $$j; then break; fi; done; \
-	  if test $$k = foo; then depdirs="$$depdirs $$j"; fi ;; \
-	-l*) for k in $$deplibs foo; do \
-	    if test $$k = $$j; then break; fi; done; \
-	  if test $$k = foo; then deplibs="$$deplibs $$j"; fi ;; \
-	esac; done; dependency_libs=""; done; \
-	sed -e "/^dependency_libs=/s%=.*%='$${depdirs}$${deplibs}'%" \
-	libsasl2.la >TMP.$$ && mv TMP.$$ libsasl2.la
-	rm -f $@
-	ln -s .libs/$@ $@
-
-$(SASL_STATIC_SRCS): linksrcs
-
-linksrcs:
-	-ln -s $(SASL_STATIC_SRCS) .
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/lib/checkpw.c b/lib/checkpw.c
index d371f3f..c38dffc 100644
--- a/lib/checkpw.c
+++ b/lib/checkpw.c
@@ -116,9 +116,9 @@ static int _sasl_make_plain_secret(const char *salt,
     }
 
     _sasl_MD5Init(&ctx);
-    _sasl_MD5Update(&ctx, salt, 16);
-    _sasl_MD5Update(&ctx, "sasldb", 6);
-    _sasl_MD5Update(&ctx, passwd, (unsigned int) passlen);
+    _sasl_MD5Update(&ctx, (const unsigned char *) salt, 16);
+    _sasl_MD5Update(&ctx, (const unsigned char *) "sasldb", 6);
+    _sasl_MD5Update(&ctx, (const unsigned char *) passwd, (unsigned int) passlen);
     memcpy((*secret)->data, salt, 16);
     (*secret)->data[16] = '\0';
     _sasl_MD5Final((*secret)->data + 17, &ctx);
@@ -368,8 +368,8 @@ int _sasl_auxprop_verify_apop(sasl_conn_t *conn,
     }
     
     _sasl_MD5Init(&ctx);
-    _sasl_MD5Update(&ctx, challenge, strlen(challenge));
-    _sasl_MD5Update(&ctx, auxprop_values[0].values[0],
+    _sasl_MD5Update(&ctx, (const unsigned char *) challenge, strlen(challenge));
+    _sasl_MD5Update(&ctx, (const unsigned char *) auxprop_values[0].values[0],
 		    strlen(auxprop_values[0].values[0]));
     _sasl_MD5Final(digest, &ctx);
 
@@ -659,7 +659,8 @@ static int saslauthd_verify_password(sasl_conn_t *conn,
 #endif
 
     /* check to see if the user configured a rundir */
-    if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
+    if (_sasl_getcallback(conn, SASL_CB_GETOPT,
+                          (sasl_callback_ft *)&getopt, &context) == SASL_OK) {
 	getopt(context, NULL, "saslauthd_path", &p, NULL);
     }
     if (p) {
@@ -1041,7 +1042,8 @@ static int authdaemon_verify_password(sasl_conn_t *conn,
     int sock = -1;
 
     /* check to see if the user configured a rundir */
-    if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
+    if (_sasl_getcallback(conn, SASL_CB_GETOPT,
+                          (sasl_callback_ft *)&getopt, &context) == SASL_OK) {
 	getopt(context, NULL, "authdaemond_path", &p, NULL);
     }
     if (!p) {
diff --git a/lib/client.c b/lib/client.c
index 62dfb0b..31fe346 100644
--- a/lib/client.c
+++ b/lib/client.c
@@ -658,6 +658,20 @@ _sasl_cbinding_disp(sasl_client_params_t *cparams,
     return SASL_OK;
 }
 
+static int
+_sasl_are_current_security_flags_worse_then_best(unsigned best_security_flags,
+						 unsigned current_security_flags)
+{
+    /* We don't qualify SASL_SEC_PASS_CREDENTIALS as "secure" flag */
+    best_security_flags &= ~SASL_SEC_PASS_CREDENTIALS;
+
+    if ((current_security_flags ^ best_security_flags) & best_security_flags) {
+	return 1;
+    } else {
+	return 0;
+    }
+}
+
 /* select a mechanism for a connection
  *  mechlist      -- mechanisms server has available (punctuation ignored)
  *  secret        -- optional secret from previous session
@@ -823,8 +837,9 @@ int sasl_client_start(sasl_conn_t *conn,
 	     */
 
 	    if (bestm &&
-		((m->m.plug->security_flags ^ bestm->m.plug->security_flags) &
-		 bestm->m.plug->security_flags)) {
+		_sasl_are_current_security_flags_worse_then_best(
+		    bestm->m.plug->security_flags,
+		    m->m.plug->security_flags)) {
 		break;
 	    }
 
diff --git a/lib/common.c b/lib/common.c
index e0f59eb..91ba4af 100644
--- a/lib/common.c
+++ b/lib/common.c
@@ -1045,10 +1045,10 @@ int sasl_getprop(sasl_conn_t *conn, int propnum, const void **pvalue)
       break;
   case SASL_GSS_CREDS:
       if(conn->type == SASL_CONN_CLIENT)
-	  *(void **)pvalue = 
+	  *(const void **)pvalue = 
               ((sasl_client_conn_t *)conn)->cparams->gss_creds;
       else
-	  *(void **)pvalue = 
+	  *(const void **)pvalue = 
               ((sasl_server_conn_t *)conn)->sparams->gss_creds;
       break;
   case SASL_HTTP_REQUEST: {
@@ -1362,6 +1362,7 @@ const char *sasl_errstring(int saslerr,
     case SASL_CONSTRAINT_VIOLAT: return "sasl_setpass can't store a property because "
 			        "of a constraint violation";
     case SASL_BADBINDING: return "channel binding failure";
+    case SASL_CONFIGERR:  return "error when parsing configuration file";
 
     default:   return "undefined error!";
     }
@@ -1525,12 +1526,9 @@ _sasl_getsimple(void *context,
 		size_t *len)
 {
   const char *userid;
-  sasl_conn_t *conn;
 
   if (! context || ! result) return SASL_BADPARAM;
 
-  conn = (sasl_conn_t *)context;
-
   switch(id) {
   case SASL_CB_AUTHNAME:
     userid = getenv("USER");
@@ -2428,6 +2426,11 @@ int _sasl_is_equal_mech(const char *req_mech,
         *plus = 0;
     }
 
+    if (n < strlen(plug_mech)) {
+	/* Don't allow arbitrary prefix match */
+	return 0;
+    }
+
     return (strncasecmp(req_mech, plug_mech, n) == 0);
 }
 
diff --git a/lib/config.c b/lib/config.c
index 7cae302..fde3757 100644
--- a/lib/config.c
+++ b/lib/config.c
@@ -91,7 +91,7 @@ int sasl_config_init(const char *filename)
 	}
 	if (*p != ':') {
 	    fclose(infile);
-	    return SASL_FAIL;
+	    return SASL_CONFIGERR;
 	}
 	*p++ = '\0';
 
@@ -99,7 +99,7 @@ int sasl_config_init(const char *filename)
 	
 	if (!*p) {
 	    fclose(infile);
-	    return SASL_FAIL;
+	    return SASL_CONFIGERR;
 	}
 
 	/* Now strip trailing spaces, if any */
diff --git a/lib/saslutil.c b/lib/saslutil.c
index 6174124..f13478a 100644
--- a/lib/saslutil.c
+++ b/lib/saslutil.c
@@ -131,7 +131,6 @@ int sasl_encode64(const char *_in,
     const unsigned char *in = (const unsigned char *)_in;
     unsigned char *out = (unsigned char *)_out;
     unsigned char oval;
-    char *blah;
     unsigned olen;
 
     /* check params */
@@ -147,7 +146,6 @@ int sasl_encode64(const char *_in,
     }
 
     /* Do the work... */
-    blah = (char *) out;
     while (inlen >= 3) {
       /* user provided max buffer size; make sure we don't go over it */
         *out++ = basis_64[in[0] >> 2];
@@ -607,7 +605,7 @@ LOWERCASE:
     return (0);
 }
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW64_VERSION_MAJOR)
 /***************************************************************************** 
  * 
  *  MODULE NAME : GETOPT.C 
diff --git a/lib/server.c b/lib/server.c
index 490b652..51309d6 100644
--- a/lib/server.c
+++ b/lib/server.c
@@ -650,7 +650,7 @@ static int load_config(const sasl_callback_t *verifyfile_cb)
             goto done;
         }
 
-        snprintf(config_filename, len, "%.*s%c%s.conf", path_len, path_to_config, 
+        snprintf(config_filename, len, "%.*s%c%s.conf", (int)path_len, path_to_config,
 	        HIER_DELIMITER, global_callbacks.appname);
 
         /* Ask the application if it's safe to use this file */
diff --git a/libsasl2.pc.in b/libsasl2.pc.in
index 40bea37..ddad76d 100644
--- a/libsasl2.pc.in
+++ b/libsasl2.pc.in
@@ -1,8 +1,12 @@
-libdir = @libdir@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
 
 Name: Cyrus SASL
 Description: Cyrus SASL implementation
 URL: http://www.cyrussasl.org/
 Version: @VERSION@
+Cflags: -I${includedir}
 Libs: -L${libdir} -lsasl2
 Libs.private: @LIB_DOOR@ @SASL_DL_LIB@ @LIBS@
diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4
new file mode 100644
index 0000000..77fd346
--- /dev/null
+++ b/m4/ax_prog_cc_for_build.m4
@@ -0,0 +1,125 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PROG_CC_FOR_BUILD
+#
+# DESCRIPTION
+#
+#   This macro searches for a C compiler that generates native executables,
+#   that is a C compiler that surely is not a cross-compiler. This can be
+#   useful if you have to generate source code at compile-time like for
+#   example GCC does.
+#
+#   The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
+#   needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
+#   The value of these variables can be overridden by the user by specifying
+#   a compiler with an environment variable (like you do for standard CC).
+#
+#   It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
+#   file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
+#   the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
+#   substituted in the Makefile.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Paolo Bonzini <bonzini at gnu.org>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 8
+
+AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
+AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+dnl Use the standard macros, but make them use other variable names
+dnl
+pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
+pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
+pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
+pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
+pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
+pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
+pushdef([ac_cv_objext], ac_cv_build_objext)dnl
+pushdef([ac_exeext], ac_build_exeext)dnl
+pushdef([ac_objext], ac_build_objext)dnl
+pushdef([CC], CC_FOR_BUILD)dnl
+pushdef([CPP], CPP_FOR_BUILD)dnl
+pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
+pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
+pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
+pushdef([host], build)dnl
+pushdef([host_alias], build_alias)dnl
+pushdef([host_cpu], build_cpu)dnl
+pushdef([host_vendor], build_vendor)dnl
+pushdef([host_os], build_os)dnl
+pushdef([ac_cv_host], ac_cv_build)dnl
+pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
+pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
+pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
+pushdef([ac_cv_host_os], ac_cv_build_os)dnl
+pushdef([ac_cpp], ac_build_cpp)dnl
+pushdef([ac_compile], ac_build_compile)dnl
+pushdef([ac_link], ac_build_link)dnl
+
+save_cross_compiling=$cross_compiling
+save_ac_tool_prefix=$ac_tool_prefix
+cross_compiling=no
+ac_tool_prefix=
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_EXEEXT
+
+ac_tool_prefix=$save_ac_tool_prefix
+cross_compiling=$save_cross_compiling
+
+dnl Restore the old definitions
+dnl
+popdef([ac_link])dnl
+popdef([ac_compile])dnl
+popdef([ac_cpp])dnl
+popdef([ac_cv_host_os])dnl
+popdef([ac_cv_host_vendor])dnl
+popdef([ac_cv_host_cpu])dnl
+popdef([ac_cv_host_alias])dnl
+popdef([ac_cv_host])dnl
+popdef([host_os])dnl
+popdef([host_vendor])dnl
+popdef([host_cpu])dnl
+popdef([host_alias])dnl
+popdef([host])dnl
+popdef([LDFLAGS])dnl
+popdef([CPPFLAGS])dnl
+popdef([CFLAGS])dnl
+popdef([CPP])dnl
+popdef([CC])dnl
+popdef([ac_objext])dnl
+popdef([ac_exeext])dnl
+popdef([ac_cv_objext])dnl
+popdef([ac_cv_exeext])dnl
+popdef([ac_cv_prog_cc_g])dnl
+popdef([ac_cv_prog_cc_cross])dnl
+popdef([ac_cv_prog_cc_works])dnl
+popdef([ac_cv_prog_gcc])dnl
+popdef([ac_cv_prog_CPP])dnl
+
+dnl Finally, set Makefile variables
+dnl
+BUILD_EXEEXT=$ac_build_exeext
+BUILD_OBJEXT=$ac_build_objext
+AC_SUBST(BUILD_EXEEXT)dnl
+AC_SUBST(BUILD_OBJEXT)dnl
+AC_SUBST([CFLAGS_FOR_BUILD])dnl
+AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
+AC_SUBST([LDFLAGS_FOR_BUILD])dnl
+])
diff --git a/cmulocal/berkdb.m4 b/m4/berkdb.m4
similarity index 100%
rename from cmulocal/berkdb.m4
rename to m4/berkdb.m4
diff --git a/cmulocal/bsd_sockets.m4 b/m4/bsd_sockets.m4
similarity index 67%
rename from cmulocal/bsd_sockets.m4
rename to m4/bsd_sockets.m4
index 0eba8a3..9d75044 100644
--- a/cmulocal/bsd_sockets.m4
+++ b/m4/bsd_sockets.m4
@@ -1,14 +1,32 @@
 dnl bsd_sockets.m4--which socket libraries do we need? 
 dnl Derrick Brashear
 dnl from Zephyr
-dnl $Id: bsd_sockets.m4,v 1.11 2010/02/18 16:19:07 murch Exp $
 
 dnl Hacked on by Rob Earhart to not just toss stuff in LIBS
 dnl It now puts everything required for sockets into LIB_SOCKET
 
 AC_DEFUN([CMU_SOCKETS], [
 	save_LIBS="$LIBS"
-	LIB_SOCKET=""
+	AC_CHECK_HEADERS([sys/socket.h ws2tcpip.h])
+	AC_CHECK_FUNC(socket, , [
+		AC_CHECK_LIB(socket, socket, [LIB_SOCKET=-lsocket], [
+			LIBS="$LIBS -lws2_32"
+			AC_LINK_IFELSE([
+				AC_LANG_PROGRAM([[
+					#ifdef HAVE_SYS_SOCKET_H
+					#	include <sys/socket.h>
+					#endif
+					#ifdef HAVE_WS2TCPIP_H
+					#	include <ws2tcpip.h>
+					#endif
+				]], [[return socket(0, 0, 0);]])
+			],
+			[LIB_SOCKET=-lws2_32
+			 AC_MSG_RESULT(yes)],
+			[AC_MSG_ERROR([socket not found])])
+		])
+	])
+	LIBS="$save_LIBS"
 	AC_CHECK_FUNC(connect, :,
 		[AC_CHECK_LIB(nsl, gethostbyname,
 			     LIB_SOCKET="-lnsl $LIB_SOCKET")
diff --git a/cmulocal/c-attribute.m4 b/m4/c-attribute.m4
similarity index 71%
rename from cmulocal/c-attribute.m4
rename to m4/c-attribute.m4
index 39fbf44..30a4049 100644
--- a/cmulocal/c-attribute.m4
+++ b/m4/c-attribute.m4
@@ -1,8 +1,4 @@
 dnl
-dnl $Id: c-attribute.m4,v 1.5 2010/01/06 17:01:27 murch Exp $
-dnl
-
-dnl
 dnl Test for __attribute__
 dnl
 
@@ -16,7 +12,7 @@ static void foo(void) __attribute__ ((noreturn));
 static void
 foo(void)
 {
-  exit(1);
+exit(1);
 }
 ],
 [
@@ -24,8 +20,7 @@ foo(void)
 ac_cv___attribute__=yes,
 ac_cv___attribute__=no)])
 if test "$ac_cv___attribute__" = "yes"; then
-  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
+AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
 fi
 AC_MSG_RESULT($ac_cv___attribute__)
 ])
-
diff --git a/cmulocal/common.m4 b/m4/common.m4
similarity index 96%
rename from cmulocal/common.m4
rename to m4/common.m4
index 8855129..51cdcd8 100644
--- a/cmulocal/common.m4
+++ b/m4/common.m4
@@ -1,5 +1,3 @@
-dnl $Id: common.m4,v 1.13 2006/02/25 18:29:46 cg2v Exp $
-
 AC_DEFUN([CMU_TEST_LIBPATH], [
 changequote(<<, >>)
 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
diff --git a/cmulocal/cyrus.m4 b/m4/cyrus.m4
similarity index 96%
rename from cmulocal/cyrus.m4
rename to m4/cyrus.m4
index bae739f..0f9ac48 100644
--- a/cmulocal/cyrus.m4
+++ b/m4/cyrus.m4
@@ -1,6 +1,5 @@
 dnl
 dnl Additional macros for configure.in packaged up for easier theft.
-dnl $Id: cyrus.m4,v 1.6 2010/01/06 17:01:27 murch Exp $
 dnl tjs at andrew.cmu.edu 6-may-1998
 dnl
 
diff --git a/cmulocal/ipv6.m4 b/m4/ipv6.m4
similarity index 100%
rename from cmulocal/ipv6.m4
rename to m4/ipv6.m4
diff --git a/saslauthd/config/kerberos_v4.m4 b/m4/kerberos_v4.m4
similarity index 95%
rename from saslauthd/config/kerberos_v4.m4
rename to m4/kerberos_v4.m4
index 7884743..0e9b58c 100644
--- a/saslauthd/config/kerberos_v4.m4
+++ b/m4/kerberos_v4.m4
@@ -89,18 +89,18 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [
     dnl if we were ambitious, we would look more aggressively for the
     dnl krb4 install
     if test -d ${krb4}; then
-       AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
+       AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [
          for krbhloc in include/kerberosIV include/kerberos include
          do
            if test -f ${krb4}/${krbhloc}/krb.h ; then
-             cyrus_krbinclude=${krb4}/${krbhloc}
+             cyrus_cv_krbinclude=${krb4}/${krbhloc}
              break
            fi
          done
          ])
 
-       if test -n "${cyrus_krbinclude}"; then
-         CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
+       if test -n "${cyrus_cv_krbinclude}"; then
+         CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}"
        fi
        LDFLAGS="$LDFLAGS -L$krb4/lib"
     fi
diff --git a/cmulocal/openldap.m4 b/m4/openldap.m4
similarity index 95%
rename from cmulocal/openldap.m4
rename to m4/openldap.m4
index 301062b..5d0578f 100644
--- a/cmulocal/openldap.m4
+++ b/m4/openldap.m4
@@ -1,6 +1,5 @@
 dnl
 dnl macros for configure.in to detect openldap
-dnl $Id: openldap.m4,v 1.2 2006/03/13 19:16:11 mel Exp $
 dnl
 
 dnl
diff --git a/cmulocal/openssl.m4 b/m4/openssl.m4
similarity index 89%
rename from cmulocal/openssl.m4
rename to m4/openssl.m4
index 1b9b488..b1d7857 100644
--- a/cmulocal/openssl.m4
+++ b/m4/openssl.m4
@@ -1,11 +1,11 @@
 dnl
 dnl macros for configure.in to detect openssl
-dnl $Id: openssl.m4,v 1.11 2006/05/17 18:30:19 murch Exp $
 dnl
 
 AC_DEFUN([CMU_HAVE_OPENSSL], [
 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
-AC_ARG_WITH(openssl,[  --with-openssl=PATH     use OpenSSL from PATH],
+AC_ARG_WITH(openssl,
+	[AS_HELP_STRING([--with-openssl=DIR], [use OpenSSL from DIR])],
 	with_openssl=$withval, with_openssl="yes")
 
 	save_CPPFLAGS=$CPPFLAGS
diff --git a/config/plain.m4 b/m4/plain.m4
similarity index 100%
rename from config/plain.m4
rename to m4/plain.m4
diff --git a/cmulocal/sasl2.m4 b/m4/sasl2.m4
similarity index 93%
rename from cmulocal/sasl2.m4
rename to m4/sasl2.m4
index 3c2841a..dd0ec69 100644
--- a/cmulocal/sasl2.m4
+++ b/m4/sasl2.m4
@@ -1,6 +1,5 @@
 # sasl2.m4--sasl2 libraries and includes
 # Rob Siemborski
-# $Id: sasl2.m4,v 1.61 2011/11/09 15:49:47 murch Exp $
 
 # SASL2_CRYPT_CHK
 # ---------------
@@ -41,7 +40,7 @@ if test "$gssapi" != no; then
     *)
       AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script])
       if test "$gss_impl" = "cybersafe"; then
-        AC_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
+        AC_MSG_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
       fi
       ;;
   esac
@@ -66,8 +65,7 @@ if test "$gssapi" != no; then
     fi
   fi
   AC_CHECK_HEADER([gssapi.h],,
-                  [AC_CHECK_HEADER([gssapi/gssapi.h],,
-                                   [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])])
+                  [AC_CHECK_HEADER([gssapi/gssapi.h],, [gssapi=no])])
   AC_CHECK_HEADERS(gssapi/gssapi_ext.h)
   CPPFLAGS=$cmu_saved_CPPFLAGS
 
@@ -252,7 +250,6 @@ if test "$gssapi" != "no"; then
   fi
 fi
 
-GSSAPI_LIBS=""
 AC_MSG_CHECKING([GSSAPI])
 if test "$gssapi" != no; then
   AC_MSG_RESULT([with implementation ${gss_impl}])
@@ -269,6 +266,18 @@ if test "$gssapi" != no; then
   cmu_save_LIBS="$LIBS"
   LIBS="$LIBS $GSSAPIBASE_LIBS"
   AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
+  if test "$ac_cv_func_gsskrb5_register_acceptor_identity" = no ; then
+    AC_CHECK_HEADERS(gssapi/gssapi_krb5.h)
+    if test "$ac_cv_header_gssapi_gssapi_krb5_h" = "yes"; then
+      AC_CHECK_DECL(gsskrb5_register_acceptor_identity,
+                    [AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,1,
+                               [Define if your GSSAPI implementation defines gsskrb5_register_acceptor_identity])],,
+                    [
+                    AC_INCLUDES_DEFAULT
+                    #include <gssapi/gssapi_krb5.h>
+                    ])
+    fi
+  fi
   AC_CHECK_FUNCS(gss_decapsulate_token)
   AC_CHECK_FUNCS(gss_encapsulate_token)
   AC_CHECK_FUNCS(gss_oid_equal)
@@ -312,7 +321,6 @@ int main(void)
 else
   AC_MSG_RESULT([disabled])
 fi
-AC_SUBST(GSSAPI_LIBS)
 AC_SUBST(GSSAPIBASE_LIBS)
 ])# SASL_GSSAPI_CHK
 
@@ -385,9 +393,10 @@ if test ${with_staticsasl} != "no"; then
                                         LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
                                       fi
                                     done
+                                    AC_CHECK_FUNC(dlopen,,[AC_CHECK_LIB(dl, dlopen, [LIB_SASL+="$LIB_SASL -ldl"])])
                                     if test ! "$ac_cv_found_sasl" = "yes"; then
                                       AC_MSG_CHECKING([for static libsasl])
-                                      AC_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
+                                      AC_MSG_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
                                     fi])])
 
   AC_MSG_RESULT([found])
@@ -458,7 +467,7 @@ AC_SUBST(SASLFLAGS)
 AC_DEFUN([CMU_SASL2_REQUIRED],
 [AC_REQUIRE([CMU_SASL2])
 if test "$ac_cv_found_sasl" != "yes"; then
-  AC_ERROR([Cannot continue without libsasl2.
+  AC_MSG_ERROR([Cannot continue without libsasl2.
 Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
 fi])
 
@@ -488,7 +497,7 @@ AC_TRY_CPP([
 #error SASL version is less than $1.$2.$3
 #endif
 ],,
-           [AC_ERROR([Incorrect SASL headers found.  This package requires SASL $1.$2.$3 or newer.])])
+           [AC_MSG_ERROR([Incorrect SASL headers found.  This package requires SASL $1.$2.$3 or newer.])])
 
 CPPFLAGS=$cmu_saved_CPPFLAGS
 ])# CMU_SASL2_REQUIRE_VER
diff --git a/config/sasldb.m4 b/m4/sasldb.m4
similarity index 86%
rename from config/sasldb.m4
rename to m4/sasldb.m4
index b28b087..b43eb84 100644
--- a/config/sasldb.m4
+++ b/m4/sasldb.m4
@@ -5,7 +5,9 @@ dnl Berkeley DB specific checks first..
 dnl Figure out what database type we're using
 AC_DEFUN([SASL_DB_CHECK], [
 cmu_save_LIBS="$LIBS"
-AC_ARG_WITH(dblib, [  --with-dblib=DBLIB      set the DB library to use [berkeley] ],
+AC_ARG_WITH(dblib,
+  [AC_HELP_STRING([--with-dblib={berkeley|gdbm|lmdb|ndbm|none|auto_detect}],
+  [set the DB library to use [[berkeley]]])],
   dblib=$withval,
   dblib=auto_detect)
 
@@ -43,6 +45,11 @@ dnl named.  arg.
                fi
        esac
 	;;
+  lmdb)
+    AC_CHECK_HEADER(lmdb.h, [
+		AC_CHECK_LIB(lmdb, mdb_env_create, SASL_DB_LIB="-llmdb"; enable_keep_db_open=yes, dblib="no")],
+		dblib="no")
+	;;
   ndbm)
 	dnl We want to attempt to use -lndbm if we can, just in case
 	dnl there's some version of it installed and overriding libc
@@ -55,6 +62,12 @@ dnl named.  arg.
         dnl How about berkeley db?
 	CYRUS_BERKELEY_DB_CHK()
 	if test "$dblib" = no; then
+	  dnl How about OpenLDAP's mdb?
+      AC_CHECK_HEADER(lmdb.h, [
+		AC_CHECK_LIB(lmdb, mdb_env_create, SASL_DB_LIB="-llmdb"; enable_keep_db_open=yes, dblib="no")],
+		dblib="no")
+	fi
+	if test "$dblib" = no; then
 	  dnl How about ndbm?
 	  AC_CHECK_HEADER(ndbm.h, [
 		AC_CHECK_LIB(ndbm, dbm_open,
@@ -86,7 +99,7 @@ dnl named.  arg.
 	;;
   *)
 	AC_MSG_WARN([Bad DB library implementation specified;])
-	AC_ERROR([Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"])
+	AC_ERROR([Use either \"berkeley\", \"gdbm\", \"lmdb\", \"ndbm\" or \"none\"])
 	dblib=no
 	;;
 esac
@@ -106,6 +119,10 @@ case "$dblib" in
     SASL_MECHS="$SASL_MECHS libsasldb.la"
     AC_DEFINE(SASL_GDBM,[],[Use GDBM for SASLdb])
     ;;
+  lmdb)
+    SASL_MECHS="$SASL_MECHS libsasldb.la"
+    AC_DEFINE(SASL_LMDB,[],[Use LMDB for SASLdb])
+    ;;
   ndbm)
     SASL_MECHS="$SASL_MECHS libsasldb.la"
     AC_DEFINE(SASL_NDBM,[],[Use NDBM for SASLdb])
diff --git a/mac/CommonKClient/mac_kclient3/Headers/TicketKeeper/TicketKeeperMenuStateProtocol.h b/mac/CommonKClient/mac_kclient3/Headers/TicketKeeper/TicketKeeperMenuStateProtocol.h
new file mode 100755
index 0000000..1064938
--- /dev/null
+++ b/mac/CommonKClient/mac_kclient3/Headers/TicketKeeper/TicketKeeperMenuStateProtocol.h
@@ -0,0 +1 @@
+/*
 * TicketKeeperMenuStateProcotol.h
 *
 * Declarations of types for constants used in the Process-to-Process Communication
 * protocol used between TicketKeeperLib and TicketKeeper. This should not be used
 * by others
 *
 */
 
#ifndef TicketKeeperMenuStateProcotol_h
#define TicketKeeperMenuStateProcotol_h

#if PRAGMA_STRUCT_ALIGN
	#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
	#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
	#pragma pack(2)
#endif

/* Use these to find the PPC port for TicketKeeper */
enum {
	mkPort_Creator = FOUR_CHAR_CODE ('MnuK'),
	mkPort_Type = FOUR_CHAR_CODE ('appe')
};
	
/* Use these on PPC blocks sent to TK. The block type determines what command you are sending */
enum {
	mkBlock_Creator = FOUR_CHAR_CODE ('MnuK'),
	mkBlock_Type_MenuState = FOUR_CHAR_CODE ('Menu'),
	mkBlock_Type_SetDefault	= FOUR_CHAR_CODE ('SDef'),
	mkBlock_Type_Logout	= FOUR_CHAR_CODE ('LotP'),
	mkBlock_Type_LogoutDefault	= FOUR_CHAR_CODE ('Lout'),
	mkBlock_Type_NewLogin	= FOUR_CHAR_CODE ('Logn'),
	mkBlock_Type_Renew	= FOUR_CHAR_CODE ('RnwP'),
	mkBlock_Type_RenewDefault	= FOUR_CHAR_CODE ('Renw'),
	mkBlock_Type_ChangePassword = FOUR_CHAR_CODE ('ChpP'),
	mkBlock_Type_ChangePasswordDefault = FOUR_CHAR_CODE ('Chps'),
	mkBlock_Type_MoveFloaterStructureRegion	= FOUR_CHAR_CODE ('MFst'),
	mkBlock_Type_SetDrawPies	= FOUR_CHAR_CODE ('pie?'),
	mkBlock_Type_SetHasCloseBox	= FOUR_CHAR_CODE ('cls?'),
	mkBlock_Type_SetIsVisible	= FOUR_CHAR_CODE ('vis?'),
	mkBlock_Type_SetIsZoomedOut	= FOUR_CHAR_CODE ('zum?'),
	mkBlock_Type_GetIsVisible = FOUR_CHAR_CODE ('?vis'),
	mkBlock_Type_GetDrawPies = FOUR_CHAR_CODE ('?pie'),
	mkBlock_Type_GetHasCloseBox = FOUR_CHAR_CODE ('?cls'),
	mkBlock_Type_GetIsZoomedOut = FOUR_CHAR_CODE ('?zum'),
	mkBlock_Type_OpenKerberosControlPanel = FOUR_CHAR_CODE ('OKCP')
};

/* Version number for menu state command */
enum {
	mkReply_MenuState_CurrentVersion = 2
};

/*
 * MenuState ('Menu') command returns a blob of data in the following format:
 * (but you should really use the functions in TickerKeeperLib.h to parse it)
 *
 * 	[4 Bytes]	Size of the structure
 * 	[4 Bytes]	Version of the structure (current = 2)
 *
 *	[4 Bytes]	Last change time for the default cache information
 *	[4 Bytes]	Last change time for the cache list information
 *	[4 Bytes]	1 if default cache has valid tickets, 0 otherwise
 * 	[4 bytes]	Expiration time of the default cache in Mac epoch
 *	[PString]	Principal of the default cache
 *  [PString]	Display principal of the default cache (quoting removed)
 *  [PString]	Short display principal of the default cache (quoting and default realm removed)
 *
 *	[4 Bytes]	Number of caches
 *
 *	[4 Bytes]	1 if the first cache is default
 *	[4 Bytes]	Version of the first cache
 *	[4 Bytes]	1 if the first cache has valid tickets
 *	[4 Bytes]	start time of the first cache
 *	[4 Bytes]	expiration time of the first cache
 *	[PString]	Principal of the 1st cache
 *  [PString]	Display principal if the 1st cache (quoting removed)
 *  [PString]	Short display principal if the 1st cache (quoting and default realm removed)
 *
 *	   ...
 *
 *	[4 Bytes]	1 if the last cache is default
 *	[4 Bytes]	Version of the last cache
 *	[4 Bytes]	1 if the last cache has valid tickets
 *	[4 Bytes]	start time of the last cache
 *	[4 Bytes]	expiration time of the last cache
 *	[PString]	Principal of the last cache
 *  [PString]	Display principal if the nth cache (quoting removed)
 *  [PString]	Short display principal if the nth cache (quoting and default realm removed)
 */

struct MenuStateHeader {
	UInt32	version;
	UInt32	defaultCacheLastChangeTime;
	UInt32	cacheListLastChangeTime;
	UInt32	defaultCacheHasValidTickets;
	UInt32	defaultCacheExpiration;
	Str255	defaultCachePrincipal;
};

struct CacheEntry {
	UInt32	isDefault;
	UInt32	version;
	UInt32	isValid;
	UInt32	startTime;
	UInt32	expirationTime;
	Str255	principal;
};

struct CacheList {
	UInt32		numCaches;
	CacheEntry	cacheList;
};

/*
 * SetDefaultPrincipal, Logout, and Renew commands take a blob of data which contains the 
 * new principal to be made default (version + string format)
 */
 
struct PrincipalParam {
	UInt32		version;
	Str255		principal;
};

struct MoveFloaterStructureRegionParam {
	Rect		bounds;
};

typedef PrincipalParam SetDefaultParam;
typedef PrincipalParam LogoutParam;
typedef PrincipalParam RenewParam;
typedef PrincipalParam ChangePasswordParam;

typedef Boolean			SetDrawPiesParam;
typedef Boolean			SetHasCloseBoxParam;
typedef Boolean			SetIsVisibleParam;
typedef Boolean			SetIsZoomedOutParam;

#if PRAGMA_STRUCT_ALIGN
	#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
	#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
	#pragma pack()
#endif

#endif /* TicketKeeperMenuStateProcotol_h */
\ No newline at end of file
diff --git a/man/Makefile.in b/man/Makefile.in
deleted file mode 100644
index 561a9d0..0000000
--- a/man/Makefile.in
+++ /dev/null
@@ -1,547 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for SASL documentation
-#
-################################################################
-# Copyright (c) 2001 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = man
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-man3dir = $(mandir)/man3
-am__installdirs = "$(DESTDIR)$(man3dir)"
-NROFF = nroff
-MANS = $(man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-man_MANS = sasl_authorize_t.3 sasl_done.3 sasl_listmech.3 sasl_callbacks.3 \
-           sasl_encode.3 sasl_encodev.3 sasl_log_t.3 sasl_checkpass.3 \
-           sasl_errstring.3 sasl_dispose.3 sasl_canon_user_t.3 \
-           sasl_server_init.3 sasl_client_init.3 sasl_getopt_t.3 \
-           sasl_server_new.3 sasl_client_new.3 sasl_getpath_t.3  \
-           sasl_server_start.3 sasl_client_start.3 sasl_getprop.3 \
-           sasl_server_step.3 sasl_client_step.3  sasl_getsecret_t.3 \
-           sasl_setprop.3 sasl_decode.3 sasl_getsimple_t.3 sasl.3 \
-	   sasl_checkapop.3 sasl_errors.3 sasl_verifyfile_t.3 \
-	   sasl_getrealm_t.3 sasl_chalprompt_t.3 sasl_auxprop_request.3 \
-	   sasl_auxprop_getctx.3 sasl_auxprop.3 sasl_idle.3 \
-	   sasl_errdetail.3 sasl_user_exists.3 sasl_setpass.3 \
-	   sasl_server_userdb_checkpass_t.3 sasl_server_userdb_setpass_t.3 \
-	   sasl_global_listmech.3 sasl_getconfpath_t.3
-
-EXTRA_DIST = $(man_MANS)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu man/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-man3: $(man_MANS)
-	@$(NORMAL_INSTALL)
-	test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
-	@list=''; test -n "$(man3dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.3[a-z]*$$/p'; \
-	} | while read p; do \
-	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; echo "$$p"; \
-	done | \
-	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
-	sed 'N;N;s,\n, ,g' | { \
-	list=; while read file base inst; do \
-	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
-	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
-	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
-	  fi; \
-	done; \
-	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
-	while read files; do \
-	  test -z "$$files" || { \
-	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
-	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
-	done; }
-
-uninstall-man3:
-	@$(NORMAL_UNINSTALL)
-	@list=''; test -n "$(man3dir)" || exit 0; \
-	files=`{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.3[a-z]*$$/p'; \
-	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@list='$(MANS)'; if test -n "$$list"; then \
-	  list=`for p in $$list; do \
-	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-	  if test -n "$$list" && \
-	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
-	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
-	    exit 1; \
-	  else :; fi; \
-	else :; fi
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(MANS)
-installdirs:
-	for dir in "$(DESTDIR)$(man3dir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man: install-man3
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-man
-
-uninstall-man: uninstall-man3
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-man3 \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-man uninstall-man3
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/plugins/.gitignore b/plugins/.gitignore
new file mode 100644
index 0000000..a4056e4
--- /dev/null
+++ b/plugins/.gitignore
@@ -0,0 +1,6 @@
+Makefile.in
+Makefile
+.deps
+.libs
+*.l[ao]
+*_init.c
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index d570de1..452596e 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -49,10 +49,10 @@
 # CURRENT:REVISION:AGE
 plugin_version = 3:0:0
 
-INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
-AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
+AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
+AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version) -no-undefined
 
-COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
+COMPAT_OBJS = $(top_builddir)/lib/libobj.la
 
 EXTRA_DIST = makeinit.sh NTMakefile
 noinst_SCRIPTS = makeinit.sh
@@ -71,11 +71,11 @@ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
 
 libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
 libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
-libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
+libplain_la_LIBADD = $(PLAIN_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
 libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
-libanonymous_la_LIBADD = $(COMPAT_OBJS)
+libanonymous_la_LIBADD = $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
 libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
@@ -91,7 +91,7 @@ libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT
 
 libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
 libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
-libcrammd5_la_LIBADD = $(COMPAT_OBJS)
+libcrammd5_la_LIBADD = $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
 libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
@@ -99,32 +99,32 @@ libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libscram_la_SOURCES = scram.c scram_init.c $(common_sources)
 libscram_la_DEPENDENCIES = $(COMPAT_OBJS)
-libscram_la_LIBADD = $(SCRAM_LIBS) $(COMPAT_OBJS)
+libscram_la_LIBADD = $(SCRAM_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 liblogin_la_SOURCES = login.c login_init.c $(common_sources)
 liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
-liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
+liblogin_la_LIBADD = $(PLAIN_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
 libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
-libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
+libsrp_la_LIBADD = $(SRP_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
 libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
-libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
+libotp_la_LIBADD = $(OTP_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
 libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
-libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
+libntlm_la_LIBADD = $(NTLM_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
 libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
-libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
+libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 # Auxprop Plugins
 libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
 libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
-libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
+libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
 
 libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
 libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
@@ -148,11 +148,3 @@ CLEANFILES=$(init_src)
 
 ${init_src}: $(srcdir)/makeinit.sh
 	$(SHELL) $(srcdir)/makeinit.sh
-
-# Compatibility function build rules (they build in lib/)
-$(COMPAT_OBJS):
-	rm -f $(COMPAT_OBJS)
-	cd ../lib; $(MAKE) $(COMPAT_OBJS)
-	for file in $(COMPAT_OBJS); do ln -s ../lib/$$file .; done
-
-
diff --git a/plugins/Makefile.in b/plugins/Makefile.in
deleted file mode 100644
index da7956f..0000000
--- a/plugins/Makefile.in
+++ /dev/null
@@ -1,818 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the SASL plugins
-# Rob Siemborski
-# Rob Earhart
-# $Id: Makefile.am,v 1.86 2011/09/05 14:18:10 murch Exp $
-#
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = plugins
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(sasldir)"
-LTLIBRARIES = $(sasl_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-am__objects_1 = plugin_common.lo
-am_libanonymous_la_OBJECTS = anonymous.lo anonymous_init.lo \
-	$(am__objects_1)
-libanonymous_la_OBJECTS = $(am_libanonymous_la_OBJECTS)
-am_libcrammd5_la_OBJECTS = cram.lo crammd5_init.lo $(am__objects_1)
-libcrammd5_la_OBJECTS = $(am_libcrammd5_la_OBJECTS)
-am_libdigestmd5_la_OBJECTS = digestmd5.lo digestmd5_init.lo \
-	$(am__objects_1)
-libdigestmd5_la_OBJECTS = $(am_libdigestmd5_la_OBJECTS)
-am_libgs2_la_OBJECTS = gs2.lo gs2_init.lo gs2_token.lo \
-	$(am__objects_1)
-libgs2_la_OBJECTS = $(am_libgs2_la_OBJECTS)
-am_libgssapiv2_la_OBJECTS = gssapi.lo gssapiv2_init.lo \
-	$(am__objects_1)
-libgssapiv2_la_OBJECTS = $(am_libgssapiv2_la_OBJECTS)
-am_libkerberos4_la_OBJECTS = kerberos4.lo kerberos4_init.lo \
-	$(am__objects_1)
-libkerberos4_la_OBJECTS = $(am_libkerberos4_la_OBJECTS)
-am_libldapdb_la_OBJECTS = ldapdb.lo ldapdb_init.lo $(am__objects_1)
-libldapdb_la_OBJECTS = $(am_libldapdb_la_OBJECTS)
-am_liblogin_la_OBJECTS = login.lo login_init.lo $(am__objects_1)
-liblogin_la_OBJECTS = $(am_liblogin_la_OBJECTS)
-am_libntlm_la_OBJECTS = ntlm.lo ntlm_init.lo $(am__objects_1)
-libntlm_la_OBJECTS = $(am_libntlm_la_OBJECTS)
-am_libotp_la_OBJECTS = otp.lo otp_init.lo $(am__objects_1)
-libotp_la_OBJECTS = $(am_libotp_la_OBJECTS)
-am_libpassdss_la_OBJECTS = passdss.lo passdss_init.lo $(am__objects_1)
-libpassdss_la_OBJECTS = $(am_libpassdss_la_OBJECTS)
-am_libplain_la_OBJECTS = plain.lo plain_init.lo $(am__objects_1)
-libplain_la_OBJECTS = $(am_libplain_la_OBJECTS)
-am_libsasldb_la_OBJECTS = sasldb.lo sasldb_init.lo $(am__objects_1)
-libsasldb_la_OBJECTS = $(am_libsasldb_la_OBJECTS)
-am_libscram_la_OBJECTS = scram.lo scram_init.lo $(am__objects_1)
-libscram_la_OBJECTS = $(am_libscram_la_OBJECTS)
-am_libsql_la_OBJECTS = sql.lo sql_init.lo $(am__objects_1)
-libsql_la_OBJECTS = $(am_libsql_la_OBJECTS)
-libsql_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(libsql_la_LDFLAGS) $(LDFLAGS) -o $@
-am_libsrp_la_OBJECTS = srp.lo srp_init.lo $(am__objects_1)
-libsrp_la_OBJECTS = $(am_libsrp_la_OBJECTS)
-SCRIPTS = $(noinst_SCRIPTS)
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libanonymous_la_SOURCES) $(libcrammd5_la_SOURCES) \
-	$(libdigestmd5_la_SOURCES) $(libgs2_la_SOURCES) \
-	$(libgssapiv2_la_SOURCES) $(libkerberos4_la_SOURCES) \
-	$(libldapdb_la_SOURCES) $(liblogin_la_SOURCES) \
-	$(libntlm_la_SOURCES) $(libotp_la_SOURCES) \
-	$(libpassdss_la_SOURCES) $(libplain_la_SOURCES) \
-	$(libsasldb_la_SOURCES) $(libscram_la_SOURCES) \
-	$(libsql_la_SOURCES) $(libsrp_la_SOURCES)
-DIST_SOURCES = $(libanonymous_la_SOURCES) $(libcrammd5_la_SOURCES) \
-	$(libdigestmd5_la_SOURCES) $(libgs2_la_SOURCES) \
-	$(libgssapiv2_la_SOURCES) $(libkerberos4_la_SOURCES) \
-	$(libldapdb_la_SOURCES) $(liblogin_la_SOURCES) \
-	$(libntlm_la_SOURCES) $(libotp_la_SOURCES) \
-	$(libpassdss_la_SOURCES) $(libplain_la_SOURCES) \
-	$(libsasldb_la_SOURCES) $(libscram_la_SOURCES) \
-	$(libsql_la_SOURCES) $(libsrp_la_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# Library version info - here at the top, for sanity
-# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
-# CURRENT:REVISION:AGE
-plugin_version = 3:0:0
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
-AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
-COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
-EXTRA_DIST = makeinit.sh NTMakefile
-noinst_SCRIPTS = makeinit.sh
-common_sources = plugin_common.c plugin_common.h
-sasldir = $(prefix)/lib/sasl2
-sasl_LTLIBRARIES = @SASL_MECHS@
-EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
-	libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
-	libscram.la libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
-
-libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
-libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
-libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
-libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
-libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
-libanonymous_la_LIBADD = $(COMPAT_OBJS)
-libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
-libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
-libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
-libgs2_la_SOURCES = gs2.c gs2_init.c gs2_token.c gs2_token.h $(common_sources)
-libgs2_la_DEPENDENCIES = $(COMPAT_OBJS)
-libgs2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
-libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources)
-libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS)
-libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
-libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
-libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
-libcrammd5_la_LIBADD = $(COMPAT_OBJS)
-libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
-libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
-libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
-libscram_la_SOURCES = scram.c scram_init.c $(common_sources)
-libscram_la_DEPENDENCIES = $(COMPAT_OBJS)
-libscram_la_LIBADD = $(SCRAM_LIBS) $(COMPAT_OBJS)
-liblogin_la_SOURCES = login.c login_init.c $(common_sources)
-liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
-liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
-libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
-libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
-libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
-libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
-libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
-libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
-libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
-libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
-libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
-libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
-libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
-libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
-
-# Auxprop Plugins
-libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
-libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
-libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
-libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
-libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
-libldapdb_la_LIBADD = $(LIB_LDAP) $(COMPAT_OBJS)
-libsql_la_SOURCES = sql.c sql_init.c $(common_sources)
-libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) $(LIB_SQLITE3) \
-	$(AM_LDFLAGS)
-
-libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
-libsql_la_LIBADD = $(COMPAT_OBJS)
-
-# Instructions for making the _init files
-init_src = anonymous_init.c crammd5_init.c digestmd5_init.c scram_init.c gs2_init.c gssapiv2_init.c \
-kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
-passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
-
-CLEANFILES = $(init_src)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu plugins/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-saslLTLIBRARIES: $(sasl_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(sasldir)" || $(MKDIR_P) "$(DESTDIR)$(sasldir)"
-	@list='$(sasl_LTLIBRARIES)'; test -n "$(sasldir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(sasldir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(sasldir)"; \
-	}
-
-uninstall-saslLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(sasl_LTLIBRARIES)'; test -n "$(sasldir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(sasldir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(sasldir)/$$f"; \
-	done
-
-clean-saslLTLIBRARIES:
-	-test -z "$(sasl_LTLIBRARIES)" || rm -f $(sasl_LTLIBRARIES)
-	@list='$(sasl_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libanonymous.la: $(libanonymous_la_OBJECTS) $(libanonymous_la_DEPENDENCIES) 
-	$(LINK)  $(libanonymous_la_OBJECTS) $(libanonymous_la_LIBADD) $(LIBS)
-libcrammd5.la: $(libcrammd5_la_OBJECTS) $(libcrammd5_la_DEPENDENCIES) 
-	$(LINK)  $(libcrammd5_la_OBJECTS) $(libcrammd5_la_LIBADD) $(LIBS)
-libdigestmd5.la: $(libdigestmd5_la_OBJECTS) $(libdigestmd5_la_DEPENDENCIES) 
-	$(LINK)  $(libdigestmd5_la_OBJECTS) $(libdigestmd5_la_LIBADD) $(LIBS)
-libgs2.la: $(libgs2_la_OBJECTS) $(libgs2_la_DEPENDENCIES) 
-	$(LINK)  $(libgs2_la_OBJECTS) $(libgs2_la_LIBADD) $(LIBS)
-libgssapiv2.la: $(libgssapiv2_la_OBJECTS) $(libgssapiv2_la_DEPENDENCIES) 
-	$(LINK)  $(libgssapiv2_la_OBJECTS) $(libgssapiv2_la_LIBADD) $(LIBS)
-libkerberos4.la: $(libkerberos4_la_OBJECTS) $(libkerberos4_la_DEPENDENCIES) 
-	$(LINK)  $(libkerberos4_la_OBJECTS) $(libkerberos4_la_LIBADD) $(LIBS)
-libldapdb.la: $(libldapdb_la_OBJECTS) $(libldapdb_la_DEPENDENCIES) 
-	$(LINK)  $(libldapdb_la_OBJECTS) $(libldapdb_la_LIBADD) $(LIBS)
-liblogin.la: $(liblogin_la_OBJECTS) $(liblogin_la_DEPENDENCIES) 
-	$(LINK)  $(liblogin_la_OBJECTS) $(liblogin_la_LIBADD) $(LIBS)
-libntlm.la: $(libntlm_la_OBJECTS) $(libntlm_la_DEPENDENCIES) 
-	$(LINK)  $(libntlm_la_OBJECTS) $(libntlm_la_LIBADD) $(LIBS)
-libotp.la: $(libotp_la_OBJECTS) $(libotp_la_DEPENDENCIES) 
-	$(LINK)  $(libotp_la_OBJECTS) $(libotp_la_LIBADD) $(LIBS)
-libpassdss.la: $(libpassdss_la_OBJECTS) $(libpassdss_la_DEPENDENCIES) 
-	$(LINK)  $(libpassdss_la_OBJECTS) $(libpassdss_la_LIBADD) $(LIBS)
-libplain.la: $(libplain_la_OBJECTS) $(libplain_la_DEPENDENCIES) 
-	$(LINK)  $(libplain_la_OBJECTS) $(libplain_la_LIBADD) $(LIBS)
-libsasldb.la: $(libsasldb_la_OBJECTS) $(libsasldb_la_DEPENDENCIES) 
-	$(LINK)  $(libsasldb_la_OBJECTS) $(libsasldb_la_LIBADD) $(LIBS)
-libscram.la: $(libscram_la_OBJECTS) $(libscram_la_DEPENDENCIES) 
-	$(LINK)  $(libscram_la_OBJECTS) $(libscram_la_LIBADD) $(LIBS)
-libsql.la: $(libsql_la_OBJECTS) $(libsql_la_DEPENDENCIES) 
-	$(libsql_la_LINK)  $(libsql_la_OBJECTS) $(libsql_la_LIBADD) $(LIBS)
-libsrp.la: $(libsrp_la_OBJECTS) $(libsrp_la_DEPENDENCIES) 
-	$(LINK)  $(libsrp_la_OBJECTS) $(libsrp_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/anonymous.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/anonymous_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cram.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crammd5_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/digestmd5.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/digestmd5_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gs2.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gs2_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gs2_token.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gssapi.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gssapiv2_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kerberos4.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kerberos4_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ldapdb.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ldapdb_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/login.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/login_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ntlm.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ntlm_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/otp.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/otp_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/passdss.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/passdss_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/plain.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/plain_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/plugin_common.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sasldb.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sasldb_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/scram.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/scram_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sql.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sql_init.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/srp.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/srp_init.Plo at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(SCRIPTS)
-installdirs:
-	for dir in "$(DESTDIR)$(sasldir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-saslLTLIBRARIES \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-saslLTLIBRARIES
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-saslLTLIBRARIES
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-saslLTLIBRARIES ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-saslLTLIBRARIES install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-saslLTLIBRARIES
-
-
-${init_src}: $(srcdir)/makeinit.sh
-	$(SHELL) $(srcdir)/makeinit.sh
-
-# Compatibility function build rules (they build in lib/)
-$(COMPAT_OBJS):
-	rm -f $(COMPAT_OBJS)
-	cd ../lib; $(MAKE) $(COMPAT_OBJS)
-	for file in $(COMPAT_OBJS); do ln -s ../lib/$$file .; done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/plugins/NTMakefile b/plugins/NTMakefile
index 32dc58e..7417f0f 100755
--- a/plugins/NTMakefile
+++ b/plugins/NTMakefile
@@ -125,15 +125,25 @@ GSS_LIBS=/libpath:$(GSSAPI_LIBPATH) gssapi32.lib
 !ELSE 
 GSS_FLAGS=
 GSS_LIBS=
-!ENDIF 
+!ENDIF
 
-CRAM_FLAGS=/DOBSOLETE_CRAM_ATTR=1
+!IF "$(SASLDB)" == "LMDB"
+DB_LIBS=/libpath:$(LMDB_LIBPATH) lmdb.lib
 
-DIGEST_FLAGS=/D "WITH_RC4"
+# Auxprop Plugin
+libsasldb_sources = allockey.c db_lmdb.c
+libsasldb_objs = allockey.obj db_lmdb.obj
+!ELSE
+DB_LIBS=/libpath:$(DB_LIBPATH) $(DB_LIB)
 
 # Auxprop Plugin
 libsasldb_sources = allockey.c db_berkeley.c
 libsasldb_objs = allockey.obj db_berkeley.obj
+!ENDIF
+
+CRAM_FLAGS=/DOBSOLETE_CRAM_ATTR=1
+
+DIGEST_FLAGS=/D "WITH_RC4"
 
 saslSASLDB_sources = sasldb.c sasldb_init.c $(libsasldb_sources) $(common_sources)
 saslSASLDB_objs = sasldb.obj sasldb_init.obj $(libsasldb_objs) $(common_objs)
@@ -152,7 +162,6 @@ EXTRA_FLAGS = /D TARGET_WIN_SYSTEM=$(TARGET_WIN_SYSTEM) $(EXTRA_FLAGS)
 EXTRA_FLAGS=$(EXTRA_FLAGS) $(DB_FLAGS) $(OPENSSL_FLAGS) $(GSS_FLAGS) $(SRP_FLAGS) $(SQL_FLAGS) $(DIGEST_FLAGS) $(CRAM_FLAGS) $(LDAP_FLAGS)
 CPPFLAGS = /I "..\win32\include" /I "." /I "..\include" $(EXTRA_FLAGS) /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL"
 
-DB_LIBS=/libpath:$(DB_LIBPATH) $(DB_LIB)
 OPENSSL_LIBS=/libpath:$(OPENSSL_LIBPATH) libeay32.lib ssleay32.lib
 
 # Where to install files from this directory
@@ -188,6 +197,9 @@ allockey.c: ..\sasldb\allockey.c
 db_berkeley.c: ..\sasldb\db_berkeley.c
 	xcopy /D /Y ..\sasldb\db_berkeley.c .
 
+db_lmdb.c: ..\sasldb\db_lmdb.c
+	xcopy /D /Y ..\sasldb\db_lmdb.c .
+
 #Add /pdb: option?
 
 saslANONYMOUS.dll: $(saslANONYMOUS_objs) saslANONYMOUS.res
@@ -263,6 +275,7 @@ CLEAN :
 	- at erase getaddrinfo.c
 	- at erase allockey.c
 	- at erase db_berkeley.c
+	- at erase db_lmdb.c
 	- at erase getnameinfo.c
 	- at erase $(generated_rc)
 	- at erase "*.res"
diff --git a/plugins/anonymous_init.c b/plugins/anonymous_init.c
deleted file mode 100644
index 215cc20..0000000
--- a/plugins/anonymous_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_anonymous_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( anonymous )
-SASL_SERVER_PLUG_INIT( anonymous )
-
diff --git a/plugins/crammd5_init.c b/plugins/crammd5_init.c
deleted file mode 100644
index c5382f8..0000000
--- a/plugins/crammd5_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_crammd5_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( crammd5 )
-SASL_SERVER_PLUG_INIT( crammd5 )
-
diff --git a/plugins/digestmd5.c b/plugins/digestmd5.c
index 4ab90dd..6690394 100644
--- a/plugins/digestmd5.c
+++ b/plugins/digestmd5.c
@@ -2112,7 +2112,7 @@ digestmd5_server_mech_step1(server_context_t *stext,
 	return SASL_FAIL;
     }
 
-    if (text->http_mode &&
+    if (text->http_mode && text->reauth->timeout &&
 	sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
 
 	/* Create an initial cache entry for non-persistent HTTP connections */
@@ -2451,7 +2451,7 @@ static int digestmd5_server_mech_step2(server_context_t *stext,
 #endif
     }
 
-    if (!text->nonce) {
+    if (!text->nonce && text->reauth->timeout) {
 	unsigned val = hash((char *) nonce) % text->reauth->size;
 
 	/* reauth attempt or continuation of HTTP Digest on a
@@ -2758,7 +2758,7 @@ static int digestmd5_server_mech_step2(server_context_t *stext,
     /* if ok verified */
     if (strcmp(serverresponse, response) != 0) {
 	if (Try_8859_1) {
-	    
+            sparams->utils->free(serverresponse);
 	    serverresponse = create_response(text,
 					     sparams->utils,
 					     nonce,
@@ -3048,7 +3048,8 @@ static int digestmd5_server_mech_step(void *conn_context,
 	    memset(oparams, 0, sizeof(sasl_out_params_t));
 	    if (text->nonce) sparams->utils->free(text->nonce);
 	    if (text->realm) sparams->utils->free(text->realm);
-	    text->nonce = text->realm = NULL;
+	    text->realm = NULL;
+	    text->nonce = NULL;
 
 	    /* fall through and issue challenge */
 	}
@@ -3650,7 +3651,6 @@ static int parse_server_challenge(client_context_t *ctext,
     int saw_qop = 0;
     int ciphers = 0;
     int maxbuf_count = 0;
-    bool IsUTF8 = FALSE;
     int algorithm_count = 0;
     int opaque_count = 0;
 
@@ -3867,8 +3867,6 @@ SKIP_SPACES_IN_CIPHER:
 		params->utils->seterror(params->utils->conn, 0,
 					"Charset must be UTF-8");
 		goto FreeAllocatedMem;
-	    } else {
-		IsUTF8 = TRUE;
 	    }
 	} else if (strcasecmp(name,"algorithm")==0) {
 	    if (text->http_mode && strcasecmp(value, "md5") == 0) {
@@ -4299,7 +4297,7 @@ digestmd5_client_mech_step1(client_context_t *ctext,
     *clientoutlen = (unsigned) strlen(text->out_buf);
     *clientout = text->out_buf;
 
-    text->state = 3;
+    /* check for next state (2 or 3) is done in digestmd5_client_mech_step() */
     return SASL_CONTINUE;
 }
 
@@ -4332,6 +4330,7 @@ static int digestmd5_client_mech_step2(client_context_t *ctext,
     
 	if (nrealm == 1) {
 	    /* only one choice! */
+	    if (text->realm) params->utils->free(text->realm);
 	    text->realm = realms[0];
 
 	    /* free realms */
@@ -4525,16 +4524,10 @@ static int digestmd5_client_mech_step(void *conn_context,
 		return SASL_CONTINUE;
 	    }
 	}
-	
-	/* fall through and respond to challenge */
-	
-    case 3:
-	if (serverin && !strncasecmp(serverin, "rspauth=", 8)) {
-	    return digestmd5_client_mech_step3(ctext, params,
-					       serverin, serverinlen,
-					       prompt_need,
-					       clientout, clientoutlen,
-					       oparams);
+	else if (!strncasecmp(serverin, "rspauth=", 8)) {
+	    /* server accepted fast reauth */
+	    text->state = 3;
+	    goto step3;
 	}
 
 	/* fall through and respond to challenge */
@@ -4561,6 +4554,14 @@ static int digestmd5_client_mech_step(void *conn_context,
 					   clientout, clientoutlen,
 					   oparams);
 
+    case 3:
+    step3:
+	return digestmd5_client_mech_step3(ctext, params,
+					   serverin, serverinlen,
+					   prompt_need,
+					   clientout, clientoutlen,
+					   oparams);
+
     default:
 	params->utils->log(NULL, SASL_LOG_ERR,
 			   "Invalid DIGEST-MD5 client step %d\n", text->state);
@@ -4581,6 +4582,8 @@ static void digestmd5_client_mech_dispose(void *conn_context,
 	       "DIGEST-MD5 client mech dispose");
 
     if (ctext->free_password) _plug_free_secret(utils, &ctext->password);
+    if (ctext->algorithm) utils->free(ctext->algorithm);
+    if (ctext->opaque) utils->free(ctext->opaque);
 
     digestmd5_common_mech_dispose(conn_context, utils);
 }
diff --git a/plugins/digestmd5_init.c b/plugins/digestmd5_init.c
deleted file mode 100644
index 25c4356..0000000
--- a/plugins/digestmd5_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_digestmd5_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( digestmd5 )
-SASL_SERVER_PLUG_INIT( digestmd5 )
-
diff --git a/plugins/gs2.c b/plugins/gs2.c
index 42d29c9..996aab8 100644
--- a/plugins/gs2.c
+++ b/plugins/gs2.c
@@ -275,7 +275,7 @@ gs2_common_mech_dispose(void *conn_context, const sasl_utils_t *utils)
 
 static void
 gs2_common_mech_free(void *global_context __attribute__((unused)),
-                     const sasl_utils_t *utils)
+                     const sasl_utils_t *utils __attribute__((unused)))
 {
     OM_uint32 minor;
 
diff --git a/plugins/gs2_init.c b/plugins/gs2_init.c
deleted file mode 100644
index 3106061..0000000
--- a/plugins/gs2_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_gs2_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( gs2 )
-SASL_SERVER_PLUG_INIT( gs2 )
-
diff --git a/plugins/gssapi.c b/plugins/gssapi.c
index 2fd1b3b..5204e54 100644
--- a/plugins/gssapi.c
+++ b/plugins/gssapi.c
@@ -51,6 +51,8 @@
 #include <gssapi/gssapi.h>
 #endif
 
+#include <gssapi/gssapi_krb5.h>
+
 #ifdef WIN32
 #  include <winsock2.h>
 
@@ -126,20 +128,29 @@ extern gss_OID gss_nt_service_name;
  */
 
 #ifdef GSS_USE_MUTEXES
-#define GSS_LOCK_MUTEX(utils)  \
-    if(((sasl_utils_t *)(utils))->mutex_lock(gss_mutex) != 0) { \
+#define GSS_LOCK_MUTEX_EXT(utils, mutex)  \
+    if(((sasl_utils_t *)(utils))->mutex_lock(mutex) != 0) { \
        return SASL_FAIL; \
     }
 
-#define GSS_UNLOCK_MUTEX(utils) \
-    if(((sasl_utils_t *)(utils))->mutex_unlock(gss_mutex) != 0) { \
+#define GSS_UNLOCK_MUTEX_EXT(utils, mutex) \
+    if(((sasl_utils_t *)(utils))->mutex_unlock(mutex) != 0) { \
         return SASL_FAIL; \
     }
 
+#define GSS_LOCK_MUTEX(utils) GSS_LOCK_MUTEX_EXT(utils, gss_mutex)
+#define GSS_UNLOCK_MUTEX(utils) GSS_UNLOCK_MUTEX_EXT(utils, gss_mutex)
+
+#define GSS_LOCK_MUTEX_CTX(utils, ctx) GSS_LOCK_MUTEX_EXT(utils, (ctx)->ctx_mutex)
+#define GSS_UNLOCK_MUTEX_CTX(utils, ctx) GSS_UNLOCK_MUTEX_EXT(utils, (ctx)->ctx_mutex)
+
+
 static void *gss_mutex = NULL;
 #else
 #define GSS_LOCK_MUTEX(utils)
 #define GSS_UNLOCK_MUTEX(utils)
+#define GSS_LOCK_MUTEX_CTX(utils, ctx)
+#define GSS_UNLOCK_MUTEX_CTX(utils, ctx)
 #endif
 
 typedef struct context {
@@ -176,6 +187,7 @@ typedef struct context {
     
     char *authid; /* hold the authid between steps - server */
     const char *user;   /* hold the userid between steps - client */
+    void *ctx_mutex; /* A per-context mutex */
 } context_t;
 
 enum {
@@ -202,7 +214,8 @@ sasl_gss_seterror_(const sasl_utils_t *utils, OM_uint32 maj, OM_uint32 min,
     OM_uint32 msg_ctx;
     int ret;
     char *out = NULL;
-    size_t len, curlen = 0;
+    size_t len;
+    unsigned curlen = 0;
     const char prefix[] = "GSSAPI Error: ";
 
     if (!utils) return SASL_OK;
@@ -355,7 +368,7 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov,
     output_token->value = NULL;
     output_token->length = 0;
     
-    GSS_LOCK_MUTEX(text->utils);
+    GSS_LOCK_MUTEX_CTX(text->utils, text);
     maj_stat = gss_wrap (&min_stat,
 			 text->gss_ctx,
 			 privacy,
@@ -363,14 +376,14 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov,
 			 input_token,
 			 NULL,
 			 output_token);
-    GSS_UNLOCK_MUTEX(text->utils);
+    GSS_UNLOCK_MUTEX_CTX(text->utils, text);
     
     if (GSS_ERROR(maj_stat)) {
 	sasl_gss_seterror(text->utils, maj_stat, min_stat);
 	if (output_token->value) {
-	    GSS_LOCK_MUTEX(text->utils);
+	    GSS_LOCK_MUTEX_CTX(text->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(text->utils);
+	    GSS_UNLOCK_MUTEX_CTX(text->utils, text);
 	}
 	return SASL_FAIL;
     }
@@ -384,9 +397,9 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov,
 			      output_token->length + 4);
 	
 	if (ret != SASL_OK) {
-	    GSS_LOCK_MUTEX(text->utils);
+	    GSS_LOCK_MUTEX_CTX(text->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(text->utils);
+	    GSS_UNLOCK_MUTEX_CTX(text->utils, text);
 	    return ret;
 	}
 
@@ -407,9 +420,9 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov,
     *output = text->encode_buf;
     
     if (output_token->value) {
-	GSS_LOCK_MUTEX(text->utils);
+	GSS_LOCK_MUTEX_CTX(text->utils, text);
 	gss_release_buffer(&min_stat, output_token);
-	GSS_UNLOCK_MUTEX(text->utils);
+	GSS_UNLOCK_MUTEX_CTX(text->utils, text);
     }
 
     return SASL_OK;
@@ -455,21 +468,21 @@ gssapi_decode_packet(void *context,
     output_token->value = NULL;
     output_token->length = 0;
     
-    GSS_LOCK_MUTEX(text->utils);
+    GSS_LOCK_MUTEX_CTX(text->utils, text);
     maj_stat = gss_unwrap (&min_stat,
 			   text->gss_ctx,
 			   input_token,
 			   output_token,
 			   NULL,
 			   NULL);
-    GSS_UNLOCK_MUTEX(text->utils);
+    GSS_UNLOCK_MUTEX_CTX(text->utils, text);
     
     if (GSS_ERROR(maj_stat)) {
 	sasl_gss_seterror(text->utils,maj_stat,min_stat);
 	if (output_token->value) {
-	    GSS_LOCK_MUTEX(text->utils);
+	    GSS_LOCK_MUTEX_CTX(text->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(text->utils);
+	    GSS_UNLOCK_MUTEX_CTX(text->utils, text);
 	}
 	return SASL_FAIL;
     }
@@ -484,17 +497,17 @@ gssapi_decode_packet(void *context,
 				     &text->decode_once_buf_len,
 				     *outputlen);
 	    if (result != SASL_OK) {
-		GSS_LOCK_MUTEX(text->utils);
+		GSS_LOCK_MUTEX_CTX(text->utils, text);
 		gss_release_buffer(&min_stat, output_token);
-		GSS_UNLOCK_MUTEX(text->utils);
+		GSS_UNLOCK_MUTEX_CTX(text->utils, text);
 		return result;
 	    }
 	    *output = text->decode_once_buf;
 	    memcpy(*output, output_token->value, *outputlen);
 	}
-	GSS_LOCK_MUTEX(text->utils);
+	GSS_LOCK_MUTEX_CTX(text->utils, text);
 	gss_release_buffer(&min_stat, output_token);
-	GSS_UNLOCK_MUTEX(text->utils);
+	GSS_UNLOCK_MUTEX_CTX(text->utils, text);
     }
     
     return SASL_OK;
@@ -525,46 +538,55 @@ static context_t *sasl_gss_new_context(const sasl_utils_t *utils)
     
     memset(ret,0,sizeof(context_t));
     ret->utils = utils;
-    
+#ifdef GSS_USE_MUTEXES
+    ret->ctx_mutex = utils->mutex_alloc();
+    if (!ret->ctx_mutex) {
+           utils->free(ret);
+           return NULL;
+    }
+#endif
+
     return ret;
 }
 
 static int sasl_gss_free_context_contents(context_t *text)
 {
-    OM_uint32 maj_stat, min_stat;
+    OM_uint32 min_stat;
     
     if (!text) return SASL_OK;
     
-    GSS_LOCK_MUTEX(text->utils);
+#ifdef GSS_USE_MUTEXES
+    if (text->ctx_mutex) {
+        GSS_LOCK_MUTEX_CTX(text->utils, text);
+    }
+#endif
 
     if (text->gss_ctx != GSS_C_NO_CONTEXT) {
-	maj_stat = gss_delete_sec_context(&min_stat,&text->gss_ctx,
-					  GSS_C_NO_BUFFER);
+        (void) gss_delete_sec_context(&min_stat,&text->gss_ctx,
+                                      GSS_C_NO_BUFFER);
 	text->gss_ctx = GSS_C_NO_CONTEXT;
     }
     
     if (text->client_name != GSS_C_NO_NAME) {
-	maj_stat = gss_release_name(&min_stat,&text->client_name);
+	(void) gss_release_name(&min_stat,&text->client_name);
 	text->client_name = GSS_C_NO_NAME;
     }
     
     if (text->server_name != GSS_C_NO_NAME) {
-	maj_stat = gss_release_name(&min_stat,&text->server_name);
+	(void) gss_release_name(&min_stat,&text->server_name);
 	text->server_name = GSS_C_NO_NAME;
     }
     
     if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
-	maj_stat = gss_release_cred(&min_stat, &text->server_creds);
+	(void) gss_release_cred(&min_stat, &text->server_creds);
 	text->server_creds = GSS_C_NO_CREDENTIAL;
     }
 
     if ( text->client_creds != GSS_C_NO_CREDENTIAL) {
-	maj_stat = gss_release_cred(&min_stat, &text->client_creds);
+	(void) gss_release_cred(&min_stat, &text->client_creds);
 	text->client_creds = GSS_C_NO_CREDENTIAL;
     }
 
-    GSS_UNLOCK_MUTEX(text->utils);
-    
     if (text->out_buf) {
 	text->utils->free(text->out_buf);
 	text->out_buf = NULL;
@@ -598,6 +620,14 @@ static int sasl_gss_free_context_contents(context_t *text)
 	text->authid = NULL;
     }
 
+#ifdef GSS_USE_MUTEXES
+    if (text->ctx_mutex) {
+        GSS_UNLOCK_MUTEX_CTX(text->utils, text);
+        text->utils->mutex_free(text->ctx_mutex);
+        text->ctx_mutex = NULL;
+    }
+#endif
+
     return SASL_OK;
 
 }
@@ -692,12 +722,12 @@ gssapi_server_mech_authneg(context_t *text,
 	}
 	sprintf(name_token.value,"%s@%s", params->service, params->serverFQDN);
 
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	maj_stat = gss_import_name (&min_stat,
 				    &name_token,
 				    GSS_C_NT_HOSTBASED_SERVICE,
 				    &text->server_name);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
 	params->utils->free(name_token.value);
 	name_token.value = NULL;
@@ -709,15 +739,15 @@ gssapi_server_mech_authneg(context_t *text,
 	}
 
 	if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    maj_stat = gss_release_cred(&min_stat, &text->server_creds);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    text->server_creds = GSS_C_NO_CREDENTIAL;
 	}
 
 	/* If caller didn't provide creds already */
 	if ( server_creds == GSS_C_NO_CREDENTIAL) {
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    maj_stat = gss_acquire_cred(&min_stat, 
 					text->server_name,
 					GSS_C_INDEFINITE, 
@@ -726,7 +756,7 @@ gssapi_server_mech_authneg(context_t *text,
 					&text->server_creds, 
 					NULL, 
 					NULL);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
 	    if (GSS_ERROR(maj_stat)) {
 		sasl_gss_seterror(text->utils, maj_stat, min_stat);
@@ -743,7 +773,7 @@ gssapi_server_mech_authneg(context_t *text,
     }
 
 
-    GSS_LOCK_MUTEX(params->utils);
+    GSS_LOCK_MUTEX_CTX(params->utils, text);
     maj_stat =
 	gss_accept_sec_context(&min_stat,
 			       &(text->gss_ctx),
@@ -756,15 +786,15 @@ gssapi_server_mech_authneg(context_t *text,
 			       &out_flags,
 			       NULL,	/* context validity period */
 			       &(text->client_creds));
-    GSS_UNLOCK_MUTEX(params->utils);
+    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
     if (GSS_ERROR(maj_stat)) {
 	sasl_gss_log(text->utils, maj_stat, min_stat);
 	text->utils->seterror(text->utils->conn, SASL_NOLOG, "GSSAPI Failure: gss_accept_sec_context");
 	if (output_token->value) {
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	}
 	sasl_gss_free_context_contents(text);
 	return SASL_BADAUTH;
@@ -778,18 +808,18 @@ gssapi_server_mech_authneg(context_t *text,
 	    ret = _plug_buf_alloc(text->utils, &(text->out_buf),
 				  &(text->out_buf_len), *serveroutlen);
 	    if(ret != SASL_OK) {
-		GSS_LOCK_MUTEX(params->utils);
+		GSS_LOCK_MUTEX_CTX(params->utils, text);
 		gss_release_buffer(&min_stat, output_token);
-		GSS_UNLOCK_MUTEX(params->utils);
+		GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 		return ret;
 	    }
 	    memcpy(text->out_buf, output_token->value, *serveroutlen);
 	    *serverout = text->out_buf;
 	}
 
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	gss_release_buffer(&min_stat, output_token);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
     } else {
 	/* No output token, send an empty string */
 	*serverout = GSSAPI_BLANK_STRING;
@@ -832,12 +862,12 @@ gssapi_server_mech_authneg(context_t *text,
 	    /* continue with authentication */
 	}
 
-    GSS_LOCK_MUTEX(params->utils);
+    GSS_LOCK_MUTEX_CTX(params->utils, text);
     maj_stat = gss_canonicalize_name(&min_stat,
 				     text->client_name,
 				     mech_type,
 				     &client_name_MN);
-    GSS_UNLOCK_MUTEX(params->utils);
+    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
     if (GSS_ERROR(maj_stat)) {
 	SETERROR(text->utils, "GSSAPI Failure: gss_canonicalize_name");
@@ -848,12 +878,12 @@ gssapi_server_mech_authneg(context_t *text,
     name_token.value = NULL;
     name_without_realm.value = NULL;
 
-    GSS_LOCK_MUTEX(params->utils);
+    GSS_LOCK_MUTEX_CTX(params->utils, text);
     maj_stat = gss_display_name (&min_stat,
 				 client_name_MN,
 				 &name_token,
 				 NULL);
-    GSS_UNLOCK_MUTEX(params->utils);
+    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
     if (GSS_ERROR(maj_stat)) {
 	SETERROR(text->utils, "GSSAPI Failure: gss_display_name");
@@ -883,7 +913,7 @@ gssapi_server_mech_authneg(context_t *text,
 
 	name_without_realm.length = strlen( (char *) name_without_realm.value );
 
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	maj_stat = gss_import_name (&min_stat,
 				    &name_without_realm,
 	    /* Solaris 8/9 gss_import_name doesn't accept GSS_C_NULL_OID here,
@@ -894,7 +924,7 @@ gssapi_server_mech_authneg(context_t *text,
 				    GSS_C_NULL_OID,
 #endif
 				    &without);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
 	if (GSS_ERROR(maj_stat)) {
 	    SETERROR(text->utils, "GSSAPI Failure: gss_import_name");
@@ -903,12 +933,12 @@ gssapi_server_mech_authneg(context_t *text,
 	    goto cleanup;
 	}
 
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	maj_stat = gss_compare_name(&min_stat,
 				    client_name_MN,
 				    without,
 				    &equal);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
 	if (GSS_ERROR(maj_stat)) {
 	    SETERROR(text->utils, "GSSAPI Failure: gss_compare_name");
@@ -944,7 +974,19 @@ gssapi_server_mech_authneg(context_t *text,
 	ret = SASL_CONTINUE;
     }
 
+    /* Release server creds which are no longer needed */
+     if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
+        maj_stat = gss_release_cred(&min_stat, &text->server_creds);
+        text->server_creds = GSS_C_NO_CREDENTIAL;
+     }
+
   cleanup:
+    if (text->server_creds != GSS_C_NO_CREDENTIAL) {
+	GSS_LOCK_MUTEX(params->utils);
+	maj_stat = gss_release_cred(&min_stat, &text->server_creds);
+	GSS_UNLOCK_MUTEX(params->utils);
+	text->server_creds = GSS_C_NO_CREDENTIAL;
+    }
     if (client_name_MN) {
 	GSS_LOCK_MUTEX(params->utils);
 	gss_release_name(&min_stat, &client_name_MN);
@@ -1053,7 +1095,7 @@ gssapi_server_mech_ssfcap(context_t *text,
     real_input_token.value = (void *)sasldata;
     real_input_token.length = 4;
 
-    GSS_LOCK_MUTEX(params->utils);
+    GSS_LOCK_MUTEX_CTX(params->utils, text);
     maj_stat = gss_wrap(&min_stat,
 			text->gss_ctx,
 			0, /* Just integrity checking here */
@@ -1061,14 +1103,14 @@ gssapi_server_mech_ssfcap(context_t *text,
 			input_token,
 			NULL,
 			output_token);
-    GSS_UNLOCK_MUTEX(params->utils);
+    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
     if (GSS_ERROR(maj_stat)) {
 	sasl_gss_seterror(text->utils, maj_stat, min_stat);
 	if (output_token->value) {
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	}
 	sasl_gss_free_context_contents(text);
 	return SASL_FAIL;
@@ -1082,18 +1124,18 @@ gssapi_server_mech_ssfcap(context_t *text,
 	    ret = _plug_buf_alloc(text->utils, &(text->out_buf),
 				  &(text->out_buf_len), *serveroutlen);
 	    if(ret != SASL_OK) {
-		GSS_LOCK_MUTEX(params->utils);
+		GSS_LOCK_MUTEX_CTX(params->utils, text);
 		gss_release_buffer(&min_stat, output_token);
-		GSS_UNLOCK_MUTEX(params->utils);
+		GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 		return ret;
 	    }
 	    memcpy(text->out_buf, output_token->value, *serveroutlen);
 	    *serverout = text->out_buf;
 	}
 
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	gss_release_buffer(&min_stat, output_token);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
     }
 
     /* Wait for ssf request and authid */
@@ -1124,14 +1166,14 @@ gssapi_server_mech_ssfreq(context_t *text,
     real_input_token.value = (void *)clientin;
     real_input_token.length = clientinlen;
 
-    GSS_LOCK_MUTEX(params->utils);
+    GSS_LOCK_MUTEX_CTX(params->utils, text);
     maj_stat = gss_unwrap(&min_stat,
 			  text->gss_ctx,
 			  input_token,
 			  output_token,
 			  NULL,
 			  NULL);
-    GSS_UNLOCK_MUTEX(params->utils);
+    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
     if (GSS_ERROR(maj_stat)) {
 	sasl_gss_seterror(text->utils, maj_stat, min_stat);
@@ -1142,27 +1184,26 @@ gssapi_server_mech_ssfreq(context_t *text,
     if (output_token->length < 4) {
 	SETERROR(text->utils,
 		 "token too short");
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	gss_release_buffer(&min_stat, output_token);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	sasl_gss_free_context_contents(text);
 	return SASL_FAIL;
     }
 
     layerchoice = (int)(((char *)(output_token->value))[0]);
-    if (layerchoice == LAYER_NONE &&
+    if (!(layerchoice & (LAYER_INTEGRITY | LAYER_CONFIDENTIALITY)) &&
 	(text->qop & LAYER_NONE)) { /* no encryption */
 	oparams->encode = NULL;
 	oparams->decode = NULL;
 	oparams->mech_ssf = 0;
-    } else if (layerchoice == LAYER_INTEGRITY &&
+    } else if ((layerchoice & LAYER_INTEGRITY) &&
 	       (text->qop & LAYER_INTEGRITY)) { /* integrity */
 	oparams->encode = &gssapi_integrity_encode;
 	oparams->decode = &gssapi_decode;
 	oparams->mech_ssf = 1;
-    } else if ((layerchoice == LAYER_CONFIDENTIALITY ||
-		/* For compatibility with broken clients setting both bits */
-		layerchoice == (LAYER_CONFIDENTIALITY|LAYER_INTEGRITY)) &&
+    } else if (/* For compatibility with broken clients setting both bits */
+		(layerchoice & (LAYER_CONFIDENTIALITY | LAYER_INTEGRITY)) &&
 	       (text->qop & LAYER_CONFIDENTIALITY)) { /* privacy */
 	oparams->encode = &gssapi_privacy_encode;
 	oparams->decode = &gssapi_decode;
@@ -1175,9 +1216,9 @@ gssapi_server_mech_ssfreq(context_t *text,
 	/* Mark that we attempted negotiation */
 	oparams->mech_ssf = 2;
 	if (output_token->value) {
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	}
 	sasl_gss_free_context_contents(text);
 	return SASL_FAIL;
@@ -1221,9 +1262,9 @@ gssapi_server_mech_ssfreq(context_t *text,
 	}    
     }
 	
-    GSS_LOCK_MUTEX(params->utils);
+    GSS_LOCK_MUTEX_CTX(params->utils, text);
     gss_release_buffer(&min_stat, output_token);
-    GSS_UNLOCK_MUTEX(params->utils);
+    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
     text->state = SASL_GSSAPI_STATE_AUTHENTICATED;
 
@@ -1258,7 +1299,7 @@ gssapi_server_mech_step(void *conn_context,
 
     if (text == NULL) return SASL_BADPROT;
 
-    params->utils->log(NULL, SASL_LOG_DEBUG,
+    params->utils->log(params->utils->conn, SASL_LOG_DEBUG,
 		       "GSSAPI server step %d\n", text->state);
 
     switch (text->state) {
@@ -1284,7 +1325,7 @@ gssapi_server_mech_step(void *conn_context,
 	break;
 
     default:
-	params->utils->log(NULL, SASL_LOG_ERR,
+	params->utils->log(params->utils->conn, SASL_LOG_ERR,
 			   "Invalid GSSAPI server step %d\n", text->state);
 	return SASL_FAIL;
     }
@@ -1490,7 +1531,7 @@ static int gssapi_client_mech_step(void *conn_context,
     *clientout = NULL;
     *clientoutlen = 0;
     
-    params->utils->log(NULL, SASL_LOG_DEBUG,
+    params->utils->log(params->utils->conn, SASL_LOG_DEBUG,
 		       "GSSAPI client step %d", text->state);
 
     switch (text->state) {
@@ -1547,12 +1588,12 @@ static int gssapi_client_mech_step(void *conn_context,
 	    
 	    sprintf(name_token.value,"%s@%s", params->service, params->serverFQDN);
 	    
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    maj_stat = gss_import_name (&min_stat,
 					&name_token,
 					GSS_C_NT_HOSTBASED_SERVICE,
 					&text->server_name);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    
 	    params->utils->free(name_token.value);
 	    name_token.value = NULL;
@@ -1576,9 +1617,9 @@ static int gssapi_client_mech_step(void *conn_context,
 	     * and no input from the server.  However, thanks to Imap,
 	     * which discards our first output, this happens all the time.
 	     * Throw away the context and try again. */
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    maj_stat = gss_delete_sec_context (&min_stat,&text->gss_ctx,GSS_C_NO_BUFFER);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    text->gss_ctx = GSS_C_NO_CONTEXT;
 	}
 
@@ -1600,7 +1641,7 @@ static int gssapi_client_mech_step(void *conn_context,
 	    req_flags = req_flags |  GSS_C_DELEG_FLAG;
 	}
 
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	maj_stat = gss_init_sec_context(&min_stat,
 					client_creds, /* GSS_C_NO_CREDENTIAL */
 					&text->gss_ctx,
@@ -1614,14 +1655,14 @@ static int gssapi_client_mech_step(void *conn_context,
 					output_token,
 					&out_req_flags,
 					NULL);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	
 	if (GSS_ERROR(maj_stat)) {
 	    sasl_gss_seterror(text->utils, maj_stat, min_stat);
 	    if (output_token->value) {
-		GSS_LOCK_MUTEX(params->utils);
+		GSS_LOCK_MUTEX_CTX(params->utils, text);
 		gss_release_buffer(&min_stat, output_token);
-		GSS_UNLOCK_MUTEX(params->utils);
+		GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    }
 	    sasl_gss_free_context_contents(text);
 	    return SASL_FAIL;
@@ -1652,22 +1693,22 @@ static int gssapi_client_mech_step(void *conn_context,
 		ret = _plug_buf_alloc(text->utils, &(text->out_buf),
 				      &(text->out_buf_len), *clientoutlen);
 		if(ret != SASL_OK) {
-		    GSS_LOCK_MUTEX(params->utils);
+		    GSS_LOCK_MUTEX_CTX(params->utils, text);
 		    gss_release_buffer(&min_stat, output_token);
-		    GSS_UNLOCK_MUTEX(params->utils);
+		    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 		    return ret;
 		}
 		memcpy(text->out_buf, output_token->value, *clientoutlen);
 		*clientout = text->out_buf;
 	    }
 	    
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	}
 	
 	if (maj_stat == GSS_S_COMPLETE) {
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    maj_stat = gss_inquire_context(&min_stat,
 					   text->gss_ctx,
 					   &text->client_name,
@@ -1678,7 +1719,7 @@ static int gssapi_client_mech_step(void *conn_context,
 					   NULL,       /* flags */
 					   NULL,       /* local init */
 					   NULL);      /* open */
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    
 	    if (GSS_ERROR(maj_stat)) {
 		sasl_gss_seterror(text->utils, maj_stat, min_stat);
@@ -1687,18 +1728,18 @@ static int gssapi_client_mech_step(void *conn_context,
 	    }
 	    
 	    name_token.length = 0;
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    maj_stat = gss_display_name(&min_stat,
 					text->client_name,
 					&name_token,
 					NULL);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    
 	    if (GSS_ERROR(maj_stat)) {
 		if (name_token.value) {
-		    GSS_LOCK_MUTEX(params->utils);
+		    GSS_LOCK_MUTEX_CTX(params->utils, text);
 		    gss_release_buffer(&min_stat, &name_token);
-		    GSS_UNLOCK_MUTEX(params->utils);
+		    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 		}
 		SETERROR(text->utils, "GSSAPI Failure");
 		sasl_gss_free_context_contents(text);
@@ -1719,9 +1760,9 @@ static int gssapi_client_mech_step(void *conn_context,
 					 SASL_CU_AUTHID | SASL_CU_AUTHZID,
 					 oparams);
 	    }
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, &name_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    
 	    if (ret != SASL_OK) return ret;
 	    
@@ -1747,32 +1788,32 @@ static int gssapi_client_mech_step(void *conn_context,
 	real_input_token.value = (void *) serverin;
 	real_input_token.length = serverinlen;
 	
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	maj_stat = gss_unwrap(&min_stat,
 			      text->gss_ctx,
 			      input_token,
 			      output_token,
 			      NULL,
 			      NULL);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	
 	if (GSS_ERROR(maj_stat)) {
 	    sasl_gss_seterror(text->utils, maj_stat, min_stat);
-	    sasl_gss_free_context_contents(text);
 	    if (output_token->value) {
-		GSS_LOCK_MUTEX(params->utils);
+		GSS_LOCK_MUTEX_CTX(params->utils, text);
 		gss_release_buffer(&min_stat, output_token);
-		GSS_UNLOCK_MUTEX(params->utils);
+		GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    }
+	    sasl_gss_free_context_contents(text);
 	    return SASL_FAIL;
 	}
 	
 	if (output_token->length != 4) {
 	    SETERROR(text->utils,
 		     (output_token->length < 4) ? "token too short" : "token too long");
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    sasl_gss_free_context_contents(text);
 	    return SASL_FAIL;
 	}
@@ -1873,9 +1914,9 @@ static int gssapi_client_mech_step(void *conn_context,
 	    }
 	}
 	
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	gss_release_buffer(&min_stat, output_token);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	
 	/* oparams->user is always set, due to canon_user requirements.
 	 * Make sure the client actually requested it though, by checking
@@ -1921,7 +1962,7 @@ static int gssapi_client_mech_step(void *conn_context,
 	}
 	((unsigned char *)input_token->value)[0] = mychoice;
 	
-	GSS_LOCK_MUTEX(params->utils);
+	GSS_LOCK_MUTEX_CTX(params->utils, text);
 	maj_stat = gss_wrap (&min_stat,
 			     text->gss_ctx,
 			     0, /* Just integrity checking here */
@@ -1929,7 +1970,7 @@ static int gssapi_client_mech_step(void *conn_context,
 			     input_token,
 			     NULL,
 			     output_token);
-	GSS_UNLOCK_MUTEX(params->utils);
+	GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	
 	params->utils->free(input_token->value);
 	input_token->value = NULL;
@@ -1937,9 +1978,9 @@ static int gssapi_client_mech_step(void *conn_context,
 	if (GSS_ERROR(maj_stat)) {
 	    sasl_gss_seterror(text->utils, maj_stat, min_stat);
 	    if (output_token->value) {
-		GSS_LOCK_MUTEX(params->utils);
+		GSS_LOCK_MUTEX_CTX(params->utils, text);
 		gss_release_buffer(&min_stat, output_token);
-		GSS_UNLOCK_MUTEX(params->utils);
+		GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 	    }
 	    sasl_gss_free_context_contents(text);
 	    return SASL_FAIL;
@@ -1955,18 +1996,18 @@ static int gssapi_client_mech_step(void *conn_context,
 				      &(text->out_buf_len),
 				      *clientoutlen);
 		if (ret != SASL_OK) {
-		    GSS_LOCK_MUTEX(params->utils);
+		    GSS_LOCK_MUTEX_CTX(params->utils, text);
 		    gss_release_buffer(&min_stat, output_token);
-		    GSS_UNLOCK_MUTEX(params->utils);
+		    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 		    return ret;
 		}
 		memcpy(text->out_buf, output_token->value, *clientoutlen);
 		*clientout = text->out_buf;
 	    }
 	    
-	    GSS_LOCK_MUTEX(params->utils);
+	    GSS_LOCK_MUTEX_CTX(params->utils, text);
 	    gss_release_buffer(&min_stat, output_token);
-	    GSS_UNLOCK_MUTEX(params->utils);
+	    GSS_UNLOCK_MUTEX_CTX(params->utils, text);
 
 	}
 	
@@ -1983,7 +2024,7 @@ static int gssapi_client_mech_step(void *conn_context,
     }
 	
     default:
-	params->utils->log(NULL, SASL_LOG_ERR,
+	params->utils->log(params->utils->conn, SASL_LOG_ERR,
 			   "Invalid GSSAPI client step %d\n", text->state);
 	return SASL_FAIL;
     }
diff --git a/plugins/gssapiv2_init.c b/plugins/gssapiv2_init.c
deleted file mode 100644
index 04c9a15..0000000
--- a/plugins/gssapiv2_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_gssapiv2_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( gssapiv2 )
-SASL_SERVER_PLUG_INIT( gssapiv2 )
-
diff --git a/plugins/kerberos4_init.c b/plugins/kerberos4_init.c
deleted file mode 100644
index 1058033..0000000
--- a/plugins/kerberos4_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_kerberos4_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( kerberos4 )
-SASL_SERVER_PLUG_INIT( kerberos4 )
-
diff --git a/plugins/ldapdb.c b/plugins/ldapdb.c
index ddead7f..2016210 100644
--- a/plugins/ldapdb.c
+++ b/plugins/ldapdb.c
@@ -22,6 +22,7 @@
 
 #include "plugin_common.h"
 
+#define LDAP_DEPRECATED 1
 #include <ldap.h>
 
 static char ldapdb[] = "ldapdb";
diff --git a/plugins/ldapdb_init.c b/plugins/ldapdb_init.c
deleted file mode 100644
index 8840bc2..0000000
--- a/plugins/ldapdb_init.c
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_AUXPROP_PLUG_INIT( ldapdb )
-
-SASL_CANONUSER_PLUG_INIT( ldapdb )
diff --git a/plugins/login_init.c b/plugins/login_init.c
deleted file mode 100644
index cad7575..0000000
--- a/plugins/login_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_login_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( login )
-SASL_SERVER_PLUG_INIT( login )
-
diff --git a/plugins/ntlm.c b/plugins/ntlm.c
index 79ea47c..b5630d8 100644
--- a/plugins/ntlm.c
+++ b/plugins/ntlm.c
@@ -275,7 +275,7 @@ static void load_buffer(u_char *buf, const u_char *str, uint16 len,
 {
     if (len) {
 	if (unicode) {
-	    to_unicode(base + *offset, str, len);
+	    to_unicode(base + *offset, (const char *) str, len);
 	    len *= 2;
 	}
 	else {
@@ -373,10 +373,10 @@ static unsigned char *P16_lm(unsigned char *P16, sasl_secret_t *passwd,
     char P14[14];
     unsigned char S8[] = { 0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 };
 
-    strncpy(P14, passwd->data, sizeof(P14));
+    strncpy(P14, (const char *) passwd->data, sizeof(P14));
     ucase(P14, sizeof(P14));
 
-    E(P16, P14, sizeof(P14), S8, sizeof(S8));
+    E(P16, (unsigned char *) P14, sizeof(P14), S8, sizeof(S8));
     *result = SASL_OK;
     return P16;
 }
@@ -390,8 +390,8 @@ static unsigned char *P16_nt(unsigned char *P16, sasl_secret_t *passwd,
 	*result = SASL_NOMEM;
     }
     else {
-	to_unicode(*buf, passwd->data, passwd->len);
-	MD4(*buf, 2 * passwd->len, P16);
+	to_unicode((unsigned char *) *buf, (const char *) passwd->data, passwd->len);
+	MD4((unsigned char *) *buf, 2 * passwd->len, P16);
 	*result = SASL_OK;
     }
     return P16;
@@ -417,6 +417,29 @@ static unsigned char *P24(unsigned char *P24, unsigned char *P21,
     return P24;
 }
 
+static HMAC_CTX *_plug_HMAC_CTX_new(const sasl_utils_t *utils)
+{
+    utils->log(NULL, SASL_LOG_DEBUG, "_plug_HMAC_CTX_new()");
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+    return HMAC_CTX_new();
+#else
+    return utils->malloc(sizeof(EVP_MD_CTX));
+#endif    
+}
+
+static void _plug_HMAC_CTX_free(HMAC_CTX *ctx, const sasl_utils_t *utils)
+{
+    utils->log(NULL, SASL_LOG_DEBUG, "_plug_HMAC_CTX_free()");
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+    HMAC_CTX_free(ctx);
+#else
+    HMAC_cleanup(ctx);
+    utils->free(ctx);
+#endif    
+}
+
 static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
 			 const char *authid, const char *target,
 			 const unsigned char *challenge,
@@ -424,7 +447,7 @@ static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
 			 const sasl_utils_t *utils,
 			 char **buf, unsigned *buflen, int *result)
 {
-    HMAC_CTX ctx;
+    HMAC_CTX *ctx = NULL;
     unsigned char hash[EVP_MAX_MD_SIZE];
     char *upper;
     unsigned int len;
@@ -435,6 +458,10 @@ static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
 	SETERROR(utils, "cannot allocate NTLMv2 hash");
 	*result = SASL_NOMEM;
     }
+    else if ((ctx = _plug_HMAC_CTX_new(utils)) == NULL) {
+        SETERROR(utils, "cannot allocate HMAC CTX");
+        *result = SASL_NOMEM;
+    }
     else {
 	/* NTLMv2hash = HMAC-MD5(NTLMhash, unicode(ucase(authid + domain))) */
 	P16_nt(hash, passwd, utils, buf, buflen, result);
@@ -444,22 +471,23 @@ static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
 	strcpy(upper, authid);
 	if (target) strcat(upper, target);
 	ucase(upper, len);
-	to_unicode(*buf, upper, len);
+	to_unicode((unsigned char *) *buf, upper, len);
 
-	HMAC(EVP_md5(), hash, MD4_DIGEST_LENGTH, *buf, 2 * len, hash, &len);
+	HMAC(EVP_md5(), hash, MD4_DIGEST_LENGTH, (unsigned char *) *buf, 2 * len, hash, &len);
 
 	/* V2 = HMAC-MD5(NTLMv2hash, challenge + blob) + blob */
-	HMAC_Init(&ctx, hash, len, EVP_md5());
-	HMAC_Update(&ctx, challenge, NTLM_NONCE_LENGTH);
-	HMAC_Update(&ctx, blob, bloblen);
-	HMAC_Final(&ctx, V2, &len);
-	HMAC_cleanup(&ctx);
+	HMAC_Init_ex(ctx, hash, len, EVP_md5(), NULL);
+	HMAC_Update(ctx, challenge, NTLM_NONCE_LENGTH);
+	HMAC_Update(ctx, blob, bloblen);
+	HMAC_Final(ctx, V2, &len);
 
 	/* the blob is concatenated outside of this function */
 
 	*result = SASL_OK;
     }
 
+    if (ctx) _plug_HMAC_CTX_free(ctx, utils);
+
     return V2;
 }
 
@@ -768,8 +796,8 @@ static void make_netbios_name(const char *in, unsigned char out[])
      */
     n = strcspn(in, ".");
     if (n > 16) n = 16;
-    strncpy(out+18, in, n);
-    in = out+18;
+    strncpy((char *) out+18, in, n);
+    in = (char *) out+18;
     ucase(in, n);
 
     out[j++] = 0x20;
@@ -1033,7 +1061,7 @@ static int smb_negotiate_protocol(const sasl_utils_t *utils,
 		   "NTLM: error reading NEGPROT response");
 	return SASL_FAIL;
     }
-    p = text->out_buf;
+    p = (unsigned char *) text->out_buf;
 
     /* parse the header */
     if (len < SMB_HDR_SIZE) {
@@ -1115,7 +1143,7 @@ static int smb_negotiate_protocol(const sasl_utils_t *utils,
 	    return SASL_NOMEM;
 	}
 	memcpy(*domain, p, len);
-	from_unicode(*domain, *domain, len);
+	from_unicode(*domain, (unsigned char *) *domain, len);
 
 	text->flags |= NTLM_TARGET_IS_DOMAIN;
     }
@@ -1256,7 +1284,7 @@ static int smb_session_setup(const sasl_utils_t *utils, server_context_t *text,
 		   "NTLM: error reading SESSIONSETUP response");
 	return SASL_FAIL;
     }
-    p = text->out_buf;
+    p = (unsigned char *) text->out_buf;
 
     /* parse the header */
     if (len < SMB_HDR_SIZE) {
@@ -1343,12 +1371,12 @@ static int create_challenge(const sasl_utils_t *utils,
 	return SASL_NOMEM;
     }
 
-    base = *buf;
+    base = (unsigned char *) *buf;
     memset(base, 0, *outlen);
     memcpy(base + NTLM_SIG_OFFSET, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
     htoil(base + NTLM_TYPE_OFFSET, NTLM_TYPE_CHALLENGE);
     load_buffer(base + NTLM_TYPE2_TARGET_OFFSET,
-		ucase(target, 0), (uint16) xstrlen(target), flags & NTLM_USE_UNICODE,
+		(const unsigned char *) ucase(target, 0), (uint16) xstrlen(target), flags & NTLM_USE_UNICODE,
 		base, &offset);
     htoil(base + NTLM_TYPE2_FLAGS_OFFSET, flags);
     memcpy(base + NTLM_TYPE2_CHALLENGE_OFFSET, nonce, NTLM_NONCE_LENGTH);
@@ -1500,26 +1528,30 @@ static int ntlm_server_mech_step2(server_context_t *text,
 	return SASL_BADPROT;
     }
 
-    result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_LMRESP_OFFSET,
+    result = unload_buffer(sparams->utils,
+			   (const unsigned char *) clientin + NTLM_TYPE3_LMRESP_OFFSET,
 			   (u_char **) &lm_resp, &lm_resp_len, 0,
-			   clientin, clientinlen);
+			   (const unsigned char *) clientin, clientinlen);
     if (result != SASL_OK) goto cleanup;
 
-    result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_NTRESP_OFFSET,
+    result = unload_buffer(sparams->utils,
+			   (const unsigned char *) clientin + NTLM_TYPE3_NTRESP_OFFSET,
 			   (u_char **) &nt_resp, &nt_resp_len, 0,
-			   clientin, clientinlen);
+			   (const unsigned char *) clientin, clientinlen);
     if (result != SASL_OK) goto cleanup;
 
-    result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_DOMAIN_OFFSET,
+    result = unload_buffer(sparams->utils,
+			   (const unsigned char *) clientin + NTLM_TYPE3_DOMAIN_OFFSET,
 			   (u_char **) &domain, &domain_len,
 			   text->flags & NTLM_USE_UNICODE,
-			   clientin, clientinlen);
+			   (const unsigned char *) clientin, clientinlen);
     if (result != SASL_OK) goto cleanup;
 
-    result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_USER_OFFSET,
+    result = unload_buffer(sparams->utils,
+			   (const unsigned char *) clientin + NTLM_TYPE3_USER_OFFSET,
 			   (u_char **) &authid, &authid_len,
 			   text->flags & NTLM_USE_UNICODE,
-			   clientin, clientinlen);
+			   (const unsigned char *) clientin, clientinlen);
     if (result != SASL_OK) goto cleanup;
 
     /* require at least one response and an authid */
@@ -1582,7 +1614,7 @@ static int ntlm_server_mech_step2(server_context_t *text,
 	}
 	
 	password->len = (unsigned) pass_len;
-	strncpy(password->data, auxprop_values[0].values[0], pass_len + 1);
+	strncpy((char *) password->data, auxprop_values[0].values[0], pass_len + 1);
 
 	/* erase the plaintext password */
 	sparams->utils->prop_erase(sparams->propctx, password_request[0]);
@@ -1805,15 +1837,15 @@ static int create_request(const sasl_utils_t *utils,
 	return SASL_NOMEM;
     }
 
-    base = *buf;
+    base = (unsigned char *) *buf;
     memset(base, 0, *outlen);
     memcpy(base + NTLM_SIG_OFFSET, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
     htoil(base + NTLM_TYPE_OFFSET, NTLM_TYPE_REQUEST);
     htoil(base + NTLM_TYPE1_FLAGS_OFFSET, flags);
     load_buffer(base + NTLM_TYPE1_DOMAIN_OFFSET,
-		domain, (uint16) xstrlen(domain), 0, base, &offset);
+		(const unsigned char *) domain, (uint16) xstrlen(domain), 0, base, &offset);
     load_buffer(base + NTLM_TYPE1_WORKSTN_OFFSET,
-		wkstn, (uint16) xstrlen(wkstn), 0, base, &offset);
+		(const unsigned char *) wkstn, (uint16) xstrlen(wkstn), 0, base, &offset);
 
     return SASL_OK;
 }
@@ -1858,7 +1890,7 @@ static int create_response(const sasl_utils_t *utils,
 	return SASL_NOMEM;
     }
 
-    base = *buf;
+    base = (unsigned char *) *buf;
     memset(base, 0, *outlen);
     memcpy(base + NTLM_SIG_OFFSET, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
     htoil(base + NTLM_TYPE_OFFSET, NTLM_TYPE_RESPONSE);
@@ -1867,12 +1899,15 @@ static int create_response(const sasl_utils_t *utils,
     load_buffer(base + NTLM_TYPE3_NTRESP_OFFSET,
 		nt_resp, nt_resp ? NTLM_RESP_LENGTH : 0, 0, base, &offset);
     load_buffer(base + NTLM_TYPE3_DOMAIN_OFFSET,
-		ucase(domain, 0), (uint16) xstrlen(domain), flags & NTLM_USE_UNICODE,
+		(const unsigned char *) ucase(domain, 0), (uint16) xstrlen(domain),
+		flags & NTLM_USE_UNICODE,
 		base, &offset);
     load_buffer(base + NTLM_TYPE3_USER_OFFSET,
-		user, (uint16) xstrlen(user), flags & NTLM_USE_UNICODE, base, &offset);
+		(const unsigned char *) user, (uint16) xstrlen(user),
+		flags & NTLM_USE_UNICODE, base, &offset);
     load_buffer(base + NTLM_TYPE3_WORKSTN_OFFSET,
-		ucase(wkstn, 0), (uint16) xstrlen(wkstn), flags & NTLM_USE_UNICODE,
+		(const unsigned char *) ucase(wkstn, 0), (uint16) xstrlen(wkstn),
+		flags & NTLM_USE_UNICODE,
 		base, &offset);
     load_buffer(base + NTLM_TYPE3_SESSIONKEY_OFFSET,
 		key, key ? NTLM_SESSKEY_LENGTH : 0, 0, base, &offset);
@@ -2011,7 +2046,8 @@ static int ntlm_client_mech_step2(client_context_t *text,
 
     flags &= NTLM_FLAGS_MASK; /* mask off the bits we don't support */
 
-    result = unload_buffer(params->utils, serverin + NTLM_TYPE2_TARGET_OFFSET,
+    result = unload_buffer(params->utils,
+			   (const unsigned char *) serverin + NTLM_TYPE2_TARGET_OFFSET,
 			   (u_char **) &domain, NULL,
 			   flags & NTLM_USE_UNICODE,
 			   (u_char *) serverin, serverinlen);
@@ -2027,7 +2063,7 @@ static int ntlm_client_mech_step2(client_context_t *text,
 	 (sendv2[0] == 'o' && sendv2[1] == 'n') || sendv2[0] == 't')) {
 
 	/* put the cnonce in place after the LMv2 HMAC */
-	char *cnonce = resp + MD5_DIGEST_LENGTH;
+	char *cnonce = (char *) resp + MD5_DIGEST_LENGTH;
 
 	params->utils->log(NULL, SASL_LOG_DEBUG,
 			   "calculating LMv2 response");
@@ -2035,7 +2071,8 @@ static int ntlm_client_mech_step2(client_context_t *text,
 	params->utils->rand(params->utils->rpool, cnonce, NTLM_NONCE_LENGTH);
 
 	V2(resp, password, oparams->authid, domain,
-	   serverin + NTLM_TYPE2_CHALLENGE_OFFSET, cnonce, NTLM_NONCE_LENGTH,
+	   (const unsigned char *) serverin + NTLM_TYPE2_CHALLENGE_OFFSET,
+	   (const unsigned char *) cnonce, NTLM_NONCE_LENGTH,
 	   params->utils, &text->out_buf, &text->out_buf_len, &result);
 
 	lm_resp = resp;
diff --git a/plugins/ntlm_init.c b/plugins/ntlm_init.c
deleted file mode 100644
index a336fda..0000000
--- a/plugins/ntlm_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_ntlm_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( ntlm )
-SASL_SERVER_PLUG_INIT( ntlm )
-
diff --git a/plugins/otp.c b/plugins/otp.c
index dd73065..07a58f5 100644
--- a/plugins/otp.c
+++ b/plugins/otp.c
@@ -96,6 +96,28 @@ static algorithm_option_t algorithm_options[] = {
     {NULL,	0,	NULL}
 };
 
+static EVP_MD_CTX *_plug_EVP_MD_CTX_new(const sasl_utils_t *utils)
+{
+    utils->log(NULL, SASL_LOG_DEBUG, "_plug_EVP_MD_CTX_new()");
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+    return EVP_MD_CTX_new();
+#else
+    return utils->malloc(sizeof(EVP_MD_CTX));
+#endif    
+}
+
+static void _plug_EVP_MD_CTX_free(EVP_MD_CTX *ctx, const sasl_utils_t *utils)
+{
+    utils->log(NULL, SASL_LOG_DEBUG, "_plug_EVP_MD_CTX_free()");
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+    EVP_MD_CTX_free(ctx);
+#else
+    utils->free(ctx);
+#endif    
+}
+
 /* Convert the binary data into ASCII hex */
 void bin2hex(unsigned char *bin, int binlen, char *hex)
 {
@@ -116,17 +138,16 @@ void bin2hex(unsigned char *bin, int binlen, char *hex)
  * swabbing bytes if necessary.
  */
 static void otp_hash(const EVP_MD *md, char *in, size_t inlen,
-		     unsigned char *out, int swab)
+		     unsigned char *out, int swab, EVP_MD_CTX *mdctx)
 {
-    EVP_MD_CTX mdctx;
-    char hash[EVP_MAX_MD_SIZE];
+    unsigned char hash[EVP_MAX_MD_SIZE];
     unsigned int i;
     int j;
     unsigned hashlen;
     
-    EVP_DigestInit(&mdctx, md);
-    EVP_DigestUpdate(&mdctx, in, inlen);
-    EVP_DigestFinal(&mdctx, hash, &hashlen);
+    EVP_DigestInit(mdctx, md);
+    EVP_DigestUpdate(mdctx, in, inlen);
+    EVP_DigestFinal(mdctx, hash, &hashlen);
     
     /* Fold the result into 64 bits */
     for (i = OTP_HASH_SIZE; i < hashlen; i++) {
@@ -146,10 +167,13 @@ static void otp_hash(const EVP_MD *md, char *in, size_t inlen,
 
 static int generate_otp(const sasl_utils_t *utils,
 			algorithm_option_t *alg, unsigned seq, char *seed,
-			char *secret, char *otp)
+			unsigned char *secret, unsigned secret_len,
+                        unsigned char *otp)
 {
     const EVP_MD *md;
-    char *key;
+    EVP_MD_CTX *mdctx = NULL;
+    char *key = NULL;
+    int r = SASL_OK;
     
     if (!(md = EVP_get_digestbyname(alg->evp_name))) {
 	utils->seterror(utils->conn, 0,
@@ -157,23 +181,31 @@ static int generate_otp(const sasl_utils_t *utils,
 	return SASL_FAIL;
     }
     
-    if ((key = utils->malloc(strlen(seed) + strlen(secret) + 1)) == NULL) {
+    if ((mdctx = _plug_EVP_MD_CTX_new(utils)) == NULL) {
+	SETERROR(utils, "cannot allocate MD CTX");
+	r = SASL_NOMEM;
+        goto done;
+    }
+    
+    if ((key = utils->malloc(strlen(seed) + secret_len + 1)) == NULL) {
 	SETERROR(utils, "cannot allocate OTP key");
-	return SASL_NOMEM;
+	r = SASL_NOMEM;
+        goto done;
     }
     
     /* initial step */
-    strcpy(key, seed);
-    strcat(key, secret);
-    otp_hash(md, key, strlen(key), otp, alg->swab);
+    sprintf(key, "%s%.*s", seed, secret_len, secret);
+    otp_hash(md, key, strlen(key), otp, alg->swab, mdctx);
     
     /* computation step */
     while (seq-- > 0)
-	otp_hash(md, otp, OTP_HASH_SIZE, otp, alg->swab);
-    
-    utils->free(key);
+        otp_hash(md, (char *) otp, OTP_HASH_SIZE, otp, alg->swab, mdctx);
+
+  done:
+    if (key) utils->free(key);
+    if (mdctx) _plug_EVP_MD_CTX_free(mdctx, utils);
     
-    return SASL_OK;
+    return r;
 }
 
 static int parse_challenge(const sasl_utils_t *utils,
@@ -587,12 +619,12 @@ int hex2bin(char *hex, unsigned char *bin, int binlen)
     return (i < binlen) ? SASL_BADAUTH : SASL_OK;
 }
 
-static int make_secret(const sasl_utils_t *utils,
-		       const char *alg, unsigned seq, char *seed, char *otp,
+static int make_secret(const sasl_utils_t *utils, const char *alg,
+                       unsigned seq, char *seed, unsigned char *otp,
 		       time_t timeout, sasl_secret_t **secret)
 {
     size_t sec_len;
-    unsigned char *data;
+    char *data;
     char buf[2*OTP_HASH_SIZE+1];
     
     /*
@@ -610,7 +642,7 @@ static int make_secret(const sasl_utils_t *utils,
     }
     
     (*secret)->len = (unsigned) sec_len;
-    data = (*secret)->data;
+    data = (char *) (*secret)->data;
 
     bin2hex(otp, OTP_HASH_SIZE, buf);
     buf[2*OTP_HASH_SIZE] = '\0';
@@ -628,7 +660,7 @@ static int parse_secret(const sasl_utils_t *utils,
 			time_t *timeout)
 {
     if (strlen(secret) < seclen) {
-	unsigned char *c;
+        char *c;
 	
 	/*
 	 * old-style (binary) secret is stored as:
@@ -693,7 +725,8 @@ static int strptrcasecmp(const void *arg1, const void *arg2)
 
 /* Convert the 6 words into binary data */
 static int word2bin(const sasl_utils_t *utils,
-		    char *words, unsigned char *bin, const EVP_MD *md)
+		    char *words, unsigned char *bin, const EVP_MD *md,
+                    EVP_MD_CTX *mdctx)
 {
     int i, j;
     char *c, *word, buf[OTP_RESPONSE_MAX+1];
@@ -752,13 +785,12 @@ static int word2bin(const sasl_utils_t *utils,
 	
 	/* alternate dictionary */
 	if (alt_dict) {
-	    EVP_MD_CTX mdctx;
-	    char hash[EVP_MAX_MD_SIZE];
-	    int hashlen;
+	    unsigned char hash[EVP_MAX_MD_SIZE];
+	    unsigned hashlen;
 	    
-	    EVP_DigestInit(&mdctx, md);
-	    EVP_DigestUpdate(&mdctx, word, strlen(word));
-	    EVP_DigestFinal(&mdctx, hash, &hashlen);
+	    EVP_DigestInit(mdctx, md);
+	    EVP_DigestUpdate(mdctx, word, strlen(word));
+	    EVP_DigestFinal(mdctx, hash, &hashlen);
 	    
 	    /* use lowest 11 bits */
 	    x = ((hash[hashlen-2] & 0x7) << 8) | hash[hashlen-1];
@@ -802,6 +834,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 			   char *response)
 {
     const EVP_MD *md;
+    EVP_MD_CTX *mdctx = NULL;
     char *c;
     int do_init = 0;
     unsigned char cur_otp[OTP_HASH_SIZE], prev_otp[OTP_HASH_SIZE];
@@ -815,6 +848,11 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 	return SASL_FAIL;
     }
     
+    if ((mdctx = _plug_EVP_MD_CTX_new(utils)) == NULL) {
+	SETERROR(utils, "cannot allocate MD CTX");
+	return SASL_NOMEM;
+    }
+    
     /* eat leading whitespace */
     c = response;
     while (isspace((int) *c)) c++;
@@ -824,7 +862,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 	    r = hex2bin(c+strlen(OTP_HEX_TYPE), cur_otp, OTP_HASH_SIZE);
 	}
 	else if (!strncasecmp(c, OTP_WORD_TYPE, strlen(OTP_WORD_TYPE))) {
-	    r = word2bin(utils, c+strlen(OTP_WORD_TYPE), cur_otp, md);
+	    r = word2bin(utils, c+strlen(OTP_WORD_TYPE), cur_otp, md, mdctx);
 	}
 	else if (!strncasecmp(c, OTP_INIT_HEX_TYPE,
 			      strlen(OTP_INIT_HEX_TYPE))) {
@@ -834,7 +872,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 	else if (!strncasecmp(c, OTP_INIT_WORD_TYPE,
 			      strlen(OTP_INIT_WORD_TYPE))) {
 	    do_init = 1;
-	    r = word2bin(utils, c+strlen(OTP_INIT_WORD_TYPE), cur_otp, md);
+	    r = word2bin(utils, c+strlen(OTP_INIT_WORD_TYPE), cur_otp, md, mdctx);
 	}
 	else {
 	    SETERROR(utils, "unknown OTP extended response type");
@@ -843,14 +881,15 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
     }
     else {
 	/* standard response, try word first, and then hex */
-	r = word2bin(utils, c, cur_otp, md);
+	r = word2bin(utils, c, cur_otp, md, mdctx);
 	if (r != SASL_OK)
 	    r = hex2bin(c, cur_otp, OTP_HASH_SIZE);
     }
     
     if (r == SASL_OK) {
 	/* do one more hash (previous otp) and compare to stored otp */
-	otp_hash(md, cur_otp, OTP_HASH_SIZE, prev_otp, text->alg->swab);
+	otp_hash(md, (char *) cur_otp, OTP_HASH_SIZE,
+                 prev_otp, text->alg->swab, mdctx);
 	
 	if (!memcmp(prev_otp, text->otp, OTP_HASH_SIZE)) {
 	    /* update the secret with this seq/otp */
@@ -879,23 +918,28 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 		*new_resp++ = '\0';
 	}
 	
-	if (!(new_chal && new_resp))
-	    return SASL_BADAUTH;
+	if (!(new_chal && new_resp)) {
+	    r = SASL_BADAUTH;
+            goto done;
+        }
 	
 	if ((r = parse_challenge(utils, new_chal, &alg, &seq, seed, 1))
 	    != SASL_OK) {
-	    return r;
+            goto done;
 	}
 	
-	if (seq < 1 || !strcasecmp(seed, text->seed))
-	    return SASL_BADAUTH;
+	if (seq < 1 || !strcasecmp(seed, text->seed)) {
+	    r = SASL_BADAUTH;
+            goto done;
+        }
 	
 	/* find the MDA */
 	if (!(md = EVP_get_digestbyname(alg->evp_name))) {
 	    utils->seterror(utils->conn, 0,
 			    "OTP algorithm %s is not available",
 			    alg->evp_name);
-	    return SASL_BADAUTH;
+	    r = SASL_BADAUTH;
+            goto done;
 	}
 	
 	if (!strncasecmp(c, OTP_INIT_HEX_TYPE, strlen(OTP_INIT_HEX_TYPE))) {
@@ -903,7 +947,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 	}
 	else if (!strncasecmp(c, OTP_INIT_WORD_TYPE,
 			      strlen(OTP_INIT_WORD_TYPE))) {
-	    r = word2bin(utils, new_resp, new_otp, md);
+	    r = word2bin(utils, new_resp, new_otp, md, mdctx);
 	}
 	
 	if (r == SASL_OK) {
@@ -914,7 +958,10 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
 	    memcpy(text->otp, new_otp, OTP_HASH_SIZE);
 	}
     }
-    
+
+  done:
+    if (mdctx) _plug_EVP_MD_CTX_free(mdctx, utils);
+
     return r;
 }
 
@@ -1071,7 +1118,7 @@ static int otp_server_mech_step1(server_context_t *text,
 	result = params->utils->prop_request(propctx, store_request);
     if (result == SASL_OK)
 	result = params->utils->prop_set(propctx, "cmusaslsecretOTP",
-					 sec->data, sec->len);
+					 (char *) sec->data, sec->len);
     if (result == SASL_OK)
 	result = params->utils->auxprop_store(params->utils->conn,
 					      propctx, text->authid);
@@ -1153,7 +1200,7 @@ otp_server_mech_step2(server_context_t *text,
 	result = params->utils->prop_request(propctx, store_request);
     if (result == SASL_OK)
 	result = params->utils->prop_set(propctx, "cmusaslsecretOTP",
-					 sec->data, sec->len);
+					 (char *) sec->data, sec->len);
     if (result == SASL_OK)
 	result = params->utils->auxprop_store(params->utils->conn,
 					      propctx, text->authid);
@@ -1244,7 +1291,7 @@ static void otp_server_mech_dispose(void *conn_context,
 	    r = utils->prop_request(propctx, store_request);
 	if (!r)
 	    r = utils->prop_set(propctx, "cmusaslsecretOTP",
-				(sec ? sec->data : NULL),
+				(sec ? (char *) sec->data : NULL),
 				(sec ? sec->len : 0));
 	if (!r)
 	    r = utils->auxprop_store(utils->conn, propctx, text->authid);
@@ -1269,8 +1316,7 @@ static void otp_server_mech_dispose(void *conn_context,
 static int otp_setpass(void *glob_context __attribute__((unused)),
 		       sasl_server_params_t *sparams,
 		       const char *userstr,
-		       const char *pass,
-		       unsigned passlen __attribute__((unused)),
+		       const char *pass, unsigned passlen,
 		       const char *oldpass __attribute__((unused)),
 		       unsigned oldpasslen __attribute__((unused)),
 		       unsigned flags)
@@ -1315,7 +1361,7 @@ static int otp_setpass(void *glob_context __attribute__((unused)),
 	unsigned int len;
 	unsigned short randnum;
 	char seed[OTP_SEED_MAX+1];
-	char otp[OTP_HASH_SIZE];
+	unsigned char otp[OTP_HASH_SIZE];
 	
 	sparams->utils->getopt(sparams->utils->getopt_context,
 			       "OTP", "otp_mda", &mda, &len);
@@ -1342,7 +1388,7 @@ static int otp_setpass(void *glob_context __attribute__((unused)),
 	sprintf(seed, "%.2s%04u", sparams->serverFQDN, (randnum % 9999) + 1);
 	
 	r = generate_otp(sparams->utils, algs, OTP_SEQUENCE_DEFAULT,
-			 seed, (char*) pass, otp);
+			 seed, (unsigned char *) pass, passlen, otp);
 	if (r != SASL_OK) {
 	    /* generate_otp() takes care of error message */
 	    goto cleanup;
@@ -1364,7 +1410,7 @@ static int otp_setpass(void *glob_context __attribute__((unused)),
 	r = sparams->utils->prop_request(propctx, store_request);
     if (!r)
 	r = sparams->utils->prop_set(propctx, "cmusaslsecretOTP",
-				     (sec ? sec->data : NULL),
+				     (sec ? (char *) sec->data : NULL),
 				     (sec ? sec->len : 0));
     if (!r)
 	r = sparams->utils->auxprop_store(sparams->utils->conn, propctx, user);
@@ -1670,7 +1716,7 @@ static int otp_client_mech_step2(client_context_t *text,
 	algorithm_option_t *alg;
 	unsigned seq;
 	char seed[OTP_SEED_MAX+1];
-	char otp[OTP_HASH_SIZE];
+	unsigned char otp[OTP_HASH_SIZE];
 	int init_done = 0;
 	
 	/* parse challenge */
@@ -1694,7 +1740,7 @@ static int otp_client_mech_step2(client_context_t *text,
 	
 	/* generate otp */
 	result = generate_otp(params->utils, alg, seq, seed,
-			      text->password->data, otp);
+			      text->password->data, text->password->len, otp);
 	if (result != SASL_OK) return result;
 	
 	result = _plug_buf_alloc(params->utils, &(text->out_buf),
@@ -1704,7 +1750,7 @@ static int otp_client_mech_step2(client_context_t *text,
 	if (seq < OTP_SEQUENCE_REINIT) {
 	    unsigned short randnum;
 	    char new_seed[OTP_SEED_MAX+1];
-	    char new_otp[OTP_HASH_SIZE];
+	    unsigned char new_otp[OTP_HASH_SIZE];
 	    
 	    /* try to reinitialize */
 	    
@@ -1717,7 +1763,7 @@ static int otp_client_mech_step2(client_context_t *text,
 	    } while (!strcasecmp(seed, new_seed));
 	    
 	    result = generate_otp(params->utils, alg, OTP_SEQUENCE_DEFAULT,
-				  new_seed, text->password->data, new_otp);
+				  new_seed, text->password->data, text->password->len, new_otp);
 	    
 	    if (result == SASL_OK) {
 		/* create an init-hex response */
diff --git a/plugins/otp_init.c b/plugins/otp_init.c
deleted file mode 100644
index cd11684..0000000
--- a/plugins/otp_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_otp_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( otp )
-SASL_SERVER_PLUG_INIT( otp )
-
diff --git a/plugins/passdss_init.c b/plugins/passdss_init.c
deleted file mode 100644
index 3a35fb7..0000000
--- a/plugins/passdss_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_passdss_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( passdss )
-SASL_SERVER_PLUG_INIT( passdss )
-
diff --git a/plugins/plain_init.c b/plugins/plain_init.c
deleted file mode 100644
index 0ca8f58..0000000
--- a/plugins/plain_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_plain_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( plain )
-SASL_SERVER_PLUG_INIT( plain )
-
diff --git a/plugins/plugin_common.c b/plugins/plugin_common.c
index 3aa6f9a..f2b26bd 100644
--- a/plugins/plugin_common.c
+++ b/plugins/plugin_common.c
@@ -94,7 +94,7 @@ static void sockaddr_unmapped(
     if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
 	return;
     sin4 = (struct sockaddr_in *)sa;
-    addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
+    addr = *(uint32_t *)&sin6->sin6_addr.s6_addr32[3];
     port = sin6->sin6_port;
     memset(sin4, 0, sizeof(struct sockaddr_in));
     sin4->sin_addr.s_addr = addr;
@@ -334,7 +334,7 @@ int _plug_get_simple(const sasl_utils_t *utils, unsigned int id, int required,
 	/* We prompted, and got.*/
 	
 	if (required && !prompt->result) {
-	    SETERROR(utils, "Unexpectedly missing a prompt result");
+	    SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_simple");
 	    return SASL_BADPARAM;
 	}
 
@@ -382,7 +382,7 @@ int _plug_get_password(const sasl_utils_t *utils, sasl_secret_t **password,
 	/* We prompted, and got.*/
 	
 	if (!prompt->result) {
-	    SETERROR(utils, "Unexpectedly missing a prompt result");
+	    SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_password");
 	    return SASL_BADPARAM;
 	}
       
@@ -441,7 +441,7 @@ int _plug_challenge_prompt(const sasl_utils_t *utils, unsigned int id,
 	/* We prompted, and got.*/
 	
 	if (!prompt->result) {
-	    SETERROR(utils, "Unexpectedly missing a prompt result");
+	    SETERROR(utils, "Unexpectedly missing a prompt result in _plug_challenge_prompt");
 	    return SASL_BADPARAM;
 	}
       
@@ -487,7 +487,7 @@ int _plug_get_realm(const sasl_utils_t *utils, const char **availrealms,
 	/* We prompted, and got.*/
 	
 	if (!prompt->result) {
-	    SETERROR(utils, "Unexpectedly missing a prompt result");
+	    SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_realm");
 	    return SASL_BADPARAM;
 	}
 
diff --git a/plugins/sasldb.c b/plugins/sasldb.c
index 1edbb8b..51214d6 100644
--- a/plugins/sasldb.c
+++ b/plugins/sasldb.c
@@ -248,7 +248,7 @@ static int sasldb_auxprop_store(void *glob_context __attribute__((unused)),
 
     ret = SASL_OK;
     for (cur = to_store; cur->name; cur++) {
-	char * value = (cur->values && cur->values[0]) ? cur->values[0] : NULL;
+	const char *value = (cur->values && cur->values[0]) ? cur->values[0] : NULL;
 
 	if (cur->name[0] == '*') {
 	    continue;
diff --git a/plugins/sasldb_init.c b/plugins/sasldb_init.c
deleted file mode 100644
index c75e1a8..0000000
--- a/plugins/sasldb_init.c
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_AUXPROP_PLUG_INIT( sasldb )
-
diff --git a/plugins/scram.c b/plugins/scram.c
index 62a101c..b0681c4 100644
--- a/plugins/scram.c
+++ b/plugins/scram.c
@@ -255,6 +255,7 @@ create_nonce(const sasl_utils_t * utils,
     return buffer;
 }
 
+#ifdef SCRAM_DEBUG
 /* Useful for debugging interop issues */
 static void
 print_hash (const char * func, const char * hash)
@@ -267,6 +268,7 @@ print_hash (const char * func, const char * hash)
     }
     printf ("\n");
 }
+#endif
 
 
 /* The result variable need to point to a buffer big enough for the [SHA-1] hash */
@@ -299,7 +301,7 @@ Hi (const sasl_utils_t * utils,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *) str,
 	     (int)str_len,
-	     initial_key,
+	     (const unsigned char *) initial_key,
 	     (int)salt_len + 4,
              (unsigned char *)result,
 	     &hash_len) == NULL) {
@@ -315,7 +317,7 @@ Hi (const sasl_utils_t * utils,
 	if (HMAC(EVP_sha1(),
 		 (const unsigned char *) str,
 		 (int)str_len,
-		 temp_result,
+		 (const unsigned char *) temp_result,
 		 SCRAM_HASH_SIZE,
 		 (unsigned char *)temp_result,
 		 &hash_len) == NULL) {
@@ -345,9 +347,10 @@ scram_server_user_salt(const sasl_utils_t * utils,
 		       size_t * p_salt_len)
 {
     char * result = utils->malloc(SCRAM_HASH_SIZE);
-    Hi(utils, username, strlen(username), g_salt_key, SALT_SIZE, 20 /* iterations */, result);
+    Hi(utils, username, strlen(username), (const char *) g_salt_key, SALT_SIZE,
+        20 /* iterations */, result);
     *p_salt_len = SCRAM_HASH_SIZE;
-    return result;
+    return (unsigned char *) result;
 }
 
 static int
@@ -386,7 +389,7 @@ GenerateScramSecrets (const sasl_utils_t * utils,
 
     /* SaltedPassword  := Hi(password, salt) */
     Hi (utils,
-	sec->data,
+	(const char *) sec->data,
 	sec->len,
 	salt,
 	salt_len,
@@ -397,7 +400,7 @@ GenerateScramSecrets (const sasl_utils_t * utils,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *) SaltedPassword,
 	     SCRAM_HASH_SIZE,
-	     CLIENT_KEY_CONSTANT,
+	     (const unsigned char *) CLIENT_KEY_CONSTANT,
 	     CLIENT_KEY_CONSTANT_LEN,
 	     (unsigned char *)ClientKey,
 	     &hash_len) == NULL) {
@@ -407,7 +410,8 @@ GenerateScramSecrets (const sasl_utils_t * utils,
     }
 
     /* StoredKey       := H(ClientKey) */
-    if (SHA1(ClientKey, SCRAM_HASH_SIZE, StoredKey) == NULL) {
+    if (SHA1((const unsigned char *) ClientKey, SCRAM_HASH_SIZE,
+        (unsigned char *) StoredKey) == NULL) {
 	*error_text = "SHA1 call failed";
 	result = SASL_SCRAM_INTERNAL;
 	goto cleanup;
@@ -418,7 +422,7 @@ GenerateScramSecrets (const sasl_utils_t * utils,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *) SaltedPassword,
 	     SCRAM_HASH_SIZE,
-	     SERVER_KEY_CONSTANT,
+	     (const unsigned char *) SERVER_KEY_CONSTANT,
 	     SERVER_KEY_CONSTANT_LEN,
 	     (unsigned char *)ServerKey,
 	     &hash_len) == NULL) {
@@ -509,7 +513,6 @@ scram_server_mech_step1(server_context_t *text,
 				       NULL };
     int canon_flags;
     struct propval auxprop_values[3];
-    unsigned int hash_len = 0;
     int result;
 
     if (clientinlen == 0) {
@@ -783,13 +786,13 @@ scram_server_mech_step1(server_context_t *text,
 	char * s_iteration_count;
 	char * end;
 
-	text->salt = scram_server_user_salt(sparams->utils, text->authentication_id, &text->salt_len);
+	text->salt = (char *) scram_server_user_salt(sparams->utils, text->authentication_id, &text->salt_len);
 
 	sparams->utils->getopt(sparams->utils->getopt_context,
 			       /* Different SCRAM hashes can have different strengh */
 			       SCRAM_SASL_MECH,
 			       "scram_iteration_counter",
-			       &s_iteration_count,
+			       (const char **) &s_iteration_count,
 			       NULL);
 
 	if (s_iteration_count != NULL) {
@@ -899,7 +902,7 @@ scram_server_mech_step1(server_context_t *text,
 					 (unsigned int)base64_salt_len,
 					 text->salt,
 					 (unsigned int)base64_salt_len,
-					 &text->salt_len) != SASL_OK) {
+					 (unsigned int *) &text->salt_len) != SASL_OK) {
 		SETERROR(sparams->utils, "Invalid base64 encoding of the salt in " SCRAM_SASL_MECH " stored value");
 		continue;
 	    }
@@ -1304,7 +1307,7 @@ scram_server_mech_step2(server_context_t *text,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *) text->StoredKey,
 	     SCRAM_HASH_SIZE,
-	     text->auth_message,
+	     (const unsigned char *)text->auth_message,
 	     (int)text->auth_message_len,
 	     (unsigned char *)ClientSignature,
 	     &hash_len) == NULL) {
@@ -1336,7 +1339,8 @@ scram_server_mech_step2(server_context_t *text,
     }
 
     /* StoredKey       := H(ClientKey) */
-    if (SHA1(ReceivedClientKey, SCRAM_HASH_SIZE, CalculatedStoredKey) == NULL) {
+    if (SHA1((const unsigned char *) ReceivedClientKey, SCRAM_HASH_SIZE,
+        (unsigned char *) CalculatedStoredKey) == NULL) {
 	sparams->utils->seterror(sparams->utils->conn,0,
 				 "SHA1 call failed");
 	result = SASL_SCRAM_INTERNAL;
@@ -1355,7 +1359,7 @@ scram_server_mech_step2(server_context_t *text,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *) text->ServerKey,
 	     SCRAM_HASH_SIZE,
-	     text->auth_message,
+	     (unsigned char *) text->auth_message,
 	     (int)text->auth_message_len,
 	     (unsigned char *)ServerSignature,
 	     &hash_len) == NULL) {
@@ -1572,7 +1576,7 @@ static int scram_setpass(void *glob_context __attribute__((unused)),
 			       /* Different SCRAM hashes can have different strengh */
 			       SCRAM_SASL_MECH,
 			       "scram_iteration_counter",
-			       &s_iteration_count,
+			       (const char **) &s_iteration_count,
 			       NULL);
 
 	if (s_iteration_count != NULL) {
@@ -1663,14 +1667,14 @@ static int scram_setpass(void *glob_context __attribute__((unused)),
 	    goto cleanup;
 	}
     	
-	sprintf(sec->data,
+	sprintf((char *) sec->data,
 		"%s$%u:%s$%s:%s",
 		SCRAM_SASL_MECH,
 		iteration_count,
 		base64_salt,
 		base64_StoredKey,
 		base64_ServerKey);
-	sec->len = (unsigned int) strlen(sec->data);
+	sec->len = (unsigned int) strlen((const char *) sec->data);
     }
     
     /* do the store */
@@ -1684,7 +1688,7 @@ static int scram_setpass(void *glob_context __attribute__((unused)),
     if (!r) {
 	r = sparams->utils->prop_set(propctx,
 				     "authPassword",
-				     (sec ? sec->data : NULL),
+				     (const char *) (sec ? sec->data : NULL),
 				     (sec ? sec->len : 0));
     }
     if (!r) {
@@ -1989,7 +1993,7 @@ scram_client_mech_step1(client_context_t *text,
 
     if (userid != NULL && *userid != '\0') {
 	result = encode_saslname (oparams->user,
-				  &encoded_authorization_id,
+				  (const char **) &encoded_authorization_id,
 				  &freeme2);
 
 	if (result != SASL_OK) {
@@ -2000,7 +2004,7 @@ scram_client_mech_step1(client_context_t *text,
     }
 
     result = encode_saslname (oparams->authid,
-			      &encoded_authcid,
+			      (const char **) &encoded_authcid,
 			      &freeme);
     if (result != SASL_OK) {
 	MEMERROR( params->utils );
@@ -2277,7 +2281,7 @@ scram_client_mech_step2(client_context_t *text,
 	    goto cleanup;
 	}
 
-	channel_binding_data = params->cbinding->data;
+	channel_binding_data = (const char *) params->cbinding->data;
 	channel_binding_data_len = params->cbinding->len;
     }
 
@@ -2368,7 +2372,7 @@ scram_client_mech_step2(client_context_t *text,
 
     /* SaltedPassword  := Hi(password, salt) */
     Hi (params->utils,
-	text->password->data,
+	(const char *) text->password->data,
 	text->password->len,
 	text->salt,
 	text->salt_len,
@@ -2381,7 +2385,7 @@ scram_client_mech_step2(client_context_t *text,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *) text->SaltedPassword,
 	     SCRAM_HASH_SIZE,
-	     CLIENT_KEY_CONSTANT,
+	     (const unsigned char *) CLIENT_KEY_CONSTANT,
 	     CLIENT_KEY_CONSTANT_LEN,
 	     (unsigned char *)ClientKey,
 	     &hash_len) == NULL) {
@@ -2394,7 +2398,8 @@ scram_client_mech_step2(client_context_t *text,
     PRINT_HASH ("ClientKey", ClientKey);
 
     /* StoredKey       := H(ClientKey) */
-    if (SHA1(ClientKey, SCRAM_HASH_SIZE, StoredKey) == NULL) {
+    if (SHA1((const unsigned char *) ClientKey, SCRAM_HASH_SIZE,
+        (unsigned char *) StoredKey) == NULL) {
 	params->utils->seterror(params->utils->conn,0,
 				"SHA1 call failed");
 	result = SASL_SCRAM_INTERNAL;
@@ -2407,7 +2412,7 @@ scram_client_mech_step2(client_context_t *text,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *)StoredKey,
 	     SCRAM_HASH_SIZE,
-	     text->auth_message,
+	     (const unsigned char *) text->auth_message,
 	     (int)text->auth_message_len,
 	     (unsigned char *)ClientSignature,
 	     &hash_len) == NULL) {
@@ -2535,7 +2540,7 @@ scram_client_mech_step3(client_context_t *text,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *)text->SaltedPassword,
 	     SCRAM_HASH_SIZE,
-	     SERVER_KEY_CONSTANT,
+	     (const unsigned char *) SERVER_KEY_CONSTANT,
 	     SERVER_KEY_CONSTANT_LEN,
 	     (unsigned char *)ServerKey,
 	     &hash_len) == NULL) {
@@ -2549,7 +2554,7 @@ scram_client_mech_step3(client_context_t *text,
     if (HMAC(EVP_sha1(),
 	     (const unsigned char *)ServerKey,
 	     SCRAM_HASH_SIZE,
-	     text->auth_message,
+	     (const unsigned char *) text->auth_message,
 	     (int)text->auth_message_len,
 	     (unsigned char *)ServerSignature,
 	     &hash_len) == NULL) {
diff --git a/plugins/scram_init.c b/plugins/scram_init.c
deleted file mode 100644
index c5d828b..0000000
--- a/plugins/scram_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_scram_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( scram )
-SASL_SERVER_PLUG_INIT( scram )
-
diff --git a/plugins/securid.c b/plugins/securid.c
new file mode 100644
index 0000000..f84e73b
--- /dev/null
+++ b/plugins/securid.c
@@ -0,0 +1,916 @@
+/* SECURID SASL plugin
+ * Ken Murchison
+ * $Id: securid.c,v 1.1 2006/02/07 19:27:54 murch Exp $
+ */
+/* 
+ * Copyright (c) 2006 Carnegie Mellon University.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The name "Carnegie Mellon University" must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission. For permission or any other legal
+ *    details, please contact  
+ *      Office of Technology Transfer
+ *      Carnegie Mellon University
+ *      5000 Forbes Avenue
+ *      Pittsburgh, PA  15213-3890
+ *      (412) 268-4387, fax: (412) 268-7395
+ *      tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by Computing Services
+ *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <string.h> 
+
+#include <sdi_athd.h>
+#include <sdconf.h>
+#include <sdi_size.h>
+#include <sdi_type.h>
+#include <sdi_defs.h>
+#include <sdacmvls.h>
+
+#include <sasl.h>
+#include <saslplug.h>
+
+#include "plugin_common.h"
+
+#ifdef WIN32
+/* This must be after sasl.h */
+# include "saslSECURID.h"
+#endif /* WIN32 */
+
+#ifdef macintosh 
+#include <sasl_securid_plugin_decl.h> 
+#endif 
+
+int creadcfg(void);
+int sd_init(struct SD_CLIENT *sd);
+int sd_check(char  *passcode, char *username, struct SD_CLIENT *sd);
+int sd_pin(char *pin, char canceled, struct SD_CLIENT *sd);
+int sd_next(char *nextcode, struct SD_CLIENT *sd);
+void sd_close(struct SD_CLIENT *sd);
+union config_record configure;
+
+static const char rcsid[] = "$Implementation: Carnegie Mellon SASL " VERSION " $";
+
+#undef L_DEFAULT_GUARD
+#define L_DEFAULT_GUARD (0)
+
+typedef struct context {
+    int state;
+    struct SD_CLIENT sd;
+    int need_pin;
+    sasl_secret_t *passcode;
+    char *out_buf;
+    unsigned out_buf_len;
+} context_t;
+
+static int securid_server_mech_new(void *glob_context __attribute__((unused)), 
+				 sasl_server_params_t *sparams,
+				 const char *challenge __attribute__((unused)),
+				 unsigned challen __attribute__((unused)),
+				 void **conn)
+{
+  context_t *text;
+
+  /* holds state are in */
+  text=sparams->utils->malloc(sizeof(context_t));
+  if (text==NULL) {
+      MEMERROR(sparams->utils);
+      return SASL_NOMEM;
+  }
+
+  memset(text, 0, sizeof(context_t));
+#if 0
+    /* access sdconf.rec */
+    if (creadcfg()) {
+	SETERROR(sparams->utils, "error reading sdconf.rec");
+	return SASL_FAIL;
+    }
+
+  /* initialize socket */
+  if (sd_init(&text->sd)) {
+      SETERROR(sparams->utils,
+	       "Cannot initialize ACE client-server communications");
+      return SASL_FAIL;
+  }
+#endif
+  text->state=1;
+
+  *conn=text;
+
+  return SASL_OK;
+}
+
+static void securid_both_mech_dispose(void *conn_context,
+				      const sasl_utils_t *utils)
+{
+  context_t *text;
+  text=conn_context;
+
+  if (!text)
+    return;
+
+  /* free sensitive info */
+  _plug_free_secret(utils, &(text->passcode));
+  
+  if(text->out_buf)
+      utils->free(text->out_buf);
+
+  utils->free(text);
+}
+
+static void securid_server_mech_dispose(void *conn_context,
+					const sasl_utils_t *utils)
+{
+  context_t *text;
+  text=conn_context;
+
+  if (!text)
+    return;
+#if 0
+  sd_close(&text->sd);	/* Shutdown the network connection */
+#endif
+  securid_both_mech_dispose(conn_context, utils);
+}
+
+
+static void securid_both_mech_free(void *global_context,
+				 const sasl_utils_t *utils)
+{
+    if(global_context) utils->free(global_context);  
+}
+
+/* fills in passcode; remember to free passcode and wipe it out correctly */
+static
+int verify_passcode(sasl_server_params_t *params, 
+		    const char *user, const char *pass)
+{
+    int result;
+    
+    /* if it's null, checkpass will default */
+    result = params->utils->checkpass(params->utils->conn,
+				      user, 0, pass, 0);
+    
+    return result;
+}
+
+static int
+securid_server_mech_step(void *conn_context,
+		       sasl_server_params_t *params,
+		       const char *clientin,
+		       unsigned clientinlen,
+		       const char **serverout,
+		       unsigned *serveroutlen,
+		       sasl_out_params_t *oparams)
+{
+  context_t *text;
+  text=conn_context;
+
+  oparams->mech_ssf=0;
+  oparams->maxoutbuf = 0;
+  
+  oparams->encode = NULL;
+  oparams->decode = NULL;
+
+  oparams->param_version = 0;
+
+  if (text->state <= 2) {
+    const char *authzid;
+    const char *authid;
+    const char *passcode;
+    const char *pin;
+    unsigned lup=0;
+    int result, ret;
+
+    /* should have received authzid NUL authid NUL passcode NUL [ pin NUL ] */
+
+    /* get authzid */
+    authzid = clientin;
+    while ((lup < clientinlen) && (clientin[lup] != 0))
+      ++lup;
+
+    if (lup >= clientinlen)
+    {
+	SETERROR(params->utils, "Can only find authzid (no passcode)");
+	return SASL_BADPROT;
+    }
+
+    /* get authid */
+    ++lup;
+    authid = clientin + lup;
+    while ((lup < clientinlen) && (clientin[lup] != 0))
+      ++lup;
+
+    if (lup >= clientinlen)
+    {
+	params->utils->seterror(params->utils->conn, 0,
+				"Can only find authzid/authid (no passcode)");
+	return SASL_BADPROT;
+    }
+
+    /* get passcode */
+    lup++;
+    passcode = clientin + lup;
+    while ((lup < clientinlen) && (clientin[lup] != 0))
+      ++lup;
+
+    if (text->state == 2 && text->need_pin) {
+	if (lup >= clientinlen)
+	    {
+		params->utils->seterror(params->utils->conn, 0,
+					"Can only find authzid/authid/passcode"
+					" (no pin)");
+		return SASL_BADPROT;
+	    }
+
+	/* get pin */
+	lup++;
+	pin = clientin + lup;
+	while ((lup < clientinlen) && (clientin[lup] != 0))
+	    ++lup;
+    }
+
+    if (lup >= clientinlen) {
+	SETERROR(params->utils, "Got more data than we were expecting in the SECURID plugin\n");
+	return SASL_BADPROT;
+    }
+
+    if (text->state == 1) {
+	/* verify passcode - return sasl_ok on success */  
+	if (!strcasecmp(passcode, "ok"))
+	    ret = ACM_OK;
+	else if (!strcasecmp(passcode, "fail"))
+	    ret = ACM_ACCESS_DENIED;
+	else if (!strcasecmp(passcode, "next"))
+	    ret = ACM_NEXT_CODE_REQUIRED;
+	else if (!strcasecmp(passcode, "pin"))
+	    ret = ACM_NEW_PIN_REQUIRED;
+	else
+	    ret = ACM_ACCESS_DENIED;
+
+	if (ret == ACM_ACCESS_DENIED) {
+	    params->utils->seterror(params->utils->conn, 0,
+				    "Passcode verification failed");
+	    return SASL_BADAUTH;
+	}
+
+	if (! authzid || !*authzid)
+	    authzid = authid;
+
+	result = params->canon_user(params->utils->conn,
+				    authid, 0, SASL_CU_AUTHID, oparams);
+	if(result != SASL_OK) return result;
+
+	result = params->canon_user(params->utils->conn,
+				    authzid, 0, SASL_CU_AUTHZID, oparams);
+	if(result != SASL_OK) return result;
+
+	switch (ret) {
+	case ACM_OK:
+	    *serverout = NULL;
+	    *serveroutlen = 0;
+
+	    text->state = 3; /* so fails if called again */
+
+	    oparams->doneflag = 1;
+
+	    return SASL_OK;
+
+	    break;
+
+	case ACM_NEXT_CODE_REQUIRED:
+	    *serveroutlen = strlen("passcode")+1;
+
+	    result = _plug_buf_alloc(params->utils, &(text->out_buf),
+				     &(text->out_buf_len), *serveroutlen);
+	    if(result != SASL_OK) return result;
+
+	    strcpy(text->out_buf, "passcode");
+
+	    *serverout = text->out_buf;
+
+	    text->state++;
+	    return SASL_CONTINUE;
+
+	    break;
+
+	case ACM_NEW_PIN_REQUIRED:
+	    *serveroutlen = strlen("pin")+1;
+
+	    result = _plug_buf_alloc(params->utils, &(text->out_buf),
+				     &(text->out_buf_len), *serveroutlen);
+	    if(result != SASL_OK) return result;
+
+	    strcpy(text->out_buf, "pin");
+
+	    *serverout = text->out_buf;
+
+	    text->state++;
+
+	    text->need_pin = 1;
+
+	    return SASL_CONTINUE;
+
+	    break;
+	}
+    }
+
+    if (text->state == 2) {
+	if (text->need_pin) {
+	}
+
+	else {
+	    /* verify next passcode - return sasl_ok on success */  
+	    if (!strcasecmp(passcode, "ok"))
+		ret = ACM_OK;
+	    else if (!strcasecmp(passcode, "fail"))
+		ret = ACM_ACCESS_DENIED;
+	    else
+		ret = ACM_ACCESS_DENIED;
+
+	    if (ret == ACM_ACCESS_DENIED) {
+		params->utils->seterror(params->utils->conn, 0,
+					"Next passcode verification failed");
+		return SASL_BADAUTH;
+	    }
+
+	    *serverout = NULL;
+	    *serveroutlen = 0;
+
+	    text->state = 3; /* so fails if called again */
+
+	    oparams->doneflag = 1;
+
+	    return SASL_OK;
+	}
+    }
+  }
+
+  SETERROR( params->utils,
+	    "Unexpected State Reached in SECURID plugin");
+  return SASL_FAIL; /* should never get here */
+}
+
+static sasl_server_plug_t securid_server_plugins[] = 
+{
+  {
+    "SECURID",
+    0,
+    SASL_SEC_NOPLAINTEXT | SASL_SEC_NOANONYMOUS | SASL_SEC_FORWARD_SECRECY,
+    SASL_FEAT_WANT_CLIENT_FIRST,
+    NULL,
+    &securid_server_mech_new,
+    &securid_server_mech_step,
+    &securid_server_mech_dispose,
+    &securid_both_mech_free,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL
+  }
+};
+
+int securid_server_plug_init(const sasl_utils_t *utils,
+			   int maxversion,
+			   int *out_version,
+			   sasl_server_plug_t **pluglist,
+			   int *plugcount)
+{
+    if (maxversion<SASL_SERVER_PLUG_VERSION) {
+	SETERROR(utils, "SECURID version mismatch");
+	return SASL_BADVERS;
+    }
+
+    *pluglist=securid_server_plugins;
+
+    *plugcount=1;  
+    *out_version=SASL_SERVER_PLUG_VERSION;
+
+    return SASL_OK;
+}
+
+/* put in sasl_wrongmech */
+static int securid_client_mech_new(void *glob_context __attribute__((unused)),
+				 sasl_client_params_t *params,
+				 void **conn)
+{
+    context_t *text;
+
+    /* holds state are in */
+    text = params->utils->malloc(sizeof(context_t));
+    if (text==NULL) {
+	MEMERROR( params->utils );
+	return SASL_NOMEM;
+    }
+    
+    memset(text, 0, sizeof(context_t));
+
+    text->state=1;
+    *conn=text;
+
+    return SASL_OK;
+}
+
+/* 
+ * Trys to find the prompt with the lookingfor id in the prompt list
+ * Returns it if found. NULL otherwise
+ */
+static sasl_interact_t *find_prompt(sasl_interact_t **promptlist,
+				    unsigned int lookingfor)
+{
+  sasl_interact_t *prompt;
+
+  if (promptlist && *promptlist)
+    for (prompt = *promptlist;
+	 prompt->id != SASL_CB_LIST_END;
+	 ++prompt)
+      if (prompt->id==lookingfor)
+	return prompt;
+
+  return NULL;
+}
+
+/*
+ * Somehow retrieve the userid
+ * This is the same as in digest-md5 so change both
+ */
+static int get_userid(sasl_client_params_t *params,
+		      const char **userid,
+		      sasl_interact_t **prompt_need)
+{
+  int result;
+  sasl_getsimple_t *getuser_cb;
+  void *getuser_context;
+  sasl_interact_t *prompt;
+  const char *id;
+
+  /* see if we were given the userid in the prompt */
+  prompt=find_prompt(prompt_need,SASL_CB_USER);
+  if (prompt!=NULL)
+    {
+	*userid = prompt->result;
+	return SASL_OK;
+    }
+
+  /* Try to get the callback... */
+  result = params->utils->getcallback(params->utils->conn,
+				      SASL_CB_USER,
+				      &getuser_cb,
+				      &getuser_context);
+  if (result == SASL_OK && getuser_cb) {
+    id = NULL;
+    result = getuser_cb(getuser_context,
+			SASL_CB_USER,
+			&id,
+			NULL);
+    if (result != SASL_OK)
+      return result;
+    if (! id) {
+	PARAMERROR(params->utils);
+	return SASL_BADPARAM;
+    }
+    
+    *userid = id;
+  }
+
+  return result;
+}
+
+static int get_authid(sasl_client_params_t *params,
+		      const char **authid,
+		      sasl_interact_t **prompt_need)
+{
+
+  int result;
+  sasl_getsimple_t *getauth_cb;
+  void *getauth_context;
+  sasl_interact_t *prompt;
+  const char *id;
+
+  /* see if we were given the authname in the prompt */
+  prompt=find_prompt(prompt_need,SASL_CB_AUTHNAME);
+  if (prompt!=NULL)
+  {
+      *authid = prompt->result;
+      
+      return SASL_OK;
+  }
+
+  /* Try to get the callback... */
+  result = params->utils->getcallback(params->utils->conn,
+				      SASL_CB_AUTHNAME,
+				      &getauth_cb,
+				      &getauth_context);
+  if (result == SASL_OK && getauth_cb) {
+    id = NULL;
+    result = getauth_cb(getauth_context,
+			SASL_CB_AUTHNAME,
+			&id,
+			NULL);
+    if (result != SASL_OK)
+      return result;
+    if (! id) {
+	PARAMERROR( params->utils );
+	return SASL_BADPARAM;
+    }
+    
+    *authid = id;
+  }
+
+  return result;
+}
+
+static int get_passcode(sasl_client_params_t *params,
+		      sasl_secret_t **passcode,
+		      sasl_interact_t **prompt_need)
+{
+
+  int result;
+  sasl_getsecret_t *getpass_cb;
+  void *getpass_context;
+  sasl_interact_t *prompt;
+
+  /* see if we were given the passcode in the prompt */
+  prompt=find_prompt(prompt_need,SASL_CB_PASS);
+  if (prompt!=NULL)
+  {
+      /* We prompted, and got.*/
+	
+      if (! prompt->result) {
+	  SETERROR(params->utils, "Unexpectedly missing a prompt result");
+	  return SASL_FAIL;
+      }
+      
+      /* copy what we got into a secret_t */
+      *passcode = (sasl_secret_t *) params->utils->malloc(sizeof(sasl_secret_t)+
+							  prompt->len+1);
+      if (! *passcode) {
+	  MEMERROR( params->utils );
+	  return SASL_NOMEM;
+      }
+      
+      (*passcode)->len=prompt->len;
+      memcpy((*passcode)->data, prompt->result, prompt->len);
+      (*passcode)->data[(*passcode)->len]=0;
+
+      return SASL_OK;
+  }
+
+
+  /* Try to get the callback... */
+  result = params->utils->getcallback(params->utils->conn,
+				      SASL_CB_PASS,
+				      &getpass_cb,
+				      &getpass_context);
+
+  if (result == SASL_OK && getpass_cb)
+    result = getpass_cb(params->utils->conn,
+			getpass_context,
+			SASL_CB_PASS,
+			passcode);
+
+  return result;
+}
+
+/*
+ * Make the necessary prompts
+ */
+static int make_prompts(sasl_client_params_t *params,
+			sasl_interact_t **prompts_res,
+			int user_res,
+			int auth_res,
+			int pass_res)
+{
+  int num=1;
+  sasl_interact_t *prompts;
+
+  if (user_res==SASL_INTERACT) num++;
+  if (auth_res==SASL_INTERACT) num++;
+  if (pass_res==SASL_INTERACT) num++;
+
+  if (num==1) {
+      SETERROR( params->utils, "make_prompts called with no actual prompts" );
+      return SASL_FAIL;
+  }
+
+  prompts=params->utils->malloc(sizeof(sasl_interact_t)*(num+1));
+  if ((prompts) ==NULL) {
+      MEMERROR( params->utils );
+      return SASL_NOMEM;
+  }
+  
+  *prompts_res=prompts;
+
+  if (user_res==SASL_INTERACT)
+  {
+    /* We weren't able to get the callback; let's try a SASL_INTERACT */
+    (prompts)->id=SASL_CB_USER;
+    (prompts)->challenge="Authzidization Name";
+    (prompts)->prompt="Please enter your authzidization name";
+    (prompts)->defresult=NULL;
+
+    prompts++;
+  }
+
+  if (auth_res==SASL_INTERACT)
+  {
+    /* We weren't able to get the callback; let's try a SASL_INTERACT */
+    (prompts)->id=SASL_CB_AUTHNAME;
+    (prompts)->challenge="Authidtication Name";
+    (prompts)->prompt="Please enter your authidtication name";
+    (prompts)->defresult=NULL;
+
+    prompts++;
+  }
+
+
+  if (pass_res==SASL_INTERACT)
+  {
+    /* We weren't able to get the callback; let's try a SASL_INTERACT */
+    (prompts)->id=SASL_CB_PASS;
+    (prompts)->challenge="Passcode";
+    (prompts)->prompt="Please enter your passcode";
+    (prompts)->defresult=NULL;
+
+    prompts++;
+  }
+
+  /* add the ending one */
+  (prompts)->id=SASL_CB_LIST_END;
+  (prompts)->challenge=NULL;
+  (prompts)->prompt   =NULL;
+  (prompts)->defresult=NULL;
+
+  return SASL_OK;
+}
+
+
+
+static int securid_client_mech_step(void *conn_context,
+				  sasl_client_params_t *params,
+				  const char *serverin __attribute__((unused)),
+				  unsigned serverinlen __attribute__((unused)),
+				  sasl_interact_t **prompt_need,
+				  const char **clientout,
+				  unsigned *clientoutlen,
+				  sasl_out_params_t *oparams)
+{
+  int result, ret;
+  const char *user, *authid;
+  
+  context_t *text;
+  text=conn_context;
+
+  /* set oparams */
+  oparams->mech_ssf=0;
+  oparams->maxoutbuf=0;
+  oparams->encode=NULL;
+  oparams->decode=NULL;
+
+  oparams->param_version = 0;
+
+  if (text->state > 2)
+    return SASL_FAIL; /* should never get here */
+
+  if (text->state == 1) {
+    int user_result=SASL_OK;
+    int auth_result=SASL_OK;
+    int pass_result=SASL_OK;
+
+    /* check if sec layer strong enough */
+    if (params->props.min_ssf>0+params->external_ssf) {
+	SETERROR( params->utils, "The SECURID plugin cannot support any SSF");
+	return SASL_TOOWEAK;
+    }
+
+    /* try to get the authid */    
+    if (oparams->authid==NULL)
+    {
+      auth_result=get_authid(params,
+			     &authid,
+			     prompt_need);
+
+      if ((auth_result!=SASL_OK) && (auth_result!=SASL_INTERACT))
+	return auth_result;
+    }			
+
+    /* try to get the userid */
+    if (oparams->user==NULL)
+    {
+      user_result=get_userid(params,
+			     &user,
+			     prompt_need);
+
+      /* Fallback to authid */
+      if ((user_result!=SASL_OK) && (user_result!=SASL_INTERACT)) {
+	  user = authid;
+      }
+    }
+
+    /* try to get the passcode */
+    if (text->passcode==NULL)
+    {
+      pass_result=get_passcode(params,
+			       &text->passcode,
+			       prompt_need);
+      
+      if ((pass_result!=SASL_OK) && (pass_result!=SASL_INTERACT))
+	return pass_result;
+    }
+
+    /* free prompts we got */
+    if (prompt_need && *prompt_need) {
+	params->utils->free(*prompt_need);
+	*prompt_need = NULL;
+    }
+
+    /* if there are prompts not filled in */
+    if ((user_result==SASL_INTERACT) || (auth_result==SASL_INTERACT) ||
+	(pass_result==SASL_INTERACT))
+    {
+      /* make the prompt list */
+      result=make_prompts(params,prompt_need,
+			  user_result, auth_result, pass_result);
+      if (result!=SASL_OK) return result;
+      
+      return SASL_INTERACT;
+    }
+    
+    ret = params->canon_user(params->utils->conn, user, 0,
+			     SASL_CU_AUTHZID, oparams);
+    if(ret != SASL_OK) return ret;
+    ret = params->canon_user(params->utils->conn, authid, 0,
+			     SASL_CU_AUTHID, oparams);
+    if(ret != SASL_OK) return ret;
+    
+    if (!text->passcode) {
+	PARAMERROR(params->utils);
+	return SASL_BADPARAM;
+    }
+  }
+
+  if (text->state == 2) {
+    const char *request;
+    const char *pin;
+    unsigned lup=0;
+    int user_result=SASL_OK;
+    int auth_result=SASL_OK;
+    int pass_result=SASL_OK;
+
+    /* should have received "passcode" NUL | "pin" NUL [ suggested-pin NUL ] */
+
+    /* get request */
+    request = serverin;
+    while ((lup < serverinlen) && (serverin[lup] != 0))
+      ++lup;
+
+    if (!strcmp(request, "passcode")) {
+	text->need_pin = 0;
+    }
+    else if (!strcmp(request, "pin")) {
+	text->need_pin = 1;
+
+	if (lup < serverinlen) {
+	    /* get pin */
+	    lup++;
+	    pin = serverin + lup;
+	    while ((lup < serverinlen) && (serverin[lup] != 0))
+		++lup;
+	}
+    }
+    else {
+	params->utils->seterror(params->utils->conn,
+				"unknown SECURID server request '%s'\n",
+				request);
+	return SASL_BADPROT;
+    }
+
+    if (lup >= serverinlen) {
+	SETERROR(params->utils, "Got more data than we were expecting in the SECURID plugin\n");
+	return SASL_BADPROT;
+    }
+
+    /* free previous passcode info */
+    _plug_free_secret(params->utils, &(text->passcode));
+
+    /* try to get the passcode */
+    if (text->passcode==NULL)
+    {
+      pass_result=get_passcode(params,
+			       &text->passcode,
+			       prompt_need);
+      
+      if ((pass_result!=SASL_OK) && (pass_result!=SASL_INTERACT))
+	return pass_result;
+    }
+
+    /* free prompts we got */
+    if (prompt_need && *prompt_need) {
+	params->utils->free(*prompt_need);
+	*prompt_need = NULL;
+    }
+
+    /* if there are prompts not filled in */
+    if ((user_result==SASL_INTERACT) || (auth_result==SASL_INTERACT) ||
+	(pass_result==SASL_INTERACT))
+    {
+      /* make the prompt list */
+      result=make_prompts(params,prompt_need,
+			  user_result, auth_result, pass_result);
+      if (result!=SASL_OK) return result;
+      
+      return SASL_INTERACT;
+    }
+    
+    if (!text->passcode) {
+	PARAMERROR(params->utils);
+	return SASL_BADPARAM;
+    }
+  }
+
+  /* send authzid id NUL authid id NUL passcode NUL [ pin NUL ] */
+  *clientoutlen = (oparams->ulen + 1
+		   + oparams->alen + 1
+		   + text->passcode->len + 1);
+
+  result = _plug_buf_alloc(params->utils, &(text->out_buf),
+			   &(text->out_buf_len), *clientoutlen);
+  if(result != SASL_OK) return result;
+
+  memset(text->out_buf, 0, *clientoutlen);
+  memcpy(text->out_buf, oparams->user, oparams->ulen);
+  memcpy(text->out_buf+oparams->ulen+1, oparams->authid, oparams->alen);
+  memcpy(text->out_buf+oparams->ulen+oparams->alen+2,
+	 text->passcode->data,
+	 text->passcode->len);
+
+  *clientout=text->out_buf;
+
+  text->state++;
+
+  return SASL_CONTINUE;
+}
+
+static sasl_client_plug_t securid_client_plugins[] = 
+{
+  {
+    "SECURID",
+    0,
+    SASL_SEC_NOPLAINTEXT | SASL_SEC_NOANONYMOUS | SASL_SEC_FORWARD_SECRECY,
+    SASL_FEAT_WANT_CLIENT_FIRST,
+    NULL,
+    NULL,
+    &securid_client_mech_new,
+    &securid_client_mech_step,
+    &securid_both_mech_dispose,
+    &securid_both_mech_free,
+    NULL,
+    NULL,
+    NULL
+  }
+};
+
+int securid_client_plug_init(sasl_utils_t *utils,
+			   int maxversion,
+			   int *out_version,
+			   sasl_client_plug_t **pluglist,
+			   int *plugcount)
+{
+    if (maxversion<SASL_CLIENT_PLUG_VERSION) {
+	SETERROR(utils, "SECURID version mismatch");
+	return SASL_BADVERS;
+    }
+
+    *pluglist=securid_client_plugins;
+
+    *plugcount=1;
+    *out_version=SASL_CLIENT_PLUG_VERSION;
+
+    return SASL_OK;
+}
diff --git a/plugins/sql.c b/plugins/sql.c
index 3b89383..615d321 100644
--- a/plugins/sql.c
+++ b/plugins/sql.c
@@ -71,7 +71,7 @@ static void *_mysql_open(char *host, char *port, int usessl,
     MYSQL *mysql;
     
     if (!(mysql = mysql_init(NULL))) {
-	utils->log(NULL, SASL_LOG_ERR,
+	utils->log(utils->conn, SASL_LOG_ERR,
 		   "sql plugin: could not execute mysql_init()");
 	return NULL;
     }
@@ -108,7 +108,7 @@ static int _mysql_exec(void *conn, const char *cmd, char *value, size_t size,
     (void)mysql_real_query(conn, cmd, len);
 
     if(mysql_errno(conn)) {
-        utils->log(NULL, SASL_LOG_ERR, "sql query failed: %s",
+        utils->log(utils->conn, SASL_LOG_ERR, "sql query failed: %s",
 		   mysql_error(conn));
 	return -1;
     }
@@ -123,7 +123,7 @@ static int _mysql_exec(void *conn, const char *cmd, char *value, size_t size,
     result = mysql_store_result(conn);
     if (!result) {
 	/* umm nothing found */
-	utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
+	utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
 	return -1;
     }
 
@@ -132,11 +132,11 @@ static int _mysql_exec(void *conn, const char *cmd, char *value, size_t size,
     if (!row_count) {
 	/* umm nothing found */
 	mysql_free_result(result);
-	utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
+	utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
 	return -1;
     }
     if (row_count > 1) {
-	utils->log(NULL, SASL_LOG_WARN,
+	utils->log(utils->conn, SASL_LOG_WARN,
 		   "sql plugin: found duplicate row for query %s", cmd);
     }
     
@@ -145,7 +145,7 @@ static int _mysql_exec(void *conn, const char *cmd, char *value, size_t size,
     row = mysql_fetch_row(result);
     if (!row || !row[0]) {
 	/* umm nothing found */
-	utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
+	utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
 	mysql_free_result(result);
 	return -1;
     }
@@ -257,7 +257,8 @@ static void *_pgsql_open(char *host, char *port, int usessl,
     free(conninfo);
     
     if ((PQstatus(conn) != CONNECTION_OK)) {
-	utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", PQerrorMessage(conn));
+	utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s",
+		   PQerrorMessage(conn));
 	return NULL;
     }
     
@@ -288,7 +289,7 @@ static int _pgsql_exec(void *conn, const char *cmd, char *value, size_t size,
     }
     else if (status != PGRES_TUPLES_OK) {
 	/* error */
-	utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s ",
+	utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %s ",
 		   PQresStatus(status));
 	PQclear(result);
 	return -1;
@@ -298,12 +299,12 @@ static int _pgsql_exec(void *conn, const char *cmd, char *value, size_t size,
     row_count = PQntuples(result);
     if (!row_count) {
 	/* umm nothing found */
-	utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
+	utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
 	PQclear(result);
 	return -1;
     }
     if (row_count > 1) {
-	utils->log(NULL, SASL_LOG_WARN,
+	utils->log(utils->conn, SASL_LOG_WARN,
 		   "sql plugin: found duplicate row for query %s", cmd);
     }
     
@@ -357,14 +358,14 @@ static void *_sqlite_open(char *host __attribute__((unused)),
 
     db = sqlite_open(database, 0, &zErrMsg);
     if (db == NULL) {
-	utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
+	utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
 	sqlite_freemem (zErrMsg);
 	return NULL;
     }
 
     rc = sqlite_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg);
     if (rc != SQLITE_OK) {
-	utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
+	utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
 	sqlite_freemem (zErrMsg);
 	sqlite_close(db);
 	return NULL;
@@ -414,7 +415,7 @@ static int _sqlite_exec(void *db, const char *cmd, char *value, size_t size,
 
     rc = sqlite_exec((sqlite*)db, cmd, sqlite_my_callback, (void*)&result, &zErrMsg);
     if (rc != SQLITE_OK && rc != SQLITE_ABORT) {
-	utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s ", zErrMsg);
+	utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %s ", zErrMsg);
 	sqlite_freemem (zErrMsg);
 	return -1;
     }
@@ -426,7 +427,7 @@ static int _sqlite_exec(void *db, const char *cmd, char *value, size_t size,
 
     if (result == NULL) {
 	/* umm nothing found */
-	utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
+	utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
 	return -1;
     }
 
@@ -485,9 +486,10 @@ static void *_sqlite3_open(char *host __attribute__((unused)),
     rc = sqlite3_open(database, &db);
     if (SQLITE_OK != rc) {
     	if (db)
-		utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", sqlite3_errmsg(db));
+		utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s",
+			   sqlite3_errmsg(db));
 	else
-		utils->log(NULL, SASL_LOG_ERR, "sql plugin: %d", rc);
+		utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %d", rc);
 	sqlite3_close(db);
 	return NULL;
     }
@@ -495,10 +497,11 @@ static void *_sqlite3_open(char *host __attribute__((unused)),
     rc = sqlite3_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg);
     if (rc != SQLITE_OK) {
     	if (zErrMsg) {
-		utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
+		utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s",
+			   zErrMsg);
 		sqlite3_free(zErrMsg);
 	} else
-		utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %d", rc);
+		utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %d", rc);
 	sqlite3_close(db);
 	return NULL;
     }
@@ -552,10 +555,10 @@ static int _sqlite3_exec(void *db,
     rc = sqlite3_exec((sqlite3*)db, cmd, sqlite3_my_callback, (void*)&result, &zErrMsg);
     if (rc != SQLITE_OK) {
     	if (zErrMsg) {
-	    utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s", zErrMsg);
+	    utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %s", zErrMsg);
 	    sqlite3_free(zErrMsg);
 	} else {
-	    utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %d", rc);
+	    utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %d", rc);
 	}
 	return -1;
     }
@@ -567,7 +570,7 @@ static int _sqlite3_exec(void *db,
 
     if (result == NULL) {
 	/* umm nothing found */
-	utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
+	utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
 	return -1;
     }
 
@@ -719,7 +722,7 @@ static char *sql_create_statement(const char *statement, const char *prop,
 		buf_ptr += vlen;
 	    }
 	    else {
-		utils->log(NULL, SASL_LOG_ERR,
+		utils->log(utils->conn, SASL_LOG_ERR,
 			   "'%%v' shouldn't be in a SELECT or DELETE");
 	    }
 	    break;
@@ -769,7 +772,7 @@ static void sql_get_settings(const sasl_utils_t *utils, void *glob_context)
     }
 
     if (!e->name) {
-	utils->log(NULL, SASL_LOG_ERR, "SQL engine '%s' not supported",
+	utils->log(utils->conn, SASL_LOG_ERR, "SQL engine '%s' not supported",
 		   engine_name);
     }
 
@@ -845,7 +848,7 @@ static void *sql_connect(sql_settings_t *settings, const sasl_utils_t *utils)
      * it should probably save the connection but for 
      * now we will just disconnect everytime
      */
-    utils->log(NULL, SASL_LOG_DEBUG,
+    utils->log(utils->conn, SASL_LOG_DEBUG,
 	       "sql plugin try and connect to a host\n");
     
     /* create a working version of the hostnames */
@@ -861,7 +864,7 @@ static void *sql_connect(sql_settings_t *settings, const sasl_utils_t *utils)
 	    while (!isalnum(db_host[0])) db_host++;
 	}
 	
-	utils->log(NULL, SASL_LOG_DEBUG,
+	utils->log(utils->conn, SASL_LOG_DEBUG,
 		   "sql plugin trying to open db '%s' on host '%s'%s\n",
 		   settings->sql_database, cur_host,
 		   settings->sql_usessl ? " using SSL" : "");
@@ -877,7 +880,7 @@ static void *sql_connect(sql_settings_t *settings, const sasl_utils_t *utils)
 					      utils);
 	if (conn) break;
 	
-	utils->log(NULL, SASL_LOG_ERR,
+	utils->log(utils->conn, SASL_LOG_ERR,
 		   "sql plugin could not connect to host %s", cur_host);
 	
 	cur_host = db_host;
@@ -917,7 +920,7 @@ static int sql_auxprop_lookup(void *glob_context,
     /* setup the settings */
     settings = (sql_settings_t *) glob_context;
     
-    sparams->utils->log(NULL, SASL_LOG_DEBUG,
+    sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 			"sql plugin Parse the username %s\n", user);
     
     user_buf = sparams->utils->malloc(ulen + 1);
@@ -966,7 +969,7 @@ static int sql_auxprop_lookup(void *glob_context,
 
     conn = sql_connect(settings, sparams->utils);
     if (!conn) {
-	sparams->utils->log(NULL, SASL_LOG_ERR,
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 			    "sql plugin couldn't connect to any host\n");
 	/* TODO: in the future we might want to extend the internal
 	   SQL driver API to return a more detailed error */
@@ -1014,14 +1017,15 @@ static int sql_auxprop_lookup(void *glob_context,
 
 	if (!do_txn) {
 	    do_txn = 1;
-	    sparams->utils->log(NULL, SASL_LOG_DEBUG, "begin transaction");
+	    sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
+				"begin transaction");
 	    if (settings->sql_engine->sql_begin_txn(conn, sparams->utils)) {
-		sparams->utils->log(NULL, SASL_LOG_ERR, 
+		sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 				    "Unable to begin transaction\n");
 	    }
 	}
     
-	sparams->utils->log(NULL, SASL_LOG_DEBUG,
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 			    "sql plugin create statement from %s %s %s\n",
 			    realname, escap_userid, escap_realm);
 	
@@ -1035,7 +1039,7 @@ static int sql_auxprop_lookup(void *glob_context,
 	    break;
 	}
 	
-	sparams->utils->log(NULL, SASL_LOG_DEBUG,
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 			    "sql plugin doing query %s\n", query);
 	
 	value[0] = '\0';
@@ -1065,14 +1069,15 @@ static int sql_auxprop_lookup(void *glob_context,
 	       the userPassword attribute */
 	    if (!do_txn) {
 		do_txn = 1;
-		sparams->utils->log(NULL, SASL_LOG_DEBUG, "begin transaction");
+		sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
+				    "begin transaction");
 		if (settings->sql_engine->sql_begin_txn(conn, sparams->utils)) {
-		    sparams->utils->log(NULL, SASL_LOG_ERR, 
+		    sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 					"Unable to begin transaction\n");
 		}
 	    }
 
-	    sparams->utils->log(NULL, SASL_LOG_DEBUG,
+	    sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 				"sql plugin create statement from %s %s %s\n",
 				SASL_AUX_PASSWORD_PROP,
 				escap_userid,
@@ -1088,7 +1093,7 @@ static int sql_auxprop_lookup(void *glob_context,
 	    if (query == NULL) {
 		ret = SASL_NOMEM;
 	    } else {
-		sparams->utils->log(NULL, SASL_LOG_DEBUG,
+		sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 				    "sql plugin doing query %s\n", query);
         	
 		value[0] = '\0';
@@ -1110,9 +1115,10 @@ static int sql_auxprop_lookup(void *glob_context,
 
 
     if (do_txn) {
-	sparams->utils->log(NULL, SASL_LOG_DEBUG, "commit transaction");
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
+			    "commit transaction");
 	if (settings->sql_engine->sql_commit_txn(conn, sparams->utils)) {
-	    sparams->utils->log(NULL, SASL_LOG_ERR, 
+	    sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 				"Unable to commit transaction\n");
 	    /* Failure of the commit is non fatal when reading values */
 	}
@@ -1160,7 +1166,7 @@ static int sql_auxprop_store(void *glob_context,
     /* make sure our input is okay */
     if (!glob_context || !sparams || !user) return SASL_BADPARAM;
     
-    sparams->utils->log(NULL, SASL_LOG_DEBUG,
+    sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 			"sql plugin Parse the username %s\n", user);
     
     user_buf = sparams->utils->malloc(ulen + 1);
@@ -1203,7 +1209,7 @@ static int sql_auxprop_store(void *glob_context,
 
     conn = sql_connect(settings, sparams->utils);
     if (!conn) {
-	sparams->utils->log(NULL, SASL_LOG_ERR,
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 			    "sql plugin couldn't connect to any host\n");
 	goto done;
     }
@@ -1212,7 +1218,7 @@ static int sql_auxprop_store(void *glob_context,
     settings->sql_engine->sql_escape_str(escap_realm, realm);
     
     if (settings->sql_engine->sql_begin_txn(conn, sparams->utils)) {
-	sparams->utils->log(NULL, SASL_LOG_ERR, 
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 			    "Unable to begin transaction\n");
     }
     for (cur = to_store; ret == SASL_OK && cur->name; cur++) {
@@ -1252,7 +1258,7 @@ static int sql_auxprop_store(void *glob_context,
 				     cur->values && cur->values[0] ?
 				     "<omitted>" : SQL_NULL_VALUE,
 				     sparams->utils);
-	    sparams->utils->log(NULL, SASL_LOG_DEBUG,
+	    sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
 				"sql plugin doing statement %s\n",
 				log_statement);
 	    sparams->utils->free(log_statement);
@@ -1267,15 +1273,15 @@ static int sql_auxprop_store(void *glob_context,
 	sparams->utils->free(statement);
     }
     if (ret != SASL_OK) {
-	sparams->utils->log(NULL, SASL_LOG_ERR,
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 			    "Failed to store auxprop; aborting transaction\n");
 	if (settings->sql_engine->sql_rollback_txn(conn, sparams->utils)) {
-	    sparams->utils->log(NULL, SASL_LOG_ERR, 
+	    sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 				"Unable to rollback transaction\n");
 	}
     }
     else if (settings->sql_engine->sql_commit_txn(conn, sparams->utils)) {
-	sparams->utils->log(NULL, SASL_LOG_ERR, 
+	sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
 			    "Unable to commit transaction\n");
     }
     
@@ -1301,7 +1307,7 @@ static void sql_auxprop_free(void *glob_context, const sasl_utils_t *utils)
     
     if (!settings) return;
     
-    utils->log(NULL, SASL_LOG_DEBUG, "sql freeing memory\n");
+    utils->log(utils->conn, SASL_LOG_DEBUG, "sql freeing memory\n");
     
     utils->free(settings);
 }
@@ -1344,12 +1350,12 @@ int sql_auxprop_plug_init(const sasl_utils_t *utils,
     if (!settings->sql_engine->name) return SASL_NOMECH;
 
     if (!sql_exists(settings->sql_select)) {
-	utils->log(NULL, SASL_LOG_ERR, "sql_select option missing");
+	utils->log(utils->conn, SASL_LOG_ERR, "sql_select option missing");
 	utils->free(settings);	
 	return SASL_NOMECH;
     }
 
-    utils->log(NULL, SASL_LOG_DEBUG,
+    utils->log(utils->conn, SASL_LOG_DEBUG,
 	       "sql auxprop plugin using %s engine\n",
 	       settings->sql_engine->name);
     
diff --git a/plugins/sql_init.c b/plugins/sql_init.c
deleted file mode 100644
index ffbe2e8..0000000
--- a/plugins/sql_init.c
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_AUXPROP_PLUG_INIT( sql )
-
diff --git a/plugins/srp_init.c b/plugins/srp_init.c
deleted file mode 100644
index 305dcb3..0000000
--- a/plugins/srp_init.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef macintosh
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#include <assert.h>
-
-#include <sasl.h>
-#include <saslplug.h>
-#include <saslutil.h>
-
-#include "plugin_common.h"
-
-#ifdef macintosh
-#include <sasl_srp_plugin_decl.h>
-#endif
-
-#ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE hModule, 
-                       DWORD  ul_reason_for_call, 
-                       LPVOID lpReserved
-					 )
-{
-    switch (ul_reason_for_call)
-	{
-		case DLL_PROCESS_ATTACH:
-		case DLL_THREAD_ATTACH:
-		case DLL_THREAD_DETACH:
-		case DLL_PROCESS_DETACH:
-			break;
-    }
-    return TRUE;
-}
-#endif
-
-SASL_CLIENT_PLUG_INIT( srp )
-SASL_SERVER_PLUG_INIT( srp )
-
diff --git a/pwcheck/Makefile.am b/pwcheck/Makefile.am
index 8c9fc09..b6ed1d4 100644
--- a/pwcheck/Makefile.am
+++ b/pwcheck/Makefile.am
@@ -24,7 +24,7 @@
 
 sbin_PROGRAMS = pwcheck
 
-INCLUDES = -I../include -I../lib
+AM_CPPFLAGS = -I../include -I../lib
 
 pwcheck_SOURCES = pwcheck.c
 EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c
diff --git a/pwcheck/Makefile.in b/pwcheck/Makefile.in
deleted file mode 100644
index 1638e01..0000000
--- a/pwcheck/Makefile.in
+++ /dev/null
@@ -1,591 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the pwcheck daemon
-# Larry Greenfield
-#
-#         Copyright 1999 by Carnegie Mellon University
-#
-#                       All Rights Reserved
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that copyright notice and this permission notice appear in
-# supporting documentation, and that the name of CMU not be
-# used in advertising or publicity pertaining to distribution of the
-# software without specific, written prior permission.
-#
-# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-# SOFTWARE.
-#
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-sbin_PROGRAMS = pwcheck$(EXEEXT)
-subdir = pwcheck
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(sbindir)"
-PROGRAMS = $(sbin_PROGRAMS)
-am_pwcheck_OBJECTS = pwcheck.$(OBJEXT)
-pwcheck_OBJECTS = $(am_pwcheck_OBJECTS)
-pwcheck_DEPENDENCIES = pwcheck_ at PWCHECKMETH@.lo
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(pwcheck_SOURCES) $(EXTRA_pwcheck_SOURCES)
-DIST_SOURCES = $(pwcheck_SOURCES) $(EXTRA_pwcheck_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-INCLUDES = -I../include -I../lib
-pwcheck_SOURCES = pwcheck.c
-EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c
-pwcheck_DEPENDECIES = pwcheck_ at PWCHECKMETH@.lo
-pwcheck_LDADD = pwcheck_ at PWCHECKMETH@.lo @LIB_CRYPT@ @LIB_SOCKET@
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pwcheck/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu pwcheck/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-sbinPROGRAMS: $(sbin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p || test -f $$p1; \
-	  then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-sbinPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' `; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
-
-clean-sbinPROGRAMS:
-	@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-pwcheck$(EXEEXT): $(pwcheck_OBJECTS) $(pwcheck_DEPENDENCIES) 
-	@rm -f pwcheck$(EXEEXT)
-	$(LINK) $(pwcheck_OBJECTS) $(pwcheck_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pwcheck.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pwcheck_getpwnam.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pwcheck_getspnam.Po at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(sbindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-sbinPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-sbinPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-sbinPROGRAMS ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-sbinPROGRAMS install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-sbinPROGRAMS
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/pwcheck/pwcheck_getpwnam.c b/pwcheck/pwcheck_getpwnam.c
index 4b34222..400289c 100644
--- a/pwcheck/pwcheck_getpwnam.c
+++ b/pwcheck/pwcheck_getpwnam.c
@@ -32,6 +32,7 @@ char *userid;
 char *password;
 {
     char* r;
+    char* crpt_passwd;
     struct passwd *pwd;
 
     pwd = getpwnam(userid);
@@ -41,7 +42,7 @@ char *password;
     else if (pwd->pw_passwd[0] == '*') {
 	r = "Account disabled";
     }
-    else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) != 0) {
+    else if (!(crpt_passwd = crypt(password, pwd->pw_passwd)) || strcmp(pwd->pw_passwd, (const char *)crpt_passwd) != 0) {
 	r = "Incorrect password";
     }
     else {
diff --git a/pwcheck/pwcheck_getspnam.c b/pwcheck/pwcheck_getspnam.c
index 2b11286..6d607bb 100644
--- a/pwcheck/pwcheck_getspnam.c
+++ b/pwcheck/pwcheck_getspnam.c
@@ -32,13 +32,15 @@ char *userid;
 char *password;
 {
     struct spwd *pwd;
+    char *crpt_passwd;
 
     pwd = getspnam(userid);
     if (!pwd) {
 	return "Userid not found";
     }
     
-    if (strcmp(pwd->sp_pwdp, crypt(password, pwd->sp_pwdp)) != 0) {
+    crpt_passwd = crypt(password, pwd->sp_pwdp);
+    if (!crpt_passwd || strcmp(pwd->sp_pwdp, (const char *)crpt_passwd) != 0) {
 	return "Incorrect password";
     }
     else {
diff --git a/sample/Makefile.am b/sample/Makefile.am
index f00579d..6bc77af 100644
--- a/sample/Makefile.am
+++ b/sample/Makefile.am
@@ -42,10 +42,11 @@
 #
 ################################################################
 
-INCLUDES=-I$(top_srcdir)/include
+AM_CPPFLAGS=-I$(top_srcdir)/include
 
 noinst_PROGRAMS = client server
 EXTRA_PROGRAMS = sample-client sample-server
+EXTRA_DIST = NTMakefile
 CLEANFILES=sample-client sample-server ./.libs/*sample-client ./.libs/*sample-server
 
 sample_client_SOURCES = sample-client.c
diff --git a/sample/Makefile.in b/sample/Makefile.in
deleted file mode 100644
index 29929a8..0000000
--- a/sample/Makefile.in
+++ /dev/null
@@ -1,607 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am -- automake input for sample SASL programs
-# Rob Earhart
-#
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-noinst_PROGRAMS = client$(EXEEXT) server$(EXEEXT)
-EXTRA_PROGRAMS = sample-client$(EXEEXT) sample-server$(EXEEXT)
-EXTRA_DIST = http_digest_client.c
-subdir = sample
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(srcdir)/NTMakefile
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_client_OBJECTS = client.$(OBJEXT) common.$(OBJEXT)
-client_OBJECTS = $(am_client_OBJECTS)
-am__DEPENDENCIES_1 =
-client_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_sample_client_OBJECTS = sample-client.$(OBJEXT)
-sample_client_OBJECTS = $(am_sample_client_OBJECTS)
-sample_client_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_sample_server_OBJECTS = sample-server.$(OBJEXT)
-sample_server_OBJECTS = $(am_sample_server_OBJECTS)
-sample_server_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_server_OBJECTS = server.$(OBJEXT) common.$(OBJEXT)
-server_OBJECTS = $(am_server_OBJECTS)
-server_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(client_SOURCES) $(sample_client_SOURCES) \
-	$(sample_server_SOURCES) $(server_SOURCES)
-DIST_SOURCES = $(client_SOURCES) $(sample_client_SOURCES) \
-	$(sample_server_SOURCES) $(server_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-INCLUDES = -I$(top_srcdir)/include
-CLEANFILES = sample-client sample-server ./.libs/*sample-client ./.libs/*sample-server
-sample_client_SOURCES = sample-client.c
-sample_server_SOURCES = sample-server.c
-server_SOURCES = server.c common.c common.h
-client_SOURCES = client.c common.c common.h
-server_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
-client_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
-sample_client_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
-sample_server_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sample/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu sample/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-client$(EXEEXT): $(client_OBJECTS) $(client_DEPENDENCIES) 
-	@rm -f client$(EXEEXT)
-	$(LINK) $(client_OBJECTS) $(client_LDADD) $(LIBS)
-sample-client$(EXEEXT): $(sample_client_OBJECTS) $(sample_client_DEPENDENCIES) 
-	@rm -f sample-client$(EXEEXT)
-	$(LINK) $(sample_client_OBJECTS) $(sample_client_LDADD) $(LIBS)
-sample-server$(EXEEXT): $(sample_server_OBJECTS) $(sample_server_DEPENDENCIES) 
-	@rm -f sample-server$(EXEEXT)
-	$(LINK) $(sample_server_OBJECTS) $(sample_server_LDADD) $(LIBS)
-server$(EXEEXT): $(server_OBJECTS) $(server_DEPENDENCIES) 
-	@rm -f server$(EXEEXT)
-	$(LINK) $(server_OBJECTS) $(server_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/client.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/common.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sample-client.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sample-server.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/server.Po at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstPROGRAMS ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/sample/client.c b/sample/client.c
index d568be5..aee8eac 100644
--- a/sample/client.c
+++ b/sample/client.c
@@ -174,7 +174,7 @@ getsecret(sasl_conn_t *conn,
     }
 
     x->len = len;
-    strcpy(x->data, password);
+    strcpy((char *)x->data, password);
     memset(password, 0, len);
     
     *psecret = x;
@@ -255,7 +255,7 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
 	mech = buf;
     }
 
-    r = sasl_client_start(conn, mech, NULL, &data, &len, &chosenmech);
+    r = sasl_client_start(conn, mech, NULL, &data, (unsigned int *) &len, &chosenmech);
     if (r != SASL_OK && r != SASL_CONTINUE) {
 	saslerr(r, "starting SASL negotiation");
 	printf("\n%s\n", sasl_errdetail(conn));
@@ -295,7 +295,7 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
 	}
 	len = recv_string(in, buf, sizeof buf);
 
-	r = sasl_client_step(conn, buf, len, NULL, &data, &len);
+	r = sasl_client_step(conn, buf, len, NULL, &data, (unsigned int *) &len);
 	if (r != SASL_OK && r != SASL_CONTINUE) {
 	    saslerr(r, "performing SASL negotiation");
 	    printf("\n%s\n", sasl_errdetail(conn));
@@ -389,7 +389,7 @@ int main(int argc, char *argv[])
 
     /* set ip addresses */
     salen = sizeof(local_ip);
-    if (getsockname(fd, (struct sockaddr *)&local_ip, &salen) < 0) {
+    if (getsockname(fd, (struct sockaddr *)&local_ip, (unsigned int*) &salen) < 0) {
 	perror("getsockname");
     }
 
@@ -408,7 +408,7 @@ int main(int argc, char *argv[])
     snprintf(localaddr, sizeof(localaddr), "%s;%s", hbuf, pbuf);
 
     salen = sizeof(remote_ip);
-    if (getpeername(fd, (struct sockaddr *)&remote_ip, &salen) < 0) {
+    if (getpeername(fd, (struct sockaddr *)&remote_ip, (unsigned int *) &salen) < 0) {
 	perror("getpeername");
     }
 
@@ -433,8 +433,8 @@ int main(int argc, char *argv[])
     if (cb_flag) {
         cb.name = "sasl-sample";
         cb.critical = cb_flag > 1;
-        cb.data = "this is a test of channel binding";
-        cb.len = strlen(cb.data);
+        cb.data = (unsigned char *) "this is a test of channel binding";
+        cb.len = (unsigned int) strlen((const char *) cb.data);
 
         sasl_setprop(conn, SASL_CHANNEL_BINDING, &cb);
     }
diff --git a/sample/server.c b/sample/server.c
index f5aff68..2a9c0ef 100644
--- a/sample/server.c
+++ b/sample/server.c
@@ -220,13 +220,15 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
 
 	dprintf(1, "generating client mechanism list... ");
 	r = sasl_listmech(conn, NULL, NULL, " ", NULL,
-			  &data, &len, &count);
+			  &data, (unsigned int *) &len, &count);
 	if (r != SASL_OK) saslfail(r, "generating mechanism list");
 	dprintf(1, "%d mechanisms\n", count);
     }
 
     /* send capability list to client */
     send_string(out, data, len);
+    if (mech)
+	free((void *) data);
 
     dprintf(1, "waiting for client mechanism...\n");
     len = recv_string(in, chosenmech, sizeof chosenmech);
@@ -258,10 +260,10 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
 
         /* start libsasl negotiation */
         r = sasl_server_start(conn, chosenmech, buf, len,
-			      &data, &len);
+			      &data, (unsigned int *) &len);
     } else {
 	r = sasl_server_start(conn, chosenmech, NULL, 0,
-			      &data, &len);
+			      &data, (unsigned int *) &len);
     }
     
     if (r != SASL_OK && r != SASL_CONTINUE) {
@@ -289,7 +291,7 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
 	    return -1;
 	}
 
-	r = sasl_server_step(conn, buf, len, &data, &len);
+	r = sasl_server_step(conn, buf, len, &data, (unsigned int *) &len);
 	if (r != SASL_OK && r != SASL_CONTINUE) {
 	    saslerr(r, "performing SASL negotiation");
 	    fputc('N', out); /* send NO to client */
@@ -420,7 +422,7 @@ int main(int argc, char *argv[])
 
 	/* set ip addresses */
 	salen = sizeof(local_ip);
-	if (getsockname(fd, (struct sockaddr *)&local_ip, &salen) < 0) {
+	if (getsockname(fd, (struct sockaddr *)&local_ip, (unsigned int *) &salen) < 0) {
 	    perror("getsockname");
 	}
 	niflags = (NI_NUMERICHOST | NI_NUMERICSERV);
@@ -438,7 +440,7 @@ int main(int argc, char *argv[])
         snprintf(localaddr, sizeof(localaddr), "%s;%s", hbuf, pbuf);
 
 	salen = sizeof(remote_ip);
-	if (getpeername(fd, (struct sockaddr *)&remote_ip, &salen) < 0) {
+	if (getpeername(fd, (struct sockaddr *)&remote_ip, (unsigned int *) &salen) < 0) {
 	    perror("getpeername");
 	}
 
@@ -468,8 +470,8 @@ int main(int argc, char *argv[])
 
 	cb.name = "sasl-sample";
 	cb.critical = cb_flag > 1;
-	cb.data = "this is a test of channel binding";
-	cb.len = strlen(cb.data);
+	cb.data = (const unsigned char *) "this is a test of channel binding";
+	cb.len = (unsigned int) strlen((const char *) cb.data);
 
 	if (cb_flag) {
 	    sasl_setprop(conn, SASL_CHANNEL_BINDING, &cb);
@@ -516,7 +518,7 @@ static void displayStatus_1(m, code, type)
         maj_stat = gss_display_status(&min_stat, code,
                                       type, GSS_C_NULL_OID,
                                       &msg_ctx, &msg);
-        fprintf(stderr, "%s: %s\n", m, (char *)msg.value);
+        fprintf(stderr, "%s (%u): %s\n", m, maj_stat, (char *)msg.value);
         (void) gss_release_buffer(&min_stat, &msg);
 
         if (!msg_ctx)
diff --git a/saslauthd/.gitignore b/saslauthd/.gitignore
new file mode 100644
index 0000000..65a4d7e
--- /dev/null
+++ b/saslauthd/.gitignore
@@ -0,0 +1,11 @@
+Makefile.in
+Makefile
+.deps
+.libs
+*.l[ao]
+*.o
+saslauthd
+saslauthd.8
+saslauthd.h*
+stamp-h1
+testsaslauthd
diff --git a/saslauthd/AUTHORS b/saslauthd/AUTHORS
deleted file mode 100644
index ecb1bec..0000000
--- a/saslauthd/AUTHORS
+++ /dev/null
@@ -1,23 +0,0 @@
-Tim Martin <tmartin at andrew.cmu.edu> wrote, debugged, and tested most of the
-code.
-
-Rob Siemborski <rjs3 at andrew.cmu.edu> wrote the self-contained autoconf system.
-
-Larry Greenfield <leg+sasl at andrew.cmu.edu> talked a lot.
-
-Igor Brezac <igor at ipass.net> has done a good deal of work on the saslauthd
-LDAP module.
-
-Jeremy Rumpf <jrumpf at heavyload.net> implemented the credential cache, unified
-the different IPC methods under a common framework.
-
-Fabian Knittel <fknittel at gmx.de> wrote auth_pam plugin, based on
-Debian's pwcheck_pam daemon by Michael-John Turner <mj at debian.org>.
-
-saslauthd was originally contributed by Lyndon Nerenberg on
-behalf of MessagingDirect Ltd.
-
-getaddrinfo.c was written by Hajimu UMEMOTO <ume at mahoroba.org>
-which is based on the IPv6 code written by KIKUCHI Takahiro
-<kick at kyoto.wide.ad.jp>
-
diff --git a/saslauthd/INSTALL b/saslauthd/INSTALL
deleted file mode 100644
index ed6ed2c..0000000
--- a/saslauthd/INSTALL
+++ /dev/null
@@ -1,3 +0,0 @@
-Follow the install documentation for SASL.  (saslauthd will install as 
-a part of the regular Cyrus SASL distribution as long as you configure
-SASL with --with-saslauthd)
diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am
index ce1e92b..f38097c 100644
--- a/saslauthd/Makefile.am
+++ b/saslauthd/Makefile.am
@@ -2,6 +2,9 @@ AUTOMAKE_OPTIONS = 1.7
 sbin_PROGRAMS	= saslauthd testsaslauthd
 EXTRA_PROGRAMS  = saslcache
 
+LTLIBOBJS = @LTLIBOBJS@
+LTLIBOBJS_FULL = $(addprefix ${top_srcdir}/lib/,${LTLIBOBJS})
+
 saslauthd_SOURCES = mechanisms.c globals.h \
 		    mechanisms.h auth_dce.c auth_dce.h auth_getpwent.c \
 		    auth_getpwent.h auth_krb5.c auth_krb5.h auth_krb4.c \
@@ -13,19 +16,19 @@ saslauthd_SOURCES = mechanisms.c globals.h \
                     ipc_unix.c ipc_doors.c saslauthd-main.c saslauthd-main.h \
 		    md5.c saslauthd_md5.h md5global.h 
 EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c
-saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
+saslauthd_DEPENDENCIES = saslauthd-main.o $(LTLIBOBJS_FULL)
 saslauthd_LDADD	= @SASL_KRB_LIB@ \
-		  @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
-		  @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
+		  @GSSAPIBASE_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
+		  @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL)
 
 testsaslauthd_SOURCES = testsaslauthd.c utils.c
 testsaslauthd_LDADD = @LIB_SOCKET@
 
 saslcache_SOURCES = saslcache.c
 
-EXTRA_DIST	= saslauthd.8 saslauthd.mdoc config include \
+EXTRA_DIST	= saslauthd.8 saslauthd.mdoc include \
 		  getnameinfo.c getaddrinfo.c LDAP_SASLAUTHD
-INCLUDES	= -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include
+AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include
 DEFS            = @DEFS@ -DSASLAUTHD_CONF_FILE_DEFAULT=\"@sysconfdir@/saslauthd.conf\" -I. -I$(srcdir) -I..
 
 
diff --git a/saslauthd/Makefile.in b/saslauthd/Makefile.in
deleted file mode 100644
index cfa0a78..0000000
--- a/saslauthd/Makefile.in
+++ /dev/null
@@ -1,729 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-sbin_PROGRAMS = saslauthd$(EXEEXT) testsaslauthd$(EXEEXT)
-EXTRA_PROGRAMS = saslcache$(EXEEXT)
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/saslauthd.h.in \
-	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-	config/config.guess config/config.sub config/depcomp \
-	config/install-sh config/ltconfig config/ltmain.sh \
-	config/missing config/mkinstalldirs getaddrinfo.c \
-	getnameinfo.c
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/../cmulocal/berkdb.m4 \
-	$(top_srcdir)/../cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/../cmulocal/c-attribute.m4 \
-	$(top_srcdir)/../cmulocal/common.m4 \
-	$(top_srcdir)/../cmulocal/cyrus.m4 \
-	$(top_srcdir)/../cmulocal/init_automake.m4 \
-	$(top_srcdir)/../cmulocal/ipv6.m4 \
-	$(top_srcdir)/../cmulocal/openssl.m4 \
-	$(top_srcdir)/../cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = saslauthd.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(sbindir)"
-PROGRAMS = $(sbin_PROGRAMS)
-am_saslauthd_OBJECTS = mechanisms.$(OBJEXT) auth_dce.$(OBJEXT) \
-	auth_getpwent.$(OBJEXT) auth_krb5.$(OBJEXT) \
-	auth_krb4.$(OBJEXT) auth_pam.$(OBJEXT) auth_rimap.$(OBJEXT) \
-	auth_httpform.$(OBJEXT) auth_shadow.$(OBJEXT) \
-	auth_sia.$(OBJEXT) auth_sasldb.$(OBJEXT) lak.$(OBJEXT) \
-	auth_ldap.$(OBJEXT) cache.$(OBJEXT) cfile.$(OBJEXT) \
-	krbtf.$(OBJEXT) utils.$(OBJEXT) ipc_unix.$(OBJEXT) \
-	ipc_doors.$(OBJEXT) saslauthd-main.$(OBJEXT) md5.$(OBJEXT)
-saslauthd_OBJECTS = $(am_saslauthd_OBJECTS)
-am_saslcache_OBJECTS = saslcache.$(OBJEXT)
-saslcache_OBJECTS = $(am_saslcache_OBJECTS)
-saslcache_LDADD = $(LDADD)
-am_testsaslauthd_OBJECTS = testsaslauthd.$(OBJEXT) utils.$(OBJEXT)
-testsaslauthd_OBJECTS = $(am_testsaslauthd_OBJECTS)
-testsaslauthd_DEPENDENCIES =
-DEFAULT_INCLUDES = -I. at am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(saslauthd_SOURCES) $(saslcache_SOURCES) \
-	$(testsaslauthd_SOURCES)
-DIST_SOURCES = $(saslauthd_SOURCES) $(saslcache_SOURCES) \
-	$(testsaslauthd_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@ -DSASLAUTHD_CONF_FILE_DEFAULT=\"@sysconfdir@/saslauthd.conf\" -I. -I$(srcdir) -I..
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDAP_LIBS = @LDAP_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_PAM = @LIB_PAM@
-LIB_SIA = @LIB_SIA@
-LIB_SOCKET = @LIB_SOCKET@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAIN_COMPAT_OBJ = @MAIN_COMPAT_OBJ@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.7
-saslauthd_SOURCES = mechanisms.c globals.h \
-		    mechanisms.h auth_dce.c auth_dce.h auth_getpwent.c \
-		    auth_getpwent.h auth_krb5.c auth_krb5.h auth_krb4.c \
-		    auth_krb4.h auth_pam.c auth_pam.h auth_rimap.c auth_httpform.c \
-		    auth_rimap.h auth_shadow.c auth_shadow.h auth_sia.c auth_httpform.h \
-		    auth_sia.h auth_sasldb.c auth_sasldb.h lak.c lak.h \
-		    auth_ldap.c auth_ldap.h cache.c cache.h cfile.c cfile.h \
-		    krbtf.c krbtf.h utils.c utils.h \
-                    ipc_unix.c ipc_doors.c saslauthd-main.c saslauthd-main.h \
-		    md5.c saslauthd_md5.h md5global.h 
-
-EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c
-saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
-saslauthd_LDADD = @SASL_KRB_LIB@ \
-		  @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
-		  @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
-
-testsaslauthd_SOURCES = testsaslauthd.c utils.c
-testsaslauthd_LDADD = @LIB_SOCKET@
-saslcache_SOURCES = saslcache.c
-EXTRA_DIST = saslauthd.8 saslauthd.mdoc config include \
-		  getnameinfo.c getaddrinfo.c LDAP_SASLAUTHD
-
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include
-all: saslauthd.h
-	$(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-am--refresh:
-	@:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    echo ' $(SHELL) ./config.status'; \
-	    $(SHELL) ./config.status;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	$(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	$(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-saslauthd.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
-
-stamp-h1: $(srcdir)/saslauthd.h.in $(top_builddir)/config.status
-	@rm -f stamp-h1
-	cd $(top_builddir) && $(SHELL) ./config.status saslauthd.h
-$(srcdir)/saslauthd.h.in:  $(am__configure_deps) 
-	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
-	rm -f stamp-h1
-	touch $@
-
-distclean-hdr:
-	-rm -f saslauthd.h stamp-h1
-install-sbinPROGRAMS: $(sbin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p; \
-	  then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-sbinPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' `; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
-
-clean-sbinPROGRAMS:
-	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
-saslauthd$(EXEEXT): $(saslauthd_OBJECTS) $(saslauthd_DEPENDENCIES) 
-	@rm -f saslauthd$(EXEEXT)
-	$(LINK) $(saslauthd_OBJECTS) $(saslauthd_LDADD) $(LIBS)
-saslcache$(EXEEXT): $(saslcache_OBJECTS) $(saslcache_DEPENDENCIES) 
-	@rm -f saslcache$(EXEEXT)
-	$(LINK) $(saslcache_OBJECTS) $(saslcache_LDADD) $(LIBS)
-testsaslauthd$(EXEEXT): $(testsaslauthd_OBJECTS) $(testsaslauthd_DEPENDENCIES) 
-	@rm -f testsaslauthd$(EXEEXT)
-	$(LINK) $(testsaslauthd_OBJECTS) $(testsaslauthd_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getnameinfo.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_dce.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_getpwent.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_httpform.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_krb4.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_krb5.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_ldap.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_pam.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_rimap.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_sasldb.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_shadow.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_sia.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cache.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cfile.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ipc_doors.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ipc_unix.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/krbtf.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lak.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/md5.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mechanisms.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/saslauthd-main.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/saslcache.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testsaslauthd.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utils.Po at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) saslauthd.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS) saslauthd.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) saslauthd.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS) saslauthd.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	$(am__remove_distdir)
-	test -d "$(distdir)" || mkdir "$(distdir)"
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
-	-test -n "$(am__skip_mode_fix)" \
-	|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r "$(distdir)"
-dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
-
-dist-xz: distdir
-	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
-
-dist-tarZ: distdir
-	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
-
-dist-shar: distdir
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
-
-dist-zip: distdir
-	-rm -f $(distdir).zip
-	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
-
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-	case '$(DIST_ARCHIVES)' in \
-	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
-	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
-	*.tar.xz*) \
-	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-	*.tar.Z*) \
-	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
-	*.zip*) \
-	  unzip $(distdir).zip ;;\
-	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
-	chmod a-w $(distdir)
-	test -d $(distdir)/_build || exit 0; \
-	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build \
-	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
-	  && $(MAKE) $(AM_MAKEFLAGS) check \
-	  && $(MAKE) $(AM_MAKEFLAGS) install \
-	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-	        distuninstallcheck \
-	  && chmod -R a-w "$$dc_install_base" \
-	  && ({ \
-	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
-	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist \
-	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
-	  && cd "$$am__cwd" \
-	  || exit 1
-	$(am__remove_distdir)
-	@(echo "$(distdir) archives ready for distribution: "; \
-	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
-	@$(am__cd) '$(distuninstallcheck_dir)' \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-	   || { echo "ERROR: files left after uninstall:" ; \
-	        if test -n "$(DESTDIR)"; then \
-	          echo "  (check DESTDIR support)"; \
-	        fi ; \
-	        $(distuninstallcheck_listfiles) ; \
-	        exit 1; } >&2
-distcleancheck: distclean
-	@if test '$(srcdir)' = . ; then \
-	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-	  exit 1 ; \
-	fi
-	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-	  || { echo "ERROR: files left in build directory after distclean:" ; \
-	       $(distcleancheck_listfiles) ; \
-	       exit 1; } >&2
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) saslauthd.h
-installdirs:
-	for dir in "$(DESTDIR)$(sbindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
-
-distclean: distclean-am
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf $(DEPDIR) ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-data-local
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-sbinPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -rf $(DEPDIR) ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-sbinPROGRAMS
-
-.MAKE: all install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-	clean-generic clean-sbinPROGRAMS ctags dist dist-all \
-	dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
-	dist-xz dist-zip distcheck distclean distclean-compile \
-	distclean-generic distclean-hdr distclean-tags distcleancheck \
-	distdir distuninstallcheck dvi dvi-am html html-am info \
-	info-am install install-am install-data install-data-am \
-	install-data-local install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-sbinPROGRAMS install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-sbinPROGRAMS
-
-
-dist-hook: saslauthd.8
-
-saslauthd.8: saslauthd.mdoc
-	nroff -mdoc $(srcdir)/saslauthd.mdoc > $(srcdir)/saslauthd.8
-
-install-data-local: saslauthd.8
-	$(mkinstalldirs) $(DESTDIR)$(mandir)/man8
-	$(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/saslauthd/NEWS b/saslauthd/NEWS
deleted file mode 100644
index 79b9a36..0000000
--- a/saslauthd/NEWS
+++ /dev/null
@@ -1,3 +0,0 @@
-New in v1.1.0
------------------
-- saslauthd now configures as a separate package.
diff --git a/saslauthd/README b/saslauthd/README
deleted file mode 100644
index f3184b6..0000000
--- a/saslauthd/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This directory contains the saslauthd daemon.  Similar to pwcheck, it
-allows password verification from a separate process.
-
-For more information, consult the main Cyrus SASL documentation.
diff --git a/saslauthd/README.cache b/saslauthd/README.cache
new file mode 100644
index 0000000..048007a
--- /dev/null
+++ b/saslauthd/README.cache
@@ -0,0 +1,252 @@
+
+Credential Cache Operation
+--------------------------
+
+BASICS:
+
+
+ The idea here is to try and explain the operation behind the credentials
+cache. The cache is actually implemented as an open hash table with fixed
+length bucket chains attached to each table slot (aka row).  The cache is
+disabled in the default operation of saslauthd, and may be enabled by
+specifying the -c option at runtime.  Note that caching of authentication
+credentials may not be acceptable within the site policy at all sites.
+
+ The table will also only cache the username, realm, and service
+credentials if they are under a certain length. The combined length of the
+username, realm, and service must be less than the CACHE_MAX_CREDS_LENGTH
+define in cache.h:
+
+
+#define CACHE_MAX_CREDS_LENGTH           60
+
+
+Each bucket in the hash table has the following declaration:
+
+struct bucket {
+        char            creds[CACHE_MAX_CREDS_LENGTH];
+        unsigned int    user_offt;
+        unsigned int    realm_offt;
+        unsigned int    service_offt;;
+        unsigned char   pwd_digest[16];
+        time_t          created;
+};
+
+
+Logical layout could be viewed as:
+
+x = bucket
+
+       bucket chains
+----------------------
+slot-> x x x x x x
+slot-> x x x x x x
+slot-> x x x x x x
+slot-> x x x x x x
+slot-> x x x x x x
+slot-> x x x x x x
+slot-> x x x x x x
+slot-> x x x x x x
+.....
+...
+.
+
+
+ A combined string composed of the username + realm + service is hashed to
+determine the proper slot that the entry should be located in. The associated
+bucket chain (at the hashed location) is then traversed to attempt to locate the
+entry. 
+ 
+ If the entry is not located in the bucket chain (cache miss), then the criteria
+(username, realm, service) will be written into the first empty or expired
+bucket. Further, if no buckets are empty or expired, the oldest entry in the
+bucket chain will be forcefully evicted and the new entry written in its place.
+
+ The hash table's size can be adjusted two ways. One is to increase the length
+of the bucket chains (CACHE_MAX_BUCKETS_PER define in cache.h). The second is to
+increase the number of slots available. The length of the bucket chains is hard
+coded to a length of 6 buckets per slot. It is not recommended to increase this
+value beyond about 8. Testing has shown that if the number of slots is sized
+properly, buckets further out than 8 seldom get allocated.
+
+ By default, the CACHE_DEFAULT_TABLE_SIZE define sets the number of slots to
+1711. Generating a total number of 10266 buckets. Techically this would cache
+10266 individual users, but the maximum hash table load only grows to be around
+.90. This effectively drops the number of cachable individual users to approx
+9230. The size of the hash table is also runtime configurable. The option -s
+to saslauthd accepts the desired size in kilobytes and calculates the number of
+slots to allocate.
+
+ To increase the efficiency of the hashing function the number of slots in the
+hash table needs to be kept relatively prime (hence all the default 111 stuff).
+The efficiency of the hashing function may drop as much a 15% by changing the
+number slots from 8001 to 8000. One shouldn't really worry about this though,
+the calculator behind the -s option has a built in prime number generator.
+
+ Items in the credental cache are stamped with an epoch stamp to gauge timeouts.
+The idea would be to set the cache timeout to a very long time (default is 8
+hours). This would allow the cache to fill up with the credentials of the user
+base, but would also expire entries that haven't been accessed for long time
+spans. The default timeout can be set with the CACHE_DEFAULT_TIMEOUT define in
+cache.h. The timeout is also runtime configurable by setting the timeout in
+seconds with the -t option.
+
+
+PROGRAMMING:
+
+
+ Programatically using the cache is pretty simple and straight forward. To check
+if a set of credentials is in the cache, call:
+
+ int cache_lookup(char *user, char *realm, char *service, char *password, struct cache_result *result)
+
+ and then (if needed) a following:
+
+ void cache_commit(struct cache_result *result)
+
+ The lookup process goes as follows:
+
+  1) memset() the result pointer to eliminate stray data. Set the default
+     result->status to CACHE_NON_FLUSHABLE.
+  2) If the combined length of the username, service, and realm is longer
+     than CACHE_MAX_CREDS_LENGTH (default 60), return CACHE_TOO_BIG.
+  3) Hash the username, service, and realm to obtain the slot (row) location
+     that should have the entry.
+  4) Acquire a read lock on the slot (row).
+  5) Traverse the bucket chain looking for the cached entry. If a cached 
+     entry is found with a matching password, unlock the slot (row), 
+     return CACHE_OK.
+  6) If the password in the bucket doesn't match the given password,
+     write an updated bucket into result->bucket, set the reference pointer 
+     (result->read_bucket) to the local read_bucket, set result->status ==
+     CACHE_FLUSH, release the lock, and return CACHE_FAIL. A pending
+     cache_commit() should follow.
+  7) If the entry could not be found in the bucket chain, write the new information
+     into result->bucket, set result->status == CACHE_FLUSH_WITH_RESCAN, release
+     the lock and return CACHE_FAIL. A pending cache_commit() should follow.
+
+ 
+ If the return value is CACHE_OK, then the user, realm, service, and password
+have been previously seen. Nothing more is really required after this point.
+Since the lookup was successful and result->status == CACHE_NO_FLUSH, any
+ancillary call to cache_commit() does nothing.
+
+ If a CACHE_FAIL is returned, the credentials should be checked against their
+native authentication mechanism. If that mechanism succeeds, then a call to
+cache_commit() will write the pending entry (saved via cache_result *) to its
+final location in the hash table. If the native authentication fails, skip the 
+call to cache_commit(), which will effectively discard the data.
+
+ If a CACHE_TOO_BIG is returned, the credentials should be checked against 
+their native authentication mechanism. Secondary calls to cache_commit() 
+will do nothing since result->status == CACHE_NO_FLUSH.
+
+ Cache_commit() flushes the result->bucket out to the hash table. The location 
+is determined by result->status. If result->status == CACHE_FLUSH, then the
+result->bucket needs to be written to the location pointed to via result->read_bucket.
+If result->status == CACHE_FLUSH_WITH_RESCAN, then the bucket is new or hasn't
+been seen before. We should rescan the bucket chain at result->hash_offset and 
+evict the oldest entry.
+
+ It should also be noted that all passwords in the credential cache are
+comprised of md5 digests of the original clear text passwords. The goal is
+to only keep passwords in clear text as long as needed.
+
+
+LOCKING:
+
+
+ Two methods are utilized to perform the required read/write locks on the hash
+table slots. One uses the fcntl() call (used elsewhere in saslauthd), the second
+utilizes the pthread rwlock interface (pthread_rwlock_wrlock(),
+pthread_rwlock_rdlock(), etc). The intention is to use the fcntl() interface
+when using the unix IPC mechanism and the rwlock interface when using the doors
+IPC mechanism.
+
+ The fcntl() interface opens a temporary locking file in the same path as the
+mux communication socket and has a .flock extension appended to it, example:
+/var/run/saslauthd/mux.flock . Each byte in the temporary file corresponds to a
+slot in the hash table. By employing fcntl() region locks (either F_WRLCK or
+F_RDLCK) on selected bytes, we can simulate advisory locks in the hash
+table.
+
+ The rwlock method initializes and array of pthread_rwlock_t types, one for each
+slot in the table. Successive calls are then made with the desired slot to lock
+being the offset into the pthread_rwlock_t table.
+
+
+DEBUGGING:
+
+
+ For those testing the cache code. It would be beneficial to enable verbose output
+regardless of what the rest of saslauthd is doing. By uncommenting the define in
+cache.h:
+
+/* If debugging uncomment this for always verbose  */
+//#define CACHE_DEFAULT_FLAGS           CACHE_VERBOSE
+
+extra data is logged about cache hits/misses, (un)locking events, etc. under the
+syslog facility LOG_INFO|LOG_AUTH (auth.info).
+
+
+SASLCACHE:
+
+
+ Upon startup, saslauthd will write the shared mmaped file out to the saslauthd
+state directory with the name cache.mmap. There is an included utility called saslcache
+that can be used to look into the mmaped file and gather some statistics about the
+cache. To build the saslcache utility:
+
+cd saslauthd
+make saslcache
+
+Examples of the saslcache utility:
+
+./saslcache -s		dumps out some information about the cache
+
+----------------------------------------
+Saslauthd Cache Detail:
+
+  timeout (seconds)           :  28800
+  total slots allocated       :  3643
+  slots in use                :  3
+  total buckets               :  21858
+  buckets per slot            :  6
+  buckets in use              :  3
+  hash table size (bytes)     :  2098536
+  bucket size (bytes)         :  96
+  minimum slot allocation     :  0
+  maximum slot allocation     :  1
+  slots at maximum allocation :  3
+  slots at minimum allocation :  3640
+  overall hash table load     :  0.00
+
+  hits*                       :  19
+  misses*                     :  3
+  total lookup attempts*      :  22
+  hit ratio*                  :  86.36
+----------------------------------------
+* May not be completely accurate
+----------------------------------------
+
+
+./saslcache -d		dumps the contents of the cache in a csv format
+
+"user","realm","service","created","created_localtime"
+"m3","","imap","1042513583","Mon Jan 13 22:06:23 2003"
+"m2","","imap","1042513256","Mon Jan 13 22:00:56 2003"
+"m1","","imap","1042513355","Mon Jan 13 22:02:35 2003"
+
+
+./saslcache -d -m /var/run/saslauthd/cache.mmap   with alternate mmaped file path
+
+
+ Overall, the whole goal of the cache is to provide relief to the authentication
+mechanisms without placing a lot of additional burden on the server. Hopefully
+the above methodology will be lightweight and effective at this task.
+
+As always, additional comments and/or suggestions are more than welcome.
+
+Jeremy Rumpf
+jrumpf at heavyload.net
+
diff --git a/saslauthd/README.ipc b/saslauthd/README.ipc
new file mode 100644
index 0000000..95eb97a
--- /dev/null
+++ b/saslauthd/README.ipc
@@ -0,0 +1,84 @@
+
+IPC API Documentation
+--------------------------
+
+
+BASICS:
+
+
+We'll explain what the ipc api is doing and how to implement new ipc 
+methods into saslauthd. 
+
+The ipc api is how saslauthd communicates with the end client. The ipc modules
+are responsible for marshalling authentication requests, passing those requests
+off to the do_auth() routine, and then returning the results back to the client.
+In addition to handling authentication requests, the ipc modules also may have
+to decide on other factors. Such as, what process model saslauthd will run
+under, alterting saslauthd when it's safe to detach from the controlling tty,
+etc.
+
+
+IMPLEMENTATION:
+
+
+An ipc module is required to implement three main functions.
+
+
+void ipc_init()
+
+  The ipc_init() function must setup any requirements for the ipc method to
+  operate. In addition to any setup it must perform for itself, it also must:
+
+  1> Call void detach_tty() once during its execution. If necessary, this
+  will daemonize the instance of saslauthd. It should delay the call as long as
+  possible so that any error conditions that arise can be returned via stderr.
+
+  2> If the ipc module wishes to implement the standard unix process model, it
+  must set the global flag USE_PROCESS_MODEL (see unix_ipc.c).
+
+
+void ipc_loop()
+
+  The ipc_loop() function is the main processing loop for saslauthd. It should
+  perform four basic tasks. 
+
+  1> Marshall in the request from the client.
+
+  2> Pass the request elements off to the do_auth() function.
+
+  3> Send the results of do_auth() back to the client.
+
+  4> Free the pointer returned from do_auth().
+
+
+void ipc_cleanup()
+
+  Void ipc_cleanup should perform and basic cleanup the module requires. If no
+  cleanup is required, an empty function should be provided.
+
+
+HEADERS
+
+
+The three main functions above are declared in the header file saslauthd-main.h.
+Any other helper functions in the source module, can either be declared in a
+separate header file, or more conveniently defined at the top of the module's source
+file.
+
+
+BUILD
+
+
+To keep the build process relatively simple, all source modules will be compiled
+at build time. Each ipc module should implement proper #ifdef statements around
+its entire code block. The chosen source module for the required ipc method will
+be fully compiled with the required function symbols defined. The remaning
+source modules will be compiled into empty object files. The logic for
+determining which source module will be fully compiled is placed in the
+saslauthd-main.h header file.
+
+
+Jeremy Rumpf
+jrumpf at heavyload.net
+
+
diff --git a/saslauthd/aclocal.m4 b/saslauthd/aclocal.m4
deleted file mode 100644
index 58d8aac..0000000
--- a/saslauthd/aclocal.m4
+++ /dev/null
@@ -1,962 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
-You have another version of autoconf.  It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 16
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-			     [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
-		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES(CXX)],
-		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES(OBJC)],
-		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes.	            -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([config/kerberos_v4.m4])
-m4_include([config/sasldb.m4])
-m4_include([../cmulocal/berkdb.m4])
-m4_include([../cmulocal/bsd_sockets.m4])
-m4_include([../cmulocal/c-attribute.m4])
-m4_include([../cmulocal/common.m4])
-m4_include([../cmulocal/cyrus.m4])
-m4_include([../cmulocal/init_automake.m4])
-m4_include([../cmulocal/ipv6.m4])
-m4_include([../cmulocal/openssl.m4])
-m4_include([../cmulocal/sasl2.m4])
diff --git a/saslauthd/auth_getpwent.c b/saslauthd/auth_getpwent.c
index fc8029d..84e1cc2 100644
--- a/saslauthd/auth_getpwent.c
+++ b/saslauthd/auth_getpwent.c
@@ -42,6 +42,7 @@
 #include <pwd.h>
 #include <errno.h>
 #include <syslog.h>
+#include <stdio.h>
 
 #ifdef HAVE_CRYPT_H
 #include <crypt.h>
@@ -77,6 +78,7 @@ auth_getpwent (
 {
     /* VARIABLES */
     struct passwd *pw;			/* pointer to passwd file entry */
+    char *crpt_passwd;			/* encrypted password */
     int errnum;
     /* END VARIABLES */
   
@@ -105,7 +107,8 @@ auth_getpwent (
 	}
     }
 
-    if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) {
+    crpt_passwd = crypt(password, pw->pw_passwd);
+    if (!crpt_passwd || strcmp(pw->pw_passwd, (const char *)crpt_passwd)) {
 	if (flags & VERBOSE) {
 	    syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login);
 	}
diff --git a/saslauthd/auth_httpform.c b/saslauthd/auth_httpform.c
index 8dbf551..c5c1b82 100644
--- a/saslauthd/auth_httpform.c
+++ b/saslauthd/auth_httpform.c
@@ -57,6 +57,8 @@
 #ident "$Id: auth_httpform.c,v 1.2 2006/04/19 19:51:04 murch Exp $"
 #endif
 
+#include <config.h>
+
 /* PUBLIC DEPENDENCIES */
 #include <unistd.h>
 #include <stdlib.h>
@@ -73,6 +75,7 @@
 #include <arpa/inet.h>
 #include <signal.h>
 #include <netdb.h>
+#include <stdio.h>
 
 #include "mechanisms.h"
 #include "utils.h"
@@ -168,7 +171,7 @@ static char *url_escape(
     size_t length = strlen(string);
     size_t alloc = length+50;   /* add some reserve */
     char *out;
-    int outidx=0, inidx=0;
+    size_t outidx=0, inidx=0;
     /* END VARIABLES */
 
     out = malloc(alloc);
@@ -234,7 +237,8 @@ static char *create_post_data(
 {
     /* VARIABLES */
     const char *ptr, *line_ptr;
-    char *buf, *buf_ptr;
+    char *esc_user = NULL, *esc_password = NULL, *esc_realm = NULL;
+    char *buf = NULL, *buf_ptr;
     int filtersize;
     int ulen, plen, rlen;
     int numpercents=0;
@@ -242,28 +246,12 @@ static char *create_post_data(
     size_t i;
     /* END VARIABLES */
 
-    user = url_escape(user);
-    if (!user) {
-        logger(LOG_ERR, "auth_httpform:create_post_data", "failed to allocate memory");
-        return NULL;
-    }
-
-    password = url_escape(password);
-    if (!password) {
-        memset(user, 0, strlen(user));
-        free(user);
+    user = esc_user = url_escape(user);
+    password = esc_password = url_escape(password);
+    realm = esc_realm = url_escape(realm);
+    if (!user || !password || !realm) {
         logger(LOG_ERR, "auth_httpform:create_post_data", "failed to allocate memory");
-        return NULL;
-    }
-
-    realm = url_escape(realm);
-    if (!realm) {
-        memset(user, 0, strlen(user));
-        free(user);
-        memset(password, 0, strlen(password));
-        free(password);
-        logger(LOG_ERR, "auth_httpform:create_post_data", "failed to allocate memory");
-        return NULL;
+        goto CLEANUP;
     }
     
     /* calculate memory needed for creating the complete query string. */
@@ -332,12 +320,18 @@ static char *create_post_data(
     memcpy(buf_ptr, line_ptr, strlen(line_ptr)+1);
 
 CLEANUP:
-    memset(user, 0, strlen(user));
-    memset(password, 0, strlen(password));
-    memset(realm, 0, strlen(realm));
-    free(user);
-    free(password);
-    free(realm);
+    if (esc_user) {
+        memset(esc_user, 0, strlen(esc_user));
+        free(esc_user);
+    }
+    if (esc_password) {
+        memset(esc_password, 0, strlen(esc_password));
+        free(esc_password);
+    }
+    if (esc_realm) {
+        memset(esc_realm, 0, strlen(realm));
+        free(esc_realm);
+    }
 
     return buf;
 }
@@ -493,8 +487,8 @@ auth_httpform (
   /* PARAMETERS */
   const char *user,			/* I: plaintext authenticator */
   const char *password,			/* I: plaintext password */
-  const char *service,
-  const char *realm
+  const char *service __attribute__((unused)),
+  const char *realm                    /* I: user's realm */
   /* END PARAMETERS */
   )
 {
@@ -502,7 +496,6 @@ auth_httpform (
     int s=-1;                           /* socket to remote auth host   */
     struct addrinfo *r;                 /* remote socket address info   */
     char *req;                          /* request, with user and pw    */
-    char *c;                            /* scratch pointer              */
     int rc;                             /* return code scratch area     */
     char postbuf[RESP_LEN];             /* request buffer               */
     int postlen;                        /* length of post request       */
@@ -574,7 +567,7 @@ auth_httpform (
               "Content-Type: application/x-www-form-urlencoded" CRLF
               "Content-Length: %d" TWO_CRLF
               "%s",
-              r_uri, r_host, r_port, strlen(req), req);
+              r_uri, r_host, r_port, (int)strlen(req), req);
 
     if (flags & VERBOSE) {
         syslog(LOG_DEBUG, "auth_httpform: sending %s %s %s",
diff --git a/saslauthd/auth_krb5.c b/saslauthd/auth_krb5.c
index 0648a29..e3e068d 100644
--- a/saslauthd/auth_krb5.c
+++ b/saslauthd/auth_krb5.c
@@ -79,7 +79,6 @@ auth_krb5_init (
   )
 {
 #ifdef AUTH_KRB5
-    int rc;
     char *configname = 0;
 
     if (krbtf_init() == -1) {
@@ -102,8 +101,8 @@ auth_krb5_init (
     }
 
     if (config) {
-	keytabname = cfile_getstring(config, "krb5_keytab", keytabname);
-	verify_principal = cfile_getstring(config, "krb5_verify_principal", verify_principal);
+	keytabname = (char *) cfile_getstring(config, "krb5_keytab", keytabname);
+	verify_principal = (char *) cfile_getstring(config, "krb5_verify_principal", verify_principal);
     }
 
     return 0;
@@ -127,6 +126,15 @@ form_principal_name (
     const char *forced_instance = 0;
 	int plen;
 
+    plen = strlcpy(pname, user, pnamelen);
+    user = pname;
+
+    if (config && cfile_getswitch(config, "krb5_conv_krb4_instance", 0)) {
+       char *krb4_instance;
+
+       if ((krb4_instance = strchr(pname, '.'))) *krb4_instance = '/';
+    }
+
     if (config) {
 	char keyname[1024];
 
@@ -137,7 +145,7 @@ form_principal_name (
     if (forced_instance) {
 	char *user_specified;
 
-	if (user_specified = strchr(user, '/')) {
+	if ((user_specified = strchr(user, '/'))) {
 	    if (strcmp(user_specified + 1, forced_instance)) {
 		/* user not allowed to override sysadmin */
 		return -1;
@@ -149,8 +157,7 @@ form_principal_name (
     }
 
     /* form user[/instance][@realm] */
-    plen = snprintf(pname, pnamelen, "%s%s%s%s%s",
-	user,
+    plen += snprintf(pname+plen, pnamelen-plen, "%s%s%s%s",
 	(forced_instance ? "/" : ""),
 	(forced_instance ? forced_instance : ""),
 	((realm && realm[0]) ? "@" : ""),
@@ -417,9 +424,9 @@ auth_krb5 (
     krb5_get_init_creds_opt_init(&opts);
     /* 15 min should be more than enough */
     krb5_get_init_creds_opt_set_tkt_life(&opts, 900); 
-    if (code = krb5_get_init_creds_password(context, &creds, 
-				     auth_user, password, NULL, NULL, 
-				     0, NULL, &opts)) {
+    if ((code = krb5_get_init_creds_password(context, &creds, 
+                                             auth_user, password, NULL, NULL, 
+                                             0, NULL, &opts))) {
 	krb5_cc_destroy(context, ccache);
 	krb5_free_principal(context, auth_user);
 	krb5_free_context(context);
diff --git a/saslauthd/auth_ldap.c b/saslauthd/auth_ldap.c
index c8d2878..2cd50f3 100644
--- a/saslauthd/auth_ldap.c
+++ b/saslauthd/auth_ldap.c
@@ -96,12 +96,6 @@ auth_ldap_init (
   /* END PARAMETERS */
   )
 {
-    /* VARIABLES */
-    struct addrinfo hints;
-    int err;
-    char *c;				/* scratch pointer               */
-    /* END VARIABLES */
-
     if (mech_option != NULL) {
 	SASLAUTHD_CONF_FILE = mech_option;
     }
diff --git a/saslauthd/auth_rimap.c b/saslauthd/auth_rimap.c
index 2c3870f..bdf89b3 100644
--- a/saslauthd/auth_rimap.c
+++ b/saslauthd/auth_rimap.c
@@ -75,6 +75,16 @@
 #include <arpa/inet.h>
 #include <signal.h>
 #include <netdb.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
 
 #include "auth_rimap.h"
 #include "utils.h"
@@ -383,7 +393,7 @@ auth_rimap (
         while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
            if ( FD_ISSET(s, &perm) ) {
               ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
-              if ( ret<0 ) {
+              if ( ret<=0 ) {
                  rc = ret;
                  break;
               } else {
@@ -496,7 +506,7 @@ auth_rimap (
         while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
            if ( FD_ISSET(s, &perm) ) {
               ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
-              if ( ret<0 ) {
+              if ( ret<=0 ) {
                  rc = ret;
                  break;
               } else {
diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c
index 677131b..d69e380 100644
--- a/saslauthd/auth_shadow.c
+++ b/saslauthd/auth_shadow.c
@@ -31,8 +31,11 @@
 #ident "$Id: auth_shadow.c,v 1.12 2009/08/14 14:58:38 mel Exp $"
 #endif
 
+#include <config.h>
+
 /* PUBLIC DEPENDENCIES */
 #include "mechanisms.h"
+#include <stdio.h>
 
 #ifdef AUTH_SHADOW
 
@@ -70,6 +73,10 @@
 #  include <shadow.h>
 # endif /* ! HAVE_GETUSERPW */
 
+# ifdef HAVE_CRYPT_H
+#  include <crypt.h>
+# endif
+
 # include "auth_shadow.h"
 # include "globals.h"
 /* END PUBLIC DEPENDENCIES */
@@ -210,8 +217,8 @@ auth_shadow (
 	RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)");
     }
 
-    cpw = strdup((const char *)crypt(password, sp->sp_pwdp));
-    if (strcmp(sp->sp_pwdp, cpw)) {
+    cpw = crypt(password, sp->sp_pwdp);
+    if (!cpw || strcmp(sp->sp_pwdp, (const char *)cpw)) {
 	if (flags & VERBOSE) {
 	    /*
 	     * This _should_ reveal the SHADOW_PW_LOCKED prefix to an
@@ -221,10 +228,8 @@ auth_shadow (
 	    syslog(LOG_DEBUG, "DEBUG: auth_shadow: pw mismatch: '%s' != '%s'",
 		   sp->sp_pwdp, cpw);
 	}
-	free(cpw);
 	RETURN("NO Incorrect password");
     }
-    free(cpw);
 
     /*
      * The following fields will be set to -1 if:
@@ -235,7 +240,7 @@ auth_shadow (
 
     if ((sp->sp_expire != -1) && (today > sp->sp_expire)) {
 	if (flags & VERBOSE) {
-	    syslog(LOG_DEBUG, "DEBUG: auth_shadow: account expired: %dl > %dl",
+	    syslog(LOG_DEBUG, "DEBUG: auth_shadow: account expired: %ld > %ld",
 		   today, sp->sp_expire);
 	}
 	RETURN("NO Account expired");
@@ -286,7 +291,7 @@ auth_shadow (
 	RETURN("NO Invalid username");
     }
   
-    if (strcmp(upw->upw_passwd, crypt(password, upw->upw_passwd)) != 0) {
+    if (!(cpw = crypt(password, upw->upw_passwd)) || (strcmp(upw->upw_passwd, (const char *)cpw) != 0)) {
 	if (flags & VERBOSE) {
 	    syslog(LOG_DEBUG, "auth_shadow: pw mismatch: %s != %s",
 		   password, upw->upw_passwd);
diff --git a/saslauthd/cache.c b/saslauthd/cache.c
index 2b78464..543e176 100644
--- a/saslauthd/cache.c
+++ b/saslauthd/cache.c
@@ -37,7 +37,7 @@
 /****************************************
  * includes
  *****************************************/
-#include "saslauthd.h"
+#include <config.h>
 
 #include <sys/stat.h>
 #include <sys/types.h>
diff --git a/saslauthd/cache.h b/saslauthd/cache.h
index 6a5707e..b8c8838 100644
--- a/saslauthd/cache.h
+++ b/saslauthd/cache.h
@@ -41,7 +41,7 @@
 
 
 /* constant includes */
-#include "saslauthd.h"
+#include <config.h>
 
 
 /****************************************************************
diff --git a/saslauthd/cfile.c b/saslauthd/cfile.c
index 5c87d02..386b07a 100644
--- a/saslauthd/cfile.c
+++ b/saslauthd/cfile.c
@@ -76,7 +76,6 @@ cfile cfile_read(const char *filename, char *complaint, int complaint_len)
     int alloced = 0;
     char buf[BIG_ENOUGH];
     char *p, *key;
-    int result;
     struct cfile *cf;
 
 	if (complaint)
diff --git a/saslauthd/config/config.guess b/saslauthd/config/config.guess
deleted file mode 100755
index f7dd69e..0000000
--- a/saslauthd/config/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
-
-timestamp='2011-08-20'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches at gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep -q __ELF__
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-		os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	exitcode=$?
-	trap '' 0
-	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-	echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
-	SUN_ARCH="i386"
-	# If there is a compiler, see if it is configured for 64-bit objects.
-	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		grep IS_64BIT_ARCH >/dev/null
-	    then
-		SUN_ARCH="x86_64"
-	    fi
-	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
-	exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
-	exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
-	exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-	# DG/UX returns AViiON for all architectures
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
-	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[4567])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-			esac ;;
-		    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
-
-		#define _HPUX_SOURCE
-		#include <stdlib.h>
-		#include <unistd.h>
-
-		int main ()
-		{
-		#if defined(_SC_KERNEL_BITS)
-		    long bits = sysconf(_SC_KERNEL_BITS);
-		#endif
-		    long cpu  = sysconf (_SC_CPU_VERSION);
-
-		    switch (cpu)
-			{
-			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-			case CPU_PA_RISC2_0:
-		#if defined(_SC_KERNEL_BITS)
-			    switch (bits)
-				{
-				case 64: puts ("hppa2.0w"); break;
-				case 32: puts ("hppa2.0n"); break;
-				default: puts ("hppa2.0"); break;
-				} break;
-		#else  /* !defined(_SC_KERNEL_BITS) */
-			    puts ("hppa2.0"); break;
-		#endif
-			default: puts ("hppa1.0"); break;
-			}
-		    exit (0);
-		}
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep -q __LP64__
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-	exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-	exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-	exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-	exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case ${UNAME_PROCESSOR} in
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-	# uname -m includes "-pc" on this system.
-	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:*)
-	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    8664:Windows_NT:*)
-	echo x86_64-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-	esac
-	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    arm*:Linux:*:*)
-	eval $set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
-	else
-	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-		| grep -q __ARM_PCS_VFP
-	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
-	    fi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-	echo frv-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	LIBC=gnu
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:* | mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef ${UNAME_MACHINE}
-	#undef ${UNAME_MACHINE}el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=${UNAME_MACHINE}el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=${UNAME_MACHINE}
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-	# Unixware is an offshoot of SVR4, but it has its own version
-	# number series starting with 2...
-	# I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-	# Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-	# uname -m prints for DJGPP always 'pc', but it prints nothing about
-	# the processor, so we play safe by assuming i586.
-	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configury will decide that
-	# this is a cross-build.
-	echo i586-pc-msdosdjgpp
-	exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-	OS_REL='.3'
-	test -r /etc/.relid \
-	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-			# says <Richard.M.Bartel at ccMail.Census.GOV>
-	echo i586-unisys-sysv4
-	exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv${UNAME_RELEASE}
-	else
-		echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-	exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-    i*86:AROS:*:*)
-	echo ${UNAME_MACHINE}-pc-aros
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-	"4"
-#else
-	""
-#endif
-	); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/saslauthd/config/config.sub b/saslauthd/config/config.sub
deleted file mode 100755
index da19a88..0000000
--- a/saslauthd/config/config.sub
+++ /dev/null
@@ -1,1764 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
-
-timestamp='2011-08-23'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray | -microblaze)
-		os=
-		basic_machine=$1
-		;;
-	-bluegene*)
-		os=-cnk
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
-	-chorusrdb)
-		os=-chorusrdb
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-        | be32 | be64 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| le32 | le64 \
-	| lm32 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64octeon | mips64octeonel \
-	| mips64orion | mips64orionel \
-	| mips64r5900 | mips64r5900el \
-	| mips64vr | mips64vrel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| moxie \
-	| mt \
-	| msp430 \
-	| nds32 | nds32le | nds32be \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| open8 \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle \
-	| pyramid \
-	| rx \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu \
-	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-	| ubicom32 \
-	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| we32k \
-	| x86 | xc16x | xstormy16 | xtensa \
-	| z8k | z80)
-		basic_machine=$basic_machine-unknown
-		;;
-	c54x)
-		basic_machine=tic54x-unknown
-		;;
-	c55x)
-		basic_machine=tic55x-unknown
-		;;
-	c6x)
-		basic_machine=tic6x-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	strongarm | thumb | xscale)
-		basic_machine=arm-unknown
-		;;
-
-	xscaleeb)
-		basic_machine=armeb-unknown
-		;;
-
-	xscaleel)
-		basic_machine=armel-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| be32-* | be64-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| le32-* | le64-* \
-	| lm32-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64octeon-* | mips64octeonel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64r5900-* | mips64r5900el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nds32-* | nds32le-* | nds32be-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| open8-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
-	| tahoe-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile*-* \
-	| tron-* \
-	| ubicom32-* \
-	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-	| vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* \
-	| xstormy16-* | xtensa*-* \
-	| ymp-* \
-	| z8k-* | z80-*)
-		;;
-	# Recognize the basic CPU types without company name, with glob match.
-	xtensa*)
-		basic_machine=$basic_machine-unknown
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aros)
-		basic_machine=i386-pc
-		os=-aros
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	blackfin)
-		basic_machine=bfin-unknown
-		os=-linux
-		;;
-	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	bluegene*)
-		basic_machine=powerpc-ibm
-		os=-cnk
-		;;
-	c54x-*)
-		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c55x-*)
-		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c6x-*)
-		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	cegcc)
-		basic_machine=arm-unknown
-		os=-cegcc
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16 | cr16-*)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dicos)
-		basic_machine=i686-pc
-		os=-dicos
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m68knommu)
-		basic_machine=m68k-unknown
-		os=-linux
-		;;
-	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	microblaze)
-		basic_machine=microblaze-xilinx
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	nacl)
-		basic_machine=le32-unknown
-		os=-nacl
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	neo-tandem)
-		basic_machine=neo-tandem
-		;;
-	nse-tandem)
-		basic_machine=nse-tandem
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	parisc)
-		basic_machine=hppa-unknown
-		os=-linux
-		;;
-	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc | ppcbe)	basic_machine=powerpc-unknown
-		;;
-	ppc-* | ppcbe-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	strongarm-* | thumb-*)
-		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tile*)
-		basic_machine=$basic_machine-unknown
-		os=-linux-gnu
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	xscale-* | xscalee[bl]-*)
-		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	z80-*-coff)
-		basic_machine=z80-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-	# First match some system type aliases
-	# that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-auroraux)
-		os=-auroraux
-		;;
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-	      | -sym* | -kopensolaris* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-	-os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-dicos*)
-		os=-dicos
-		;;
-	-nacl*)
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	score-*)
-		os=-elf
-		;;
-	spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-	c4x-* | tic4x-*)
-		os=-coff
-		;;
-	tic54x-*)
-		os=-coff
-		;;
-	tic55x-*)
-		os=-coff
-		;;
-	tic6x-*)
-		os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-cnk*|-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/saslauthd/config/depcomp b/saslauthd/config/depcomp
deleted file mode 100755
index 807b991..0000000
--- a/saslauthd/config/depcomp
+++ /dev/null
@@ -1,423 +0,0 @@
-#! /bin/sh
-
-# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
-
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  outname="$stripped.o"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      tmpdepfile1="$dir.libs/$base.lo.d"
-      tmpdepfile2="$dir.libs/$base.d"
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1="$dir$base.o.d"
-      tmpdepfile2="$dir$base.d"
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
-      exit $stat
-   fi
-
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.  We will use -o /dev/null later,
-  # however we can't do the remplacement now because
-  # `-o $object' might simply not be used
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    -*)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
-    *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
diff --git a/saslauthd/config/install-sh b/saslauthd/config/install-sh
deleted file mode 100755
index 36f96f3..0000000
--- a/saslauthd/config/install-sh
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd=$cpprog
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd=$stripprog
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "$0: no input file specified" >&2
-	exit 1
-else
-	:
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-
-	if [ -d "$dst" ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
-	else
-		echo "$0: $src does not exist" >&2
-		exit 1
-	fi
-
-	if [ x"$dst" = x ]
-	then
-		echo "$0: no destination specified" >&2
-		exit 1
-	else
-		:
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d "$dst" ]
-	then
-		dst=$dst/`basename "$src"`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp=$pathcomp$1
-	shift
-
-	if [ ! -d "$pathcomp" ] ;
-        then
-		$mkdirprog "$pathcomp"
-	else
-		:
-	fi
-
-	pathcomp=$pathcomp/
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd "$dst" &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		dstfile=`basename "$dst" $transformbasename |
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		:
-	fi
-
-# Make a couple of temp file names in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-	rmtmp=$dstdir/#rm.$$#
-
-# Trap to clean up temp files at exit.
-
-	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
-	trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# Now remove or move aside any old file at destination location.  We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons.  In this case, the final cleanup
-# might fail but the new file should still install successfully.
-
-{
-	if [ -f "$dstdir/$dstfile" ]
-	then
-		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
-		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
-		{
-		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		  (exit 1); exit
-		}
-	else
-		:
-	fi
-} &&
-
-# Now rename the file to the real destination.
-
-	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-
-fi &&
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-
-{
-	(exit 0); exit
-}
diff --git a/saslauthd/config/libtool.m4 b/saslauthd/config/libtool.m4
deleted file mode 100644
index f134d1d..0000000
--- a/saslauthd/config/libtool.m4
+++ /dev/null
@@ -1,430 +0,0 @@
-## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
-## Copyright (C) 1996-1999 Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# 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 \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# 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'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-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"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
-  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
-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 __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); 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"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
-  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
-  ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_SHARED], [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[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],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_STATIC], [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[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],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL], [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[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],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  ac_prog=`($CC -print-prog-name=ld) 2>&5`
-  case "$ac_prog" in
-    # Accept absolute paths.
-changequote(,)dnl
-    [\\/]* | [A-Za-z]:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
-      # 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
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[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])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# 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])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[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])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
-  # These system don't have libm
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, main, LIBM="-lm")
-  ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case "$enable_ltdl_convenience" in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
-  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, main,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
-    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    INCLTDL=
-  fi
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN([AM_ENABLE_SHARED], [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN([AM_ENABLE_STATIC], [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN([AM_DISABLE_SHARED], [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN([AM_DISABLE_STATIC], [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN([AM_PROG_LD], [indir([AC_PROG_LD])])dnl
-AC_DEFUN([AM_PROG_NM], [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
diff --git a/saslauthd/config/ltconfig b/saslauthd/config/ltconfig
deleted file mode 100755
index 888addc..0000000
--- a/saslauthd/config/ltconfig
+++ /dev/null
@@ -1,3150 +0,0 @@
-#! /bin/sh
-
-# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A lot of this script is taken from autoconf-2.10.
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-echo=echo
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec "$SHELL" "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# Find the correct PATH separator.  Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
-  UNAME=${UNAME-`uname 2>/dev/null`}
-  case X$UNAME in
-    *-DOS) PATH_SEPARATOR=';' ;;
-    *)     PATH_SEPARATOR=':' ;;
-  esac
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test "X${echo_test_string+set}" != Xset; then
-  # find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
-   test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-  for dir in $PATH /usr/ucb; do
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running ltconfig again with it.
-      ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
-    else
-      # Try using printf.
-      echo='printf "%s\n"'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
-	   test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-	CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL $0 --fallback-echo"
-      elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
-	   test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
-	echo="$CONFIG_SHELL $0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
-
-	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
-	    break
-	  fi
-	  prev="$cmd"
-	done
-
-	if test "$prev" != 'sed 50q "$0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# The name of this program.
-progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
-
-# Constants:
-PROGRAM=ltconfig
-PACKAGE=libtool
-VERSION=1.3.5
-TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-rm="rm -f"
-
-help="Try \`$progname --help' for more information."
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-enable_shared=yes
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-enable_static=yes
-enable_fast_install=yes
-enable_dlopen=unknown
-enable_win32_dll=no
-ltmain=
-silent=
-srcdir=
-ac_config_guess=
-ac_config_sub=
-host=
-nonopt=
-ofile="$default_ofile"
-verify_host=yes
-with_gcc=no
-with_gnu_ld=no
-need_locks=yes
-ac_ext=c
-objext=o
-libext=a
-exeext=
-cache_file=
-
-old_AR="$AR"
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-old_CPPFLAGS="$CPPFLAGS"
-old_LDFLAGS="$LDFLAGS"
-old_LD="$LD"
-old_LN_S="$LN_S"
-old_LIBS="$LIBS"
-old_NM="$NM"
-old_RANLIB="$RANLIB"
-old_DLLTOOL="$DLLTOOL"
-old_OBJDUMP="$OBJDUMP"
-old_AS="$AS"
-
-# Parse the command line options.
-args=
-prev=
-for option
-do
-  case "$option" in
-  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    eval "$prev=\$option"
-    prev=
-    continue
-  fi
-
-  case "$option" in
-  --help) cat <<EOM
-Usage: $progname [OPTION]... [HOST [LTMAIN]]
-
-Generate a system-specific libtool script.
-
-    --debug                enable verbose shell tracing
-    --disable-shared       do not build shared libraries
-    --disable-static       do not build static libraries
-    --disable-fast-install do not optimize for fast installation
-    --enable-dlopen        enable dlopen support
-    --enable-win32-dll     enable building dlls on win32 hosts
-    --help                 display this help and exit
-    --no-verify            do not verify that HOST is a valid host type
--o, --output=FILE          specify the output file [default=$default_ofile]
-    --quiet                same as \`--silent'
-    --silent               do not print informational messages
-    --srcdir=DIR           find \`config.guess' in DIR
-    --version              output version information and exit
-    --with-gcc             assume that the GNU C compiler will be used
-    --with-gnu-ld          assume that the C compiler uses the GNU linker
-    --disable-lock         disable file locking
-    --cache-file=FILE      configure cache file
-
-LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
-that provides basic libtool functionality.
-
-HOST is the canonical host system name [default=guessed].
-EOM
-  exit 0
-  ;;
-
-  --debug)
-    echo "$progname: enabling shell trace mode"
-    set -x
-    ;;
-
-  --disable-shared) enable_shared=no ;;
-
-  --disable-static) enable_static=no ;;
-
-  --disable-fast-install) enable_fast_install=no ;;
-
-  --enable-dlopen) enable_dlopen=yes ;;
-
-  --enable-win32-dll) enable_win32_dll=yes ;;
-
-  --quiet | --silent) silent=yes ;;
-
-  --srcdir) prev=srcdir ;;
-  --srcdir=*) srcdir="$optarg" ;;
-
-  --no-verify) verify_host=no ;;
-
-  --output | -o) prev=ofile ;;
-  --output=*) ofile="$optarg" ;;
-
-  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
-
-  --with-gcc) with_gcc=yes ;;
-  --with-gnu-ld) with_gnu_ld=yes ;;
-
-  --disable-lock) need_locks=no ;;
-
-  --cache-file=*) cache_file="$optarg" ;;
-
-  -*)
-    echo "$progname: unrecognized option \`$option'" 1>&2
-    echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    if test -z "$ltmain"; then
-      ltmain="$option"
-    elif test -z "$host"; then
-# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
-#      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
-#        echo "$progname: warning \`$option' is not a valid host type" 1>&2
-#      fi
-      host="$option"
-    else
-      echo "$progname: too many arguments" 1>&2
-      echo "$help" 1>&2
-      exit 1
-    fi ;;
-  esac
-done
-
-if test -z "$ltmain"; then
-  echo "$progname: you must specify a LTMAIN file" 1>&2
-  echo "$help" 1>&2
-  exit 1
-fi
-
-if test ! -f "$ltmain"; then
-  echo "$progname: \`$ltmain' does not exist" 1>&2
-  echo "$help" 1>&2
-  exit 1
-fi
-
-# Quote any args containing shell metacharacters.
-ltconfig_args=
-for arg
-do
-  case "$arg" in
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ltconfig_args="$ltconfig_args '$arg'" ;;
-  *) ltconfig_args="$ltconfig_args $arg" ;;
-  esac
-done
-
-# A relevant subset of AC_INIT.
-
-# 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
-# 5 compiler messages saved in config.log
-# 6 checking for... messages and results
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>>./config.log
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
-if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
-
-if test -n "$cache_file" && test -r "$cache_file"; then
-  echo "loading cache $cache_file within ltconfig"
-  . $cache_file
-fi
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  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
-
-if test -z "$srcdir"; then
-  # Assume the source directory is the same one as the path to LTMAIN.
-  srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
-  test "$srcdir" = "$ltmain" && srcdir=.
-fi
-
-trap "$rm conftest*; exit 1" 1 2 15
-if test "$verify_host" = yes; then
-  # Check for config.guess and config.sub.
-  ac_aux_dir=
-  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-    if test -f $ac_dir/config.guess; then
-      ac_aux_dir=$ac_dir
-      break
-    fi
-  done
-  if test -z "$ac_aux_dir"; then
-    echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
-    echo "$help" 1>&2
-    exit 1
-  fi
-  ac_config_guess=$ac_aux_dir/config.guess
-  ac_config_sub=$ac_aux_dir/config.sub
-
-  # Make sure we can run config.sub.
-  if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
-  else
-    echo "$progname: cannot run $ac_config_sub" 1>&2
-    echo "$help" 1>&2
-    exit 1
-  fi
-
-  echo $ac_n "checking host system type""... $ac_c" 1>&6
-
-  host_alias=$host
-  case "$host_alias" in
-  "")
-    if host_alias=`$SHELL $ac_config_guess`; then :
-    else
-      echo "$progname: cannot guess host type; you must specify one" 1>&2
-      echo "$help" 1>&2
-      exit 1
-    fi ;;
-  esac
-  host=`$SHELL $ac_config_sub $host_alias`
-  echo "$ac_t$host" 1>&6
-
-  # Make sure the host verified.
-  test -z "$host" && exit 1
-
-elif test -z "$host"; then
-  echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
-  echo "$help" 1>&2
-  exit 1
-else
-  host_alias=$host
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case "$host_os" in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-case "$host_os" in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR cru $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-# Set a sane default for `AR'.
-test -z "$AR" && AR=ar
-
-# Set a sane default for `OBJDUMP'.
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-# If RANLIB is not set, then run the test.
-if test "${RANLIB+set}" != "set"; then
-  result=no
-
-  echo $ac_n "checking for ranlib... $ac_c" 1>&6
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
-      RANLIB="ranlib"
-      result="ranlib"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  echo "$ac_t$result" 1>&6
-fi
-
-if test -n "$RANLIB"; then
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-fi
-
-# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$AS" && AS=as
-
-# Check to see if we are using GCC.
-if test "$with_gcc" != yes || test -z "$CC"; then
-  # If CC is not set, then try to find GCC or a usable CC.
-  if test -z "$CC"; then
-    echo $ac_n "checking for gcc... $ac_c" 1>&6
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
-	CC="gcc"
-	break
-      fi
-    done
-    IFS="$save_ifs"
-
-    if test -n "$CC"; then
-      echo "$ac_t$CC" 1>&6
-    else
-      echo "$ac_t"no 1>&6
-    fi
-  fi
-
-  # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
-  if test -z "$CC"; then
-    echo $ac_n "checking for cc... $ac_c" 1>&6
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-    cc_rejected=no
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
-	if test "$dir/cc" = "/usr/ucb/cc"; then
-	  cc_rejected=yes
-	  continue
-	fi
-	CC="cc"
-	break
-      fi
-    done
-    IFS="$save_ifs"
-    if test $cc_rejected = yes; then
-      # We found a bogon in the path, so make sure we never use it.
-      set dummy $CC
-      shift
-      if test $# -gt 0; then
-	# We chose a different compiler from the bogus one.
-	# However, it has the same name, so the bogon will be chosen
-	# first if we set CC to just the name; use the full file name.
-	shift
-	set dummy "$dir/cc" "$@"
-	shift
-	CC="$@"
-      fi
-    fi
-
-    if test -n "$CC"; then
-      echo "$ac_t$CC" 1>&6
-    else
-      echo "$ac_t"no 1>&6
-    fi
-
-    if test -z "$CC"; then
-      echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
-      exit 1
-    fi
-  fi
-
-  # Now see if the compiler is really GCC.
-  with_gcc=no
-  echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
-  echo "$progname:581: checking whether we are using GNU C" >&5
-
-  $rm conftest.c
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-    with_gcc=yes
-  fi
-  $rm conftest.c
-  echo "$ac_t$with_gcc" 1>&6
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
-
-echo $ac_n "checking for object suffix... $ac_c" 1>&6
-$rm conftest*
-echo 'int i = 1;' > conftest.c
-echo "$progname:603: checking for object suffix" >& 5
-if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
-  # Append any warnings to the config.log.
-  cat conftest.err 1>&5
-
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  cat conftest.err 1>&5
-  echo "$progname: failed program was:" >&5
-  cat conftest.c >&5
-fi
-$rm conftest*
-echo "$ac_t$objext" 1>&6
-
-echo $ac_n "checking for executable suffix... $ac_c" 1>&6
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_exeext="no"
-  $rm conftest*
-  echo 'main () { return 0; }' > conftest.c
-  echo "$progname:629: checking for executable suffix" >& 5
-  if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
-    # Append any warnings to the config.log.
-    cat conftest.err 1>&5
-
-    for ac_file in conftest.*; do
-      case $ac_file in
-      *.c | *.err | *.$objext ) ;;
-      *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
-      esac
-    done
-  else
-    cat conftest.err 1>&5
-    echo "$progname: failed program was:" >&5
-    cat conftest.c >&5
-  fi
-  $rm conftest*
-fi
-if test "X$ac_cv_exeext" = Xno; then
-  exeext=""
-else
-  exeext="$ac_cv_exeext"
-fi
-echo "$ac_t$ac_cv_exeext" 1>&6
-
-echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
-pic_flag=
-special_shlib_compile_flags=
-wl=
-link_static_flag=
-no_builtin_flag=
-
-if test "$with_gcc" = yes; then
-  wl='-Wl,'
-  link_static_flag='-static'
-
-  case "$host_os" in
-  beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
-    # PIC is the default for these OSes.
-    ;;
-  aix*)
-    # Below there is a dirty hack to force normal static linking with -ldl
-    # The problem is because libdl dynamically linked with both libc and
-    # libC (AIX C++ library), which obviously doesn't included in libraries
-    # list by gcc. This cause undefined symbols with -static flags.
-    # This hack allows C programs to be linked with "-static -ldl", but
-    # we not sure about C++ programs.
-    link_static_flag="$link_static_flag ${wl}-lC"
-    ;;
-  cygwin* | mingw* | os2*)
-    # We can build DLLs from non-PIC.
-    ;;
-  darwin* | rhapsody*)
-    # PIC is the default on this platform
-    # Common symbols not allowed in MH_DYLIB files
-    pic_flag='-fno-common'
-    ;;
-  amigaos*)
-    # FIXME: we need at least 68020 code to build shared libraries, but
-    # adding the `-m68020' flag to GCC prevents building anything better,
-    # like `-m68040'.
-    pic_flag='-m68020 -resident32 -malways-restore-a4'
-    ;;
-  sysv4*MP*)
-    if test -d /usr/nec; then
-       pic_flag=-Kconform_pic
-    fi
-    ;;
-  *)
-    pic_flag='-fPIC'
-    ;;
-  esac
-else
-  # PORTME Check for PIC flags for the system compiler.
-  case "$host_os" in
-  aix3* | aix4*)
-    # All AIX code is PIC.
-    link_static_flag='-bnso -bI:/lib/syscalls.exp'
-    ;;
-
-  hpux9* | hpux10* | hpux11*)
-    # Is there a better link_static_flag that works with the bundled CC?
-    wl='-Wl,'
-    link_static_flag="${wl}-a ${wl}archive"
-    pic_flag='+Z'
-    ;;
-
-  irix5* | irix6*)
-    wl='-Wl,'
-    link_static_flag='-non_shared'
-    # PIC (with -KPIC) is the default.
-    ;;
-
-  cygwin* | mingw* | os2*)
-    # We can build DLLs from non-PIC.
-    ;;
-
-  osf3* | osf4* | osf5*)
-    # All OSF/1 code is PIC.
-    wl='-Wl,'
-    link_static_flag='-non_shared'
-    ;;
-
-  sco3.2v5*)
-    pic_flag='-Kpic'
-    link_static_flag='-dn'
-    special_shlib_compile_flags='-belf'
-    ;;
-
-  solaris*)
-    pic_flag='-KPIC'
-    link_static_flag='-Bstatic'
-    wl='-Wl,'
-    ;;
-
-  sunos4*)
-    pic_flag='-PIC'
-    link_static_flag='-Bstatic'
-    wl='-Qoption ld '
-    ;;
-
-  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-    pic_flag='-KPIC'
-    link_static_flag='-Bstatic'
-    wl='-Wl,'
-    ;;
-
-  uts4*)
-    pic_flag='-pic'
-    link_static_flag='-Bstatic'
-    ;;
-  sysv4*MP*)
-    if test -d /usr/nec ;then
-      pic_flag='-Kconform_pic'
-      link_static_flag='-Bstatic'
-    fi
-    ;;
-  *)
-    can_build_shared=no
-    ;;
-  esac
-fi
-
-if test -n "$pic_flag"; then
-  echo "$ac_t$pic_flag" 1>&6
-
-  # Check to make sure the pic_flag actually works.
-  echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
-  $rm conftest*
-  echo "int some_variable = 0;" > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $pic_flag -DPIC"
-  echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5
-  if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
-    # Append any warnings to the config.log.
-    cat conftest.err 1>&5
-    
-    case "$host_os" in
-    hpux9* | hpux10* | hpux11*)
-      # On HP-UX, both CC and GCC only warn that PIC is supported... then they
-      # create non-PIC objects.  So, if there were any warnings, we assume that
-      # PIC is not supported.
-      if test -s conftest.err; then
-	echo "$ac_t"no 1>&6
-	can_build_shared=no
-	pic_flag=
-      else
-	echo "$ac_t"yes 1>&6
-	pic_flag=" $pic_flag"
-      fi
-      ;;
-    *)
-      echo "$ac_t"yes 1>&6
-      pic_flag=" $pic_flag"
-      ;;
-    esac
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    can_build_shared=no
-    pic_flag=
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-else
-  echo "$ac_t"none 1>&6
-fi
-
-# Check to see if options -o and -c are simultaneously supported by compiler
-echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-$rm conftest*
-echo "int some_variable = 0;" > conftest.c
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory.  Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.o"
-echo "$progname:834: checking if $compiler supports -c -o file.o" >&5
-if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
-
-  # The compiler can only warn and ignore the option if not recognized
-  # So say no if there are warnings
-    if test -s out/conftest.err; then
-      echo "$ac_t"no 1>&6
-      compiler_c_o=no
-    else
-      echo "$ac_t"yes 1>&6
-      compiler_c_o=yes
-    fi
-else
-  # Append any errors to the config.log.
-  cat out/conftest.err 1>&5
-  compiler_c_o=no
-  echo "$ac_t"no 1>&6
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-
-if test x"$compiler_c_o" = x"yes"; then
-  # Check to see if we can write to a .lo
-  echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
-  $rm conftest*
-  echo "int some_variable = 0;" > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -c -o conftest.lo"
-  echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5
-if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
-
-    # The compiler can only warn and ignore the option if not recognized
-    # So say no if there are warnings
-      if test -s conftest.err; then
-	echo "$ac_t"no 1>&6
-	compiler_o_lo=no
-      else
-	echo "$ac_t"yes 1>&6
-	compiler_o_lo=yes
-      fi
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    compiler_o_lo=no
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-else
-  compiler_o_lo=no
-fi
-
-# Check to see if we can do hard links to lock some files if needed
-hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$ac_t$hard_links" 1>&6
-  $rm conftest*
-  if test "$hard_links" = no; then
-    echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-if test "$with_gcc" = yes; then
-  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
-  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
-  $rm conftest*
-  echo "int some_variable = 0;" > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
-  echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-  if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
-
-    # The compiler can only warn and ignore the option if not recognized
-    # So say no if there are warnings
-      if test -s conftest.err; then
-	echo "$ac_t"no 1>&6
-	compiler_rtti_exceptions=no
-      else
-	echo "$ac_t"yes 1>&6
-	compiler_rtti_exceptions=yes
-      fi
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    compiler_rtti_exceptions=no
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-
-  if test "$compiler_rtti_exceptions" = "yes"; then
-    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
-  else
-    no_builtin_flag=' -fno-builtin'
-  fi
-  
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$special_shlib_compile_flags"; then
-  echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$special_shlib_compile_flags[ 	]" >/dev/null; then :
-  else
-    echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
-    can_build_shared=no
-  fi
-fi
-
-echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
-$rm conftest*
-echo 'main(){return(0);}' > conftest.c
-save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  echo "$ac_t$link_static_flag" 1>&6
-else
-  echo "$ac_t"none 1>&6
-  link_static_flag=
-fi
-LDFLAGS="$save_LDFLAGS"
-$rm conftest*
-
-if test -z "$LN_S"; then
-  # Check to see if we can use ln -s, or we need hard links.
-  echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
-  $rm conftest.dat
-  if ln -s X conftest.dat 2>/dev/null; then
-    $rm conftest.dat
-    LN_S="ln -s"
-  else
-    LN_S=ln
-  fi
-  if test "$LN_S" = "ln -s"; then
-    echo "$ac_t"yes 1>&6
-  else
-    echo "$ac_t"no 1>&6
-  fi
-fi
-
-# Make sure LD is an absolute path.
-if test -z "$LD"; then
-  ac_prog=ld
-  if test "$with_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 "$progname:996: 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 are not 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 "$progname:1020: checking for GNU ld" >&5
-  else
-    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-    echo "$progname:1023: checking for non-GNU ld" >&5
-  fi
-
-  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
-	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 "$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"
-  fi
-
-  if test -n "$LD"; then
-    echo "$ac_t$LD" 1>&6
-  else
-    echo "$ac_t"no 1>&6
-  fi
-
-  if test -z "$LD"; then
-    echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
-    exit 1
-  fi
-fi
-
-# Check to see if it really is or is not GNU ld.
-echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
-# 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
-  with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-echo "$ac_t$with_gnu_ld" 1>&6
-
-# See if the linker supports building shared libraries.
-echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# include_expsyms should be a list of space-separated symbols to be *always*
-# included in the symbol list
-include_expsyms=
-# exclude_expsyms can be an egrep regular expression of symbols to exclude
-# it will be wrapped by ` (' and `)$', so one must not match beginning or
-# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-# as well as any symbol that contains `d'.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-# platforms (ab)use it in PIC code, but their linkers get confused if
-# the symbol is explicitly referenced.  Since portable code cannot
-# rely on this symbol name, it's probably fine to never include it in
-# preloaded symbol tables.
-
-case "$host_os" in
-cygwin* | mingw*)
-  # FIXME: the MSVC++ port hasn't been tested in a loooong time
-  # When not using gcc, we currently assume that we are using
-  # Microsoft Visual C++.
-  if test "$with_gcc" != yes; then
-    with_gnu_ld=no
-  fi
-  ;;
-
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
-  # If archive_cmds runs LD, not CC, wlarc should be empty
-  wlarc='${wl}'
-
-  # See if GNU ld supports shared libraries.
-  case "$host_os" in
-  aix3* | aix4*)
-    # On AIX, the GNU linker is very broken
-    ld_shlibs=no
-    cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-    ;;
-
-  amigaos*)
-    archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-
-    # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-    # that the semantics of dynamic libraries on AmigaOS, at least up
-    # to version 4, is to share data among multiple programs linked
-    # with the same dynamic library.  Since this doesn't match the
-    # behavior of shared libraries on other platforms, we can use
-    # them.
-    ld_shlibs=no
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      allow_undefined_flag=unsupported
-      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-
-  cygwin* | mingw*)
-    # hardcode_libdir_flag_spec is actually meaningless, as there is
-    # no search path for DLLs.
-    hardcode_libdir_flag_spec='-L$libdir'
-    allow_undefined_flag=unsupported
-    always_export_symbols=yes
-
-    # Extract the symbol export list from an `--export-all' def file,
-    # then regenerate the def file from the symbol export list, so that
-    # the compiled dll only exports the symbol export list.
-    # Be careful not to strip the DATA tag left by newer dlltools.
-    export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
-      test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
-      $DLLTOOL --export-all --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
-      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
-
-    # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
-      _lt_hint=1;
-      cat $export_symbols | while read symbol; do
-        set dummy \$symbol;
-        case \$# in
-          2) echo "	\$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
-          *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
-        esac;
-	_lt_hint=`expr 1 + \$_lt_hint`;
-      done~
-      test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
-      test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
-      $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
-      $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
-      $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
-
-      old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' 
-    ;;
-
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
-      # can we support soname and/or expsyms with a.out? -oliva
-    fi
-    ;;
-
-  solaris* | sysv5*)
-    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-      ld_shlibs=no
-      cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;      
-
-  sunos4*)
-    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    wlarc=
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-  esac
-
-  if test "$ld_shlibs" = yes; then
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    case $host_os in
-    cygwin* | mingw*)
-      # dlltool doesn't understand --whole-archive et. al.
-      whole_archive_flag_spec=
-      ;;
-    *)
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-        whole_archive_flag_spec=
-      fi
-      ;;
-    esac
-  fi
-else
-  # PORTME fill in a description of your system's linker (not GNU ld)
-  case "$host_os" in
-  aix3*)
-    allow_undefined_flag=unsupported
-    always_export_symbols=yes
-    archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
-    # Note: this linker hardcodes the directories in LIBPATH if there
-    # are no directories specified by -L.
-    hardcode_minus_L=yes
-    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
-      # Neither direct hardcoding nor static linking is supported with a
-      # broken collect2.
-      hardcode_direct=unsupported
-    fi
-    ;;
-
-  aix4*)
-    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
-    hardcode_libdir_separator=':'
-    if test "$with_gcc" = yes; then
-      collect2name=`${CC} -print-prog-name=collect2`
-      if test -f "$collect2name" && \
-	 strings "$collect2name" | grep resolve_lib_name >/dev/null
-      then
-	# We have reworked collect2
-	hardcode_direct=yes
-      else
-	# We have old collect2
-	hardcode_direct=unsupported
-	# It fails to find uninstalled libraries when the uninstalled
-	# path is not listed in the libpath.  Setting hardcode_minus_L
-	# to unsupported forces relinking
-	hardcode_minus_L=yes
-	hardcode_libdir_flag_spec='-L$libdir'
-	hardcode_libdir_separator=
-      fi
-      shared_flag='-shared'
-    else
-      shared_flag='${wl}-bM:SRE'
-      hardcode_direct=yes
-    fi
-    allow_undefined_flag=' ${wl}-berok'
-    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
-    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
-    case "$host_os" in aix4.[01]|aix4.[01].*)
-      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
-      always_export_symbols=yes ;;
-    esac
-   ;;
-
-  amigaos*)
-    archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    # see comment about different semantics on the GNU ld section
-    ld_shlibs=no
-    ;;
-
-  cygwin* | mingw*)
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    # hardcode_libdir_flag_spec is actually meaningless, as there is
-    # no search path for DLLs.
-    hardcode_libdir_flag_spec=' '
-    allow_undefined_flag=unsupported
-    # Tell ltmain to make .lib files, not .a files.
-    libext=lib
-    # FIXME: Setting linknames here is a bad hack.
-    archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-    # The linker will automatically build a .lib file if we build a DLL.
-    old_archive_from_new_cmds='true'
-    # FIXME: Should let the user specify the lib program.
-    old_archive_cmds='lib /OUT:$oldlib$oldobjs'
-    fix_srcfile_path='`cygpath -w $srcfile`'
-    ;;
-
-  freebsd1*)
-    ld_shlibs=no
-    ;;
-
-  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-  # support.  Future versions do this automatically, but an explicit c++rt0.o
-  # does not break anything, and helps significantly (at the cost of a little
-  # extra space).
-  freebsd2.2*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-  freebsd2*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-  freebsd*)
-    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  darwin[15].* | rhapsody*)
-    allow_undefined_flag='-undefined error'
-    archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname) $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
-    # We need to add '_' to the symbols in $export_symbols first
-    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    whole_archive_flag_spec='-all_load $convenience'
-    ;;
-
-  # Mac OS X v10.2 uses bash for /bin/sh instead of zsh, and the quoting syntax is incompatible
-  darwin*)
-    allow_undefined_flag='-undefined error'
-    archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname $tmp_verstring)'
-    # We need to add '_' to the symbols in $export_symbols first
-    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    whole_archive_flag_spec='-all_load $convenience'
-    ;;
-
-  hpux9* | hpux10* | hpux11*)
-    case "$host_os" in
-    hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
-    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
-    esac
-    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator=:
-    hardcode_direct=yes
-    hardcode_minus_L=yes # Not in the search PATH, but as the default
-			 # location of the library.
-    export_dynamic_flag_spec='${wl}-E'
-    ;;
-
-  irix5* | irix6*)
-    if test "$with_gcc" = yes; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-    else
-      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'  # a.out
-    else
-      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts'      # ELF
-    fi
-    hardcode_libdir_flag_spec='${wl}-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  os2*)
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    allow_undefined_flag=unsupported
-    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
-    old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
-    ;;
-
-  osf3*)
-    if test "$with_gcc" = yes; then
-      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-    else
-      allow_undefined_flag=' -expect_unresolved \*'
-      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-
-  osf4* | osf5*)  # As osf3* with the addition of the -msym flag
-    if test "$with_gcc" = yes; then
-      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-    else
-      allow_undefined_flag=' -expect_unresolved \*'
-      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-                                       
-  sco3.2v5*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_shlibpath_var=no
-    runpath_var=LD_RUN_PATH
-    hardcode_runpath_var=yes
-    ;;
-
-  solaris*)
-    no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_shlibpath_var=no
-    case "$host_os" in
-    solaris2.[0-5] | solaris2.[0-5].*) ;;
-    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-    esac
-    ;;
-
-  sunos4*)
-    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4)
-    if test "x$host_vendor" = xsequent; then
-      # Use $CC to link under sequent, because it throws in some extra .o 
-      # files that make .init and .fini sections work.
-      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
-    else
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    fi
-    runpath_var='LD_RUN_PATH'
-    hardcode_shlibpath_var=no
-    hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
-    ;;  
-
-  sysv4.3*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_shlibpath_var=no
-    export_dynamic_flag_spec='-Bexport'
-    ;;
-
-  sysv5*)
-    no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
-    hardcode_libdir_flag_spec=
-    hardcode_shlibpath_var=no
-    runpath_var='LD_RUN_PATH'
-    ;;
-
-  uts4*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_shlibpath_var=no
-    ;;
-
-  dgux*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4*MP*)
-    if test -d /usr/nec; then
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-      hardcode_shlibpath_var=no
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
-      ld_shlibs=yes
-    fi
-    ;;
-
-  sysv4.2uw2*)
-    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
-    hardcode_direct=yes
-    hardcode_minus_L=no
-    hardcode_shlibpath_var=no
-    hardcode_runpath_var=yes
-    runpath_var=LD_RUN_PATH
-    ;;
-
-  unixware7*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
-    runpath_var='LD_RUN_PATH'
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    ld_shlibs=no
-    ;;
-  esac
-fi
-echo "$ac_t$ld_shlibs" 1>&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-if test -z "$NM"; then
-  echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
-  case "$NM" in
-  [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
-  *)
-    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-    for ac_dir in $PATH /usr/ucb /usr/ccs/bin /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
-	  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
-	  NM="$ac_dir/nm -p"
-	  break
-	else
-	  NM=${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 "$NM" && NM=nm
-    ;;
-  esac
-  echo "$ac_t$NM" 1>&6
-fi
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
-  ;;
-irix*)
-  symcode='[BCDEGRST]'
-  ;;
-solaris*)
-  symcode='[BDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[ABCDGISTW]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Write the raw and C identifiers.
-  global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode\)[ 	][ 	]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-  $rm conftest*
-  cat > conftest.c <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  echo "$progname:1662: checking if global_symbol_pipe works" >&5
-  if { (eval echo $progname:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { echo "$progname:1666: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
-
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-	  # Now generate the symbol file.
-	  eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
-
-	  cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
-	  sed 's/^. \(.*\) \(.*\)$/  {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
-	  cat <<\EOF >> conftest.c
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$objext conftstm.$objext
-	  save_LIBS="$LIBS"
-	  save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$objext"
-	  CFLAGS="$CFLAGS$no_builtin_flag"
-	  if { (eval echo $progname:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-	    pipe_works=yes
-	  else
-	    echo "$progname: failed program was:" >&5
-	    cat conftest.c >&5
-	  fi
-	  LIBS="$save_LIBS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&5
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $global_symbol_pipe" >&5
-    fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.c >&5
-  fi
-  $rm conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    global_symbol_pipe=
-  fi
-done
-if test "$pipe_works" = yes; then
-  echo "${ac_t}ok" 1>&6
-else
-  echo "${ac_t}failed" 1>&6
-fi
-
-if test -z "$global_symbol_pipe"; then
-  global_symbol_to_cdecl=
-fi
-
-# Check hardcoding attributes.
-echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var"; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$hardcode_shlibpath_var" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-echo "$ac_t$hardcode_action" 1>&6
-
-
-reload_flag=
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
-# PORTME Some linkers may need a different reload flag.
-reload_flag='-r'
-echo "$ac_t$reload_flag" 1>&6
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-# PORTME Fill in your ld.so characteristics
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-file_magic_cmd=
-file_magic_test_file=
-deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
-case "$host_os" in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
-  ;;
-
-aix4*)
-  version_type=linux
-  # AIX has no versioning support, so currently we can not hardcode correct
-  # soname into executable. Probably we can add versioning support to
-  # collect2, so additional links can be useful in future.
-  # We preserve .a as extension for shared libraries though AIX4.2
-  # and later linker supports .so
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
-  shlibpath_var=LIBPATH
-  deplibs_check_method=pass_all
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}.so'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  deplibs_check_method=pass_all
-  lt_cv_dlopen="load_add_on"
-  lt_cv_dlopen_libs=
-  lt_cv_dlopen_self=yes
-  ;;
-
-bsdi4*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=/shlib/libc.so
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  export_dynamic_flag_spec=-rdynamic
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw*)
-  version_type=windows
-  need_version=no
-  need_lib_prefix=no
-  if test "$with_gcc" = yes; then
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
-  else
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
-  fi
-  dynamic_linker='Win32 ld.exe'
-  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  file_magic_cmd='${OBJDUMP} -f'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  lt_cv_dlopen="LoadLibrary"
-  lt_cv_dlopen_libs=
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-  
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case "$version_type" in
-    freebsd-elf*)
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
-      file_magic_cmd=/usr/bin/file
-      file_magic_test_file=`echo /usr/lib/libc.so*`
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      deplibs_check_method=unknown
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case "$host_os" in
-  freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  *) # from 3.2 on
-    shlibpath_overrides_runpath=no
-    ;;
-  esac
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  deplibs_check_method='file_magic Mach-O (64-bit )?dynamically linked shared library'
-  file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[012])
-    file_magic_test_file='/System/Library/Frameworks/System.framework/System'
-    ;;
-  *) # Darwin 1.3 on
-    file_magic_test_file='/usr/lib/libSystem.dylib'
-    ;;
-  esac
-  library_names_spec='${libname}${release}${versuffix}.$(test x$module = xyes && echo so || echo dylib) ${libname}${release}${major}.$(test x$module = xyes && echo so || echo dylib) ${libname}.$(test x$module = xyes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test x$module = xyes && echo so || echo dylib)'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  dynamic_linker="$host_os dld.sl"
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  shlibpath_var=SHLIB_PATH
-  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-  soname_spec='${libname}${release}.sl$major'
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  case "$host_os" in
-  hpux10.20*)
-    # TODO:  Does this work for hpux-11 too?
-    deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    file_magic_cmd=/usr/bin/file
-    file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-irix5* | irix6*)
-  version_type=irix
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so.$major'
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
-  case "$host_os" in
-  irix5*)
-    libsuff= shlibsuff=
-    # this will be overridden with pass_all, but let us keep it just in case
-    deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
-    ;;
-  *)
-    case "$LD" in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  deplibs_check_method='pass_all'
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  deplibs_check_method=pass_all
-
-  if test -f /lib/ld.so.1; then
-    dynamic_linker='GNU ld.so'
-  else
-    # Only the GNU ld.so supports shared libraries on MkLinux.
-    case "$host_cpu" in
-    powerpc*) dynamic_linker=no ;;
-    *) dynamic_linker='Linux ld.so' ;;
-    esac
-  fi
-  ;;
-
-netbsd*)
-  version_type=sunos
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-openbsd*)
-  version_type=sunos
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-    need_version=no
-  fi
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-os2*)
-  libname_spec='$name'
-  need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  # this will be overridden with pass_all, but let us keep it just in case
-  deplibs_check_method='file_magic COFF format alpha shared library'
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=/shlib/libc.so
-  deplibs_check_method='pass_all'
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=/lib/libc.so
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case "$host_vendor" in
-    sequent)
-      file_magic_cmd='/bin/file'
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-      ;;
-    ncr)
-      deplibs_check_method='pass_all'
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-      file_magic_cmd=/usr/bin/file
-      file_magic_test_file=`echo /usr/lib/libc.so*`
-      ;;
-  esac
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$ac_t$dynamic_linker" 1>&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-# Report the final consequences.
-echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
-
-# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
-# configure.in, otherwise build static only libraries.
-case "$host_os" in
-cygwin* | mingw* | os2*)
-  if test x$can_build_shared = xyes; then
-    test x$enable_win32_dll = xno && can_build_shared=no
-    echo "checking if package supports dlls... $can_build_shared" 1>&6
-  fi
-;;
-esac
-
-if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
-  case "$deplibs_check_method" in
-  "file_magic "*)
-    file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-    if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-       egrep "$file_magic_regex" > /dev/null; then
-      :
-    else
-      cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-    fi ;;
-  esac
-fi
-
-echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4*)
-  test "$enable_shared" = yes && enable_static=no
-  ;;
-esac
-
-echo "$ac_t$enable_shared" 1>&6
-
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-
-# Propagate what we've learned...
-ac_cv_can_build_shared="$can_build_shared"
-
-echo "checking whether to build static libraries... $enable_static" 1>&6
-
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-echo $ac_n "checking for objdir... $ac_c" 1>&6
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-echo "$ac_t$objdir" 1>&6
-
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
-  lt_cv_dlopen=no lt_cv_dlopen_libs=
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "$progname:2270: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2278 "ltconfig"
-/* 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo $progname:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "$progname:2310: checking for dlopen" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2315 "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen(); 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-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_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-dlopen();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_dlopen=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_dlopen=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="dlopen"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "$progname:2357: checking for dld_link in -ldld" >&5
-ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2365 "ltconfig"
-/* 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link();
-
-int main() {
-dld_link()
-; return 0; }
-EOF
-if { (eval echo $progname:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "$progname:2397: checking for shl_load" >&5
-if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2402 "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load(); 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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load();
-
-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_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-shl_load();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_shl_load=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_shl_load=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="shl_load"
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "$progname:2445: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2453 "ltconfig"
-#include "confdefs.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.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo $progname:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-fi
-
-    
-fi
-
-  
-fi
-
-
-fi
-
-fi
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  fi
-
-  case "$lt_cv_dlopen" in
-  dlopen)
-for ac_hdr in dlfcn.h; do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "$progname:2510: 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 2515 "ltconfig"
-#include <$ac_hdr>
-int fnord = 0;
-EOF
-ac_try="$ac_compile >/dev/null 2>conftest.out"
-{ (eval echo $progname:2520: \"$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 "$progname: 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
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-    if test "x$ac_cv_header_dlfcn_h" = xyes; then
-      CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-    fi
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-  echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:2548: checking whether a program can dlopen itself" >&5
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    lt_cv_dlopen_self=cross
-  else
-    cat > conftest.c <<EOF
-#line 2556 "ltconfig"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL	RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-#  define LTDL_GLOBAL	DL_GLOBAL
-# else
-#  define LTDL_GLOBAL	0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-#  define LTDL_LAZY_OR_NOW	RTLD_LAZY
-# else
-#  ifdef DL_LAZY
-#   define LTDL_LAZY_OR_NOW	DL_LAZY
-#  else
-#   ifdef RTLD_NOW
-#    define LTDL_LAZY_OR_NOW	RTLD_NOW
-#   else
-#    ifdef DL_NOW
-#     define LTDL_LAZY_OR_NOW	DL_NOW
-#    else
-#     define LTDL_LAZY_OR_NOW	0
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
-    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
-	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
-
-EOF
-if { (eval echo $progname:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  lt_cv_dlopen_self=yes
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  lt_cv_dlopen_self=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self" 1>&6
-
-  if test "$lt_cv_dlopen_self" = yes; then
-    LDFLAGS="$LDFLAGS $link_static_flag"
-  echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:2621: checking whether a statically linked program can dlopen itself" >&5
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    lt_cv_dlopen_self_static=cross
-  else
-    cat > conftest.c <<EOF
-#line 2629 "ltconfig"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL	RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-#  define LTDL_GLOBAL	DL_GLOBAL
-# else
-#  define LTDL_GLOBAL	0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-#  define LTDL_LAZY_OR_NOW	RTLD_LAZY
-# else
-#  ifdef DL_LAZY
-#   define LTDL_LAZY_OR_NOW	DL_LAZY
-#  else
-#   ifdef RTLD_NOW
-#    define LTDL_LAZY_OR_NOW	RTLD_NOW
-#   else
-#    ifdef DL_NOW
-#     define LTDL_LAZY_OR_NOW	DL_NOW
-#    else
-#     define LTDL_LAZY_OR_NOW	0
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
-    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
-    if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
-
-EOF
-if { (eval echo $progname:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  lt_cv_dlopen_self_static=yes
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  lt_cv_dlopen_self_static=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
-fi
-    ;;
-  esac
-
-  case "$lt_cv_dlopen_self" in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case "$lt_cv_dlopen_self_static" in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-
-# Copy echo and quote the copy, instead of the original, because it is
-# used later.
-ltecho="$echo"
-if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   ltecho="$CONFIG_SHELL \$0 --fallback-echo"
-fi
-LTSHELL="$SHELL"
-
-LTCONFIG_VERSION="$VERSION"
-
-# Only quote variables if we're using ltmain.sh.
-case "$ltmain" in
-*.sh)
-  # Now quote all the things that may contain metacharacters.
-  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
-    old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
-    AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
-    reload_flag reload_cmds wl \
-    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
-    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
-    library_names_spec soname_spec \
-    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
-    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
-    file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
-    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
-    hardcode_libdir_flag_spec hardcode_libdir_separator  \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
-
-    case "$var" in
-    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case "$ltecho" in
-  *'\$0 --fallback-echo"')
-    ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-  trap "$rm \"$ofile\"; exit 1" 1 2 15
-  echo "creating $ofile"
-  $rm "$ofile"
-  cat <<EOF > "$ofile"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
-#
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-### BEGIN LIBTOOL CONFIG
-EOF
-  cfgfile="$ofile"
-  ;;
-
-*)
-  # Double-quote the variables that need it (for aesthetics).
-  for var in old_CC old_CFLAGS old_CPPFLAGS \
-    old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
-    eval "$var=\\\"\$var\\\""
-  done
-
-  # Just create a config file.
-  cfgfile="$ofile.cfg"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  echo "creating $cfgfile"
-  $rm "$cfgfile"
-  cat <<EOF > "$cfgfile"
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-EOF
-  ;;
-esac
-
-cat <<EOF >> "$cfgfile"
-# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
-# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
-# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
-# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
-#   $0$ltconfig_args
-#
-# Compiler and other test output produced by $progname, useful for
-# debugging $progname, is in ./config.log if it exists.
-
-# The version of $progname that generated this script.
-LTCONFIG_VERSION=$LTCONFIG_VERSION
-
-# Shell to use when invoking shell scripts.
-SHELL=$LTSHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$ltecho
-
-# The archiver.
-AR=$AR
-
-# The default C compiler.
-CC=$CC
-
-# The linker used to build libraries.
-LD=$LD
-
-# Whether we need hard or soft links.
-LN_S=$LN_S
-
-# A BSD-compatible nm program.
-NM=$NM
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$reload_flag
-reload_cmds=$reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$wl
-
-# Object file suffix (normally "o").
-objext="$objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$pic_flag
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$compiler_c_o
-
-# Can we write directly to a .lo ?
-compiler_o_lo=$compiler_o_lo
-
-# Must we lock files when doing compilation ?
-need_locks=$need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$link_static_flag
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$RANLIB
-old_archive_cmds=$old_archive_cmds
-old_postinstall_cmds=$old_postinstall_cmds
-old_postuninstall_cmds=$old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$old_archive_from_new_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$archive_cmds
-archive_expsym_cmds=$archive_expsym_cmds
-postinstall_cmds=$postinstall_cmds
-postuninstall_cmds=$postuninstall_cmds
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$global_symbol_to_cdecl
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$include_expsyms
-
-EOF
-
-case "$ltmain" in
-*.sh)
-  echo '### END LIBTOOL CONFIG' >> "$ofile"
-  echo >> "$ofile"
-  case "$host_os" in
-  aix3*)
-    cat <<\EOF >> "$ofile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # Append the ltmain.sh script.
-  sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-
-  chmod +x "$ofile"
-  ;;
-
-*)
-  # Compile the libtool program.
-  echo "FIXME: would compile $ltmain"
-  ;;
-esac
-
-test -n "$cache_file" || exit 0
-
-# AC_CACHE_SAVE
-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
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/saslauthd/config/ltmain.sh b/saslauthd/config/ltmain.sh
deleted file mode 100644
index 3e72886..0000000
--- a/saslauthd/config/ltmain.sh
+++ /dev/null
@@ -1,4053 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun ltconfig.
-#
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.3.5
-TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo '' | od -x` in
-*15*) # EBCDIC based system
-  SP2NL='tr \100 \025'
-  NL2SP='tr \025 \100'
-  ;;
-*) # Assume ASCII based system
-  SP2NL='tr \040 \012'
-  NL2SP='tr \015\012 \040\040'
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-if test "$LTCONFIG_VERSION" != "$VERSION"; then
-  echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  echo "$modename: not configured to build any kind of library" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-# Parse our command line options once, thoroughly.
-while test $# -gt 0
-do
-  arg="$1"
-  shift
-
-  case "$arg" in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case "$prev" in
-    execute_dlfiles)
-      eval "$prev=\"\$$prev \$arg\""
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case "$arg" in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    exit 0
-    ;;
-
-  --config)
-    sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
-    exit 0
-    ;;
-
-  --debug)
-    echo "$progname: enabling shell trace mode"
-    set -x
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
-    else
-      echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
-    else
-      echo "disable static libraries"
-    fi
-    exit 0
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --quiet | --silent)
-    show=:
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    case "$nonopt" in
-    *cc | *++ | gcc* | *-gcc*)
-      mode=link
-      for arg
-      do
-	case "$arg" in
-	-c)
-	   mode=compile
-	   break
-	   ;;
-	esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-	if test -n "$nonopt"; then
-	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-	else
-	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-	fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case "$mode" in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    lastarg=
-    srcfile="$nonopt"
-    suppress_output=
-
-    user_target=no
-    for arg
-    do
-      # Accept any command-line options.
-      case "$arg" in
-      -o)
-	if test "$user_target" != "no"; then
-	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	  exit 1
-	fi
-	user_target=next
-	;;
-
-      -static)
-	build_old_libs=yes
-	continue
-	;;
-      esac
-
-      case "$user_target" in
-      next)
-	# The next one is the -o target name
-	user_target=yes
-	continue
-	;;
-      yes)
-	# We got the output file
-	user_target=set
-	libobj="$arg"
-	continue
-	;;
-      esac
-
-      # Accept the current argument as the source file.
-      lastarg="$srcfile"
-      srcfile="$arg"
-
-      # Aesthetically quote the previous argument.
-
-      # Backslashify any backslashes, double quotes, and dollar signs.
-      # These are the only characters that are still specially
-      # interpreted inside of double-quoted scrings.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly in scan
-      # sets, so we specify it separately.
-      case "$lastarg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      # Add the previous argument to base_compile.
-      if test -z "$base_compile"; then
-	base_compile="$lastarg"
-      else
-	base_compile="$base_compile $lastarg"
-      fi
-    done
-
-    case "$user_target" in
-    set)
-      ;;
-    no)
-      # Get the name of the library object.
-      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    *)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSfmso]'
-    case "$libobj" in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case "$libobj" in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $libobj"
-    else
-      removelist="$libobj"
-    fi
-
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit 1" 1 2 15
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit 1" 1 2 15
-    else
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until ln "$0" "$lockfile" 2>/dev/null; do
-	$show "Waiting for $lockfile to be removed"
-	sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-	echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-      echo $srcfile > "$lockfile"
-    fi
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      # All platforms use -DPIC, to notify preprocessed assembler code.
-      command="$base_compile $srcfile $pic_flag -DPIC"
-      if test "$build_old_libs" = yes; then
-	lo_libobj="$libobj"
-	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
-	if test "X$dir" = "X$libobj"; then
-	  dir="$objdir"
-	else
-	  dir="$dir/$objdir"
-	fi
-	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
-
-	if test -d "$dir"; then
-	  $show "$rm $libobj"
-	  $run $rm $libobj
-	else
-	  $show "$mkdir $dir"
-	  $run $mkdir $dir
-	  status=$?
-	  if test $status -ne 0 && test ! -d $dir; then
-	    exit $status
-	  fi
-	fi
-      fi
-      if test "$compiler_o_lo" = yes; then
-	output_obj="$libobj"
-	command="$command -o $output_obj"
-      elif test "$compiler_c_o" = yes; then
-	output_obj="$obj"
-	command="$command -o $output_obj"
-      fi
-
-      $run $rm "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	test -n "$output_obj" && $run $rm $removelist
-	exit 1
-      fi
-
-      if test "$need_locks" = warn &&
-	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
-	echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test x"$output_obj" != x"$libobj"; then
-	$show "$mv $output_obj $libobj"
-	if $run $mv $output_obj $libobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # If we have no pic_flag, then copy the object into place and finish.
-      if test -z "$pic_flag" && test "$build_old_libs" = yes; then
-	# Rename the .lo from within objdir to obj
-	if test -f $obj; then
-	  $show $rm $obj
-	  $run $rm $obj
-	fi
-
-	$show "$mv $libobj $obj"
-	if $run $mv $libobj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-
-	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-	if test "X$xdir" = "X$obj"; then
-	  xdir="."
-	else
-	  xdir="$xdir"
-	fi
-	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
-	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
-	# Now arrange that obj and lo_libobj become the same file
-	$show "(cd $xdir && $LN_S $baseobj $libobj)"
-	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
-	  exit 0
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Allow error messages only from the first compilation.
-      suppress_output=' >/dev/null 2>&1'
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      command="$base_compile $srcfile"
-      if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
-	output_obj="$obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	$run $rm $removelist
-	exit 1
-      fi
-
-      if test "$need_locks" = warn &&
-	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
-	echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-
-      # Just move the object if needed
-      if test x"$output_obj" != x"$obj"; then
-	$show "$mv $output_obj $obj"
-	if $run $mv $output_obj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Create an invalid libtool object if no PIC, so that we do not
-      # accidentally link it into a program.
-      if test "$build_libtool_libs" != yes; then
-	$show "echo timestamp > $libobj"
-	$run eval "echo timestamp > \$libobj" || exit $?
-      else
-	# Move the .lo from within objdir
-	$show "$mv $libobj $lo_libobj"
-	if $run $mv $libobj $lo_libobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-    fi
-
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $rm "$lockfile"
-    fi
-
-    exit 0
-    ;;
-
-  # libtool link mode
-  link)
-    modename="$modename: link"
-    case "$host" in
-    *-*-cygwin* | *-*-mingw* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invokation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-
-      # This is a source program that is used to create dlls on Windows
-      # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-      # This is a source program that is used to create import libraries
-      # on Windows for dlls which lack them. Don't remove nor modify the
-      # starting and closing comments
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999 Free Software Foundation, Inc.
-# 
-#  This file is part of GNU libtool.
-# 
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-# 
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-# 
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#  */
-# 
-#  #include <stdio.h>		/* for printf() */
-#  #include <unistd.h>		/* for open(), lseek(), read() */
-#  #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-#  #include <string.h>		/* for strdup() */
-# 
-#  static unsigned int
-#  pe_get16 (fd, offset)
-#       int fd;
-#       int offset;
-#  {
-#    unsigned char b[2];
-#    lseek (fd, offset, SEEK_SET);
-#    read (fd, b, 2);
-#    return b[0] + (b[1]<<8);
-#  }
-# 
-#  static unsigned int
-#  pe_get32 (fd, offset)
-#      int fd;
-#      int offset;
-#  {
-#    unsigned char b[4];
-#    lseek (fd, offset, SEEK_SET);
-#    read (fd, b, 4);
-#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-#  }
-# 
-#  static unsigned int
-#  pe_as32 (ptr)
-#       void *ptr;
-#  {
-#    unsigned char *b = ptr;
-#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-#  }
-# 
-#  int
-#  main (argc, argv)
-#      int argc;
-#      char *argv[];
-#  {
-#      int dll;
-#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#      unsigned long export_rva, export_size, nsections, secptr, expptr;
-#      unsigned long name_rvas, nexp;
-#      unsigned char *expdata, *erva;
-#      char *filename, *dll_name;
-# 
-#      filename = argv[1];
-# 
-#      dll = open(filename, O_RDONLY|O_BINARY);
-#      if (!dll)
-#  	return 1;
-# 
-#      dll_name = filename;
-#    
-#      for (i=0; filename[i]; i++)
-#  	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-#  	    dll_name = filename + i +1;
-# 
-#      pe_header_offset = pe_get32 (dll, 0x3c);
-#      opthdr_ofs = pe_header_offset + 4 + 20;
-#      num_entries = pe_get32 (dll, opthdr_ofs + 92);
-# 
-#      if (num_entries < 1) /* no exports */
-#  	return 1;
-# 
-#      export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#      export_size = pe_get32 (dll, opthdr_ofs + 100);
-#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#      secptr = (pe_header_offset + 4 + 20 +
-#  	      pe_get16 (dll, pe_header_offset + 4 + 16));
-# 
-#      expptr = 0;
-#      for (i = 0; i < nsections; i++)
-#      {
-#  	char sname[8];
-#  	unsigned long secptr1 = secptr + 40 * i;
-#  	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-#  	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-#  	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-#  	lseek(dll, secptr1, SEEK_SET);
-#  	read(dll, sname, 8);
-#  	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-#  	{
-#  	    expptr = fptr + (export_rva - vaddr);
-#  	    if (export_rva + export_size > vaddr + vsize)
-#  		export_size = vsize - (export_rva - vaddr);
-#  	    break;
-#  	}
-#      }
-# 
-#      expdata = (unsigned char*)malloc(export_size);
-#      lseek (dll, expptr, SEEK_SET);
-#      read (dll, expdata, export_size);
-#      erva = expdata - export_rva;
-# 
-#      nexp = pe_as32 (expdata+24);
-#      name_rvas = pe_as32 (expdata+32);
-# 
-#      printf ("EXPORTS\n");
-#      for (i = 0; i<nexp; i++)
-#      {
-#  	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-#  	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#      }
-# 
-#      return 0;
-#  }
-# /* impgen.c ends here */
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    linkopts=
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      lib_search_path=
-    fi
-    # now prepend the system-specific ones
-    eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-    
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    link_against_libtool_libs=
-    ltlibs=
-    module=no
-    objs=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case "$arg" in
-      -all-static | -static)
-	if test "X$arg" = "X-all-static"; then
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-	  fi
-	  if test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	else
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	fi
-	build_libtool_libs=no
-	build_old_libs=yes
-	prefer_static_libs=yes
-	break
-	;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test $# -gt 0; do
-      arg="$1"
-      shift
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-	case "$prev" in
-	output)
-	  compile_command="$compile_command @OUTPUT@"
-	  finalize_command="$finalize_command @OUTPUT@"
-	  ;;
-	esac
-
-	case "$prev" in
-	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
-	    # Add the symbol object into the linking commands.
-	    compile_command="$compile_command @SYMFILE@"
-	    finalize_command="$finalize_command @SYMFILE@"
-	    preload=yes
-	  fi
-	  case "$arg" in
-	  *.la | *.lo) ;;  # We handle these cases below.
-	  force)
-	    if test "$dlself" = no; then
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  self)
-	    if test "$prev" = dlprefiles; then
-	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-	      dlself=yes
-	    else
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  *)
-	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
-	    else
-	      dlprefiles="$dlprefiles $arg"
-	    fi
-	    prev=
-	    ;;
-	  esac
-	  ;;
-	expsyms)
-	  export_symbols="$arg"
-	  if test ! -f "$arg"; then
-	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit 1
-	  fi
-	  prev=
-	  continue
-	  ;;
-	expsyms_regex)
-	  export_symbols_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-	rpath | xrpath)
-	  # We need an absolute path.
-	  case "$arg" in
-	  [\\/]* | [A-Za-z]:[\\/]*) ;;
-	  *)
-	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit 1
-	    ;;
-	  esac
-	  if test "$prev" = rpath; then
-	    case "$rpath " in
-	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
-	    esac
-	  else
-	    case "$xrpath " in
-	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
-	    esac
-	  fi
-	  prev=
-	  continue
-	  ;;
-	*)
-	  eval "$prev=\"\$arg\""
-	  prev=
-	  continue
-	  ;;
-	esac
-      fi
-
-      prevarg="$arg"
-
-      case "$arg" in
-      -all-static)
-	if test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
-
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
-
-      -avoid-version)
-	avoid_version=yes
-	continue
-	;;
-
-      -dlopen)
-	prev=dlfiles
-	continue
-	;;
-
-      -dlpreopen)
-	prev=dlprefiles
-	continue
-	;;
-
-      -export-dynamic)
-	export_dynamic=yes
-	continue
-	;;
-
-      -export-symbols | -export-symbols-regex)
-	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	  $echo "$modename: not more than one -exported-symbols argument allowed"
-	  exit 1
-	fi
-	if test "X$arg" = "X-export-symbols"; then
-	  prev=expsyms
-	else
-	  prev=expsyms_regex
-	fi
-	continue
-	;;
-
-      -L*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-	# We need an absolute path.
-	case "$dir" in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  absdir=`cd "$dir" && pwd`
-	  if test -z "$absdir"; then
-	    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	    absdir="$dir"
-	  fi
-	  dir="$absdir"
-	  ;;
-	esac
-	case " $deplibs " in
-	*" $arg "*) ;;
-	*) deplibs="$deplibs $arg";;
-	esac
-	case " $lib_search_path " in
-	*" $dir "*) ;;
-	*) lib_search_path="$lib_search_path $dir";;
-	esac
-	case "$host" in
-	*-*-cygwin* | *-*-mingw* | *-*-os2*)
-	  dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
-	  case ":$dllsearchpath:" in
-	  ::) dllsearchpath="$dllsearchdir";;
-	  *":$dllsearchdir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
-	  esac
-	  ;;
-	esac
-	;;
-
-      -l*)
-	if test "$arg" = "-lc"; then
-	  case "$host" in
-	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
-	    # These systems don't actually have c library (as such)
-	    continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	    ;;
-	  esac
-	elif test "$arg" = "-lm"; then
-	  case "$host" in
-	  *-*-cygwin* | *-*-beos*)
-	    # These systems don't actually have math library (as such)
-	    continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody math library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	    ;;
-	  esac
-	fi
-	deplibs="$deplibs $arg"
-	;;
-
-      -module)
-	module=yes
-	continue
-	;;
-
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
-
-      -o) prev=output ;;
-
-      -release)
-	prev=release
-	continue
-	;;
-
-      -rpath)
-	prev=rpath
-	continue
-	;;
-
-      -R)
-	prev=xrpath
-	continue
-	;;
-
-      -R*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-	# We need an absolute path.
-	case "$dir" in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit 1
-	  ;;
-	esac
-	case "$xrpath " in
-	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
-	esac
-	continue
-	;;
-
-      -static)
-	# If we have no pic_flag, then this is the same as -all-static.
-	if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
-
-      -thread-safe)
-	thread_safe=yes
-	continue
-	;;
-
-      -version-info)
-	prev=vinfo
-	continue
-	;;
-
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-
-      *.o | *.obj | *.a | *.lib)
-	# A standard object.
-	objs="$objs $arg"
-	;;
-
-      *.lo)
-	# A library object.
-	if test "$prev" = dlfiles; then
-	  dlfiles="$dlfiles $arg"
-	  if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
-	    prev=
-	    continue
-	  else
-	    # If libtool objects are unsupported, then we need to preload.
-	    prev=dlprefiles
-	  fi
-	fi
-
-	if test "$prev" = dlprefiles; then
-	  # Preload the old-style object.
-	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
-	  prev=
-	fi
-	libobjs="$libobjs $arg"
-	;;
-
-      *.la)
-	# A libtool-controlled library.
-
-	dlname=
-	libdir=
-	library_names=
-	old_library=
-
-	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
-	  exit 1
-	fi
-
-	# If the library was installed with an old release of libtool,
-	# it will not redefine variable installed.
-	installed=yes
-
-	# Read the .la file
-	# If there is no directory component, then add one.
-	case "$arg" in
-	*/* | *\\*) . $arg ;;
-	*) . ./$arg ;;
-	esac
-
-	# Get the name of the library we link against.
-	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
-
-	if test -z "$linklib"; then
-	  $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
-	  exit 1
-	fi
-
-	# Find the relevant object directory and library name.
-	name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
-
-	if test "X$installed" = Xyes; then
-	  dir="$libdir"
-	else
-	  dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$dir" = "X$arg"; then
-	    dir="$objdir"
-	  else
-	    dir="$dir/$objdir"
-	  fi
-	fi
-
-	if test -n "$dependency_libs"; then
-	  # Extract -R and -L from dependency_libs
-	  temp_deplibs=
-	  for deplib in $dependency_libs; do
-	    case "$deplib" in
-	    -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-		 case " $rpath $xrpath " in
-		 *" $temp_xrpath "*) ;;
-		 *) xrpath="$xrpath $temp_xrpath";;
-		 esac;;
-	    -L*) case "$compile_command $temp_deplibs " in
-		 *" $deplib "*) ;;
-		 *) temp_deplibs="$temp_deplibs $deplib";;
-		 esac
-		 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-		 case " $lib_search_path " in
-		 *" $temp_dir "*) ;;
-		 *) lib_search_path="$lib_search_path $temp_dir";;
-		 esac
-		 ;;
-	    *) temp_deplibs="$temp_deplibs $deplib";;
-	    esac
-	  done
-	  dependency_libs="$temp_deplibs"
-	fi
-
-	if test -z "$libdir"; then
-	  # It is a libtool convenience library, so add in its objects.
-	  convenience="$convenience $dir/$old_library"
-	  old_convenience="$old_convenience $dir/$old_library"
-	  deplibs="$deplibs$dependency_libs"
-	  compile_command="$compile_command $dir/$old_library$dependency_libs"
-	  finalize_command="$finalize_command $dir/$old_library$dependency_libs"
-	  continue
-	fi
-
-	# This library was specified with -dlopen.
-	if test "$prev" = dlfiles; then
-	  dlfiles="$dlfiles $arg"
-	  if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
-	    # If there is no dlname, no dlopen support or we're linking statically,
-	    # we need to preload.
-	    prev=dlprefiles
-	  else
-	    # We should not create a dependency on this library, but we
-	    # may need any libraries it requires.
-	    compile_command="$compile_command$dependency_libs"
-	    finalize_command="$finalize_command$dependency_libs"
-	    prev=
-	    continue
-	  fi
-	fi
-
-	# The library was specified with -dlpreopen.
-	if test "$prev" = dlprefiles; then
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    dlprefiles="$dlprefiles $dir/$old_library"
-	  else
-	    dlprefiles="$dlprefiles $dir/$linklib"
-	  fi
-	  prev=
-	fi
-
-	if test -n "$library_names" &&
-	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-	  link_against_libtool_libs="$link_against_libtool_libs $arg"
-	  if test -n "$shlibpath_var"; then
-	    # Make sure the rpath contains only unique directories.
-	    case "$temp_rpath " in
-	    *" $dir "*) ;;
-	    *) temp_rpath="$temp_rpath $dir" ;;
-	    esac
-	  fi
-
-	  # We need an absolute path.
-	  case "$dir" in
-	  [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-	  *)
-	    absdir=`cd "$dir" && pwd`
-	    if test -z "$absdir"; then
-	      $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-	      $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	      absdir="$dir"
-	    fi
-	    ;;
-	  esac
-	  
-	  # This is the magic to use -rpath.
-	  # Skip directories that are in the system default run-time
-	  # search path, unless they have been requested with -R.
-	  case " $sys_lib_dlsearch_path " in
-	  *" $absdir "*) ;;
-	  *)
-	    case "$compile_rpath " in
-	    *" $absdir "*) ;;
-	    *) compile_rpath="$compile_rpath $absdir" 
-	    esac
-	    ;;
-	  esac
-
-	  case " $sys_lib_dlsearch_path " in
-	  *" $libdir "*) ;;
-	  *)
-	    case "$finalize_rpath " in
-	    *" $libdir "*) ;;
-	    *) finalize_rpath="$finalize_rpath $libdir"
-	    esac
-	    ;;
-	  esac
-
-	  lib_linked=yes
-	  case "$hardcode_action" in
-	  immediate | unsupported)
-	    if test "$hardcode_direct" = no; then
-	      compile_command="$compile_command $dir/$linklib"
-	      deplibs="$deplibs $dir/$linklib"
-	      case "$host" in
-	      *-*-cygwin* | *-*-mingw* | *-*-os2*)
-		dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
-		if test -n "$dllsearchpath"; then
-		  dllsearchpath="$dllsearchpath:$dllsearchdir"
-		else
-		  dllsearchpath="$dllsearchdir"
-		fi
-		;;
-	      esac
-	    elif test "$hardcode_minus_L" = no; then
-	      case "$host" in
-	      *-*-sunos*)
-		compile_shlibpath="$compile_shlibpath$dir:"
-		;;
-	      esac
-	      case "$compile_command " in
-	      *" -L$dir "*) ;;
-	      *) compile_command="$compile_command -L$dir";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -L$dir -l$name"
-	    elif test "$hardcode_shlibpath_var" = no; then
-	      case ":$compile_shlibpath:" in
-	      *":$dir:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$dir:";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -l$name"
-	    else
-	      lib_linked=no
-	    fi
-	    ;;
-
-	  relink)
-	    if test "$hardcode_direct" = yes; then
-	      compile_command="$compile_command $absdir/$linklib"
-	      deplibs="$deplibs $absdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      case "$compile_command " in
-	      *" -L$absdir "*) ;;
-	      *) compile_command="$compile_command -L$absdir";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -L$absdir -l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
-	      case ":$compile_shlibpath:" in
-	      *":$absdir:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$absdir:";;
-	      esac
-	      compile_command="$compile_command -l$name"
-	      deplibs="$deplibs -l$name"
-	    else
-	      lib_linked=no
-	    fi
-	    ;;
-
-	  *)
-	    lib_linked=no
-	    ;;
-	  esac
-
-	  if test "$lib_linked" != yes; then
-	    $echo "$modename: configuration error: unsupported hardcode properties"
-	    exit 1
-	  fi
-
-	  # Finalize command for both is simple: just hardcode it.
-	  if test "$hardcode_direct" = yes; then
-	    finalize_command="$finalize_command $libdir/$linklib"
-	  elif test "$hardcode_minus_L" = yes; then
-	    case "$finalize_command " in
-	    *" -L$libdir "*) ;;
-	    *) finalize_command="$finalize_command -L$libdir";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  elif test "$hardcode_shlibpath_var" = yes; then
-	    case ":$finalize_shlibpath:" in
-	    *":$libdir:"*) ;;
-	    *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  else
-	    # We cannot seem to hardcode it, guess we'll fake it.
-	    case "$finalize_command " in
-	    *" -L$dir "*) ;;
-	    *) finalize_command="$finalize_command -L$libdir";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  fi
-	else
-	  # Transform directly to old archives if we don't build new libraries.
-	  if test -n "$pic_flag" && test -z "$old_library"; then
-	    $echo "$modename: cannot find static library for \`$arg'" 1>&2
-	    exit 1
-	  fi
-
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_command="$compile_command $dir/$linklib"
-	    finalize_command="$finalize_command $dir/$linklib"
-	  else
-	    case "$compile_command " in
-	    *" -L$dir "*) ;;
-	    *) compile_command="$compile_command -L$dir";;
-	    esac
-	    compile_command="$compile_command -l$name"
-	    case "$finalize_command " in
-	    *" -L$dir "*) ;;
-	    *) finalize_command="$finalize_command -L$dir";;
-	    esac
-	    finalize_command="$finalize_command -l$name"
-	  fi
-	fi
-
-	# Add in any libraries that this one depends upon.
-	compile_command="$compile_command$dependency_libs"
-	finalize_command="$finalize_command$dependency_libs"
-	continue
-	;;
-
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-      esac
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
-
-    case "$output" in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-      ;;
-
-    *.a | *.lib)
-      if test -n "$link_against_libtool_libs"; then
-	$echo "$modename: error: cannot link libtool libraries into archives" 1>&2
-	exit 1
-      fi
-
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      ;;
-
-    *.la)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case "$outputname" in
-      lib*)
-	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-	eval libname=\"$libname_spec\"
-	;;
-      *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-	if test "$need_lib_prefix" != no; then
-	  # Add the "lib" prefix for modules if required
-	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	  eval libname=\"$libname_spec\"
-	else
-	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	fi
-	;;
-      esac
-
-      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$output_objdir" = "X$output"; then
-	output_objdir="$objdir"
-      else
-	output_objdir="$output_objdir/$objdir"
-      fi
-
-      if test -n "$objs"; then
-	$echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
-	exit 1
-      fi
-
-      # How the heck are we supposed to write a wrapper for a shared library?
-      if test -n "$link_against_libtool_libs"; then
-	 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
-	 exit 1
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
-      fi
-
-      set dummy $rpath
-      if test $# -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      oldlibs=
-      if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
-	  # Building a libtool convenience library.
-	  libext=al
-	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
-	  build_libtool_libs=convenience
-	  build_old_libs=yes
-	fi
-	dependency_libs="$deplibs"
-
-	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
-	fi
-
-	if test -n "$release"; then
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-	fi
-      else
-
-	# Parse the version information argument.
-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'
-	set dummy $vinfo 0 0 0
-	IFS="$save_ifs"
-
-	if test -n "$8"; then
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	current="$2"
-	revision="$3"
-	age="$4"
-
-	# Check that each of the things are valid numbers.
-	case "$current" in
-	0 | [1-9] | [1-9][0-9]*) ;;
-	*)
-	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	case "$revision" in
-	0 | [1-9] | [1-9][0-9]*) ;;
-	*)
-	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	case "$age" in
-	0 | [1-9] | [1-9][0-9]*) ;;
-	*)
-	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	if test $age -gt $current; then
-	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	fi
-
-	# Calculate the version variables.
-	major=
-	versuffix=
-	verstring=
-	case "$version_type" in
-	none) ;;
-
-	irix)
-	  major=`expr $current - $age + 1`
-	  versuffix="$major.$revision"
-	  verstring="sgi$major.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$revision
-	  while test $loop != 0; do
-	    iface=`expr $revision - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="sgi$major.$iface:$verstring"
-	  done
-	  ;;
-
-	linux)
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  ;;
-
-	osf)
-	  major=`expr $current - $age`
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$age
-	  while test $loop != 0; do
-	    iface=`expr $current - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring:${iface}.0"
-	  done
-
-	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
-	  ;;
-
-	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
-	  ;;
-
-	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
-	  ;;
-
-	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current";
-	  ;;
-
-	windows)
-	  # Like Linux, but with '-' rather than '.', since we only
-	  # want one extension on Windows 95.
-	  major=`expr $current - $age`
-	  versuffix="-$major-$age-$revision"
-	  ;;
-
-	darwin)
-	  # Like Linux, but with the current version available in
-	  # verstring for coding it into the library header
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  # Darwin ld doesn't like 0 for these options...
-	  minor_current=`expr $current + 1`
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
-	  ;;
-
-	*)
-	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	# Clear the version info if we defaulted, and they specified a release.
-	if test -z "$vinfo" && test -n "$release"; then
-	  major=
-	  verstring="0.0"
-	  if test "$need_version" = no; then
-	    versuffix=
-	  else
-	    versuffix=".0.0"
-	  fi
-	fi
-
-	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
-	  major=
-	  versuffix=
-	  verstring=""
-	fi
-	
-	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-	    build_libtool_libs=no
-	    build_old_libs=yes
-	  fi
-	else
-	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
-	fi
-
-	dependency_libs="$deplibs"
-	case "$host" in
-	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
-	  # these systems don't actually have a c library (as such)!
-	  ;;
-        *-*-rhapsody* | *-*-darwin1.[012])
-	  # Rhapsody C library is in the System framework
-	  deplibs="$deplibs -framework System"
-	  ;;
-	*)
-	  # Add libc to deplibs on all other systems.
-	  deplibs="$deplibs -lc"
-	  ;;
-	esac
-      fi
-
-      # Create the output directory, or remove our outputs if we need to.
-      if test -d $output_objdir; then
-	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
-	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
-      else
-	$show "$mkdir $output_objdir"
-	$run $mkdir $output_objdir
-	status=$?
-	if test $status -ne 0 && test ! -d $output_objdir; then
-	  exit $status
-	fi
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      if test "$build_libtool_libs" = yes; then
-	# Transform deplibs into only deplibs that can be linked in shared.
-	name_save=$name
-	libname_save=$libname
-	release_save=$release
-	versuffix_save=$versuffix
-	major_save=$major
-	# I'm not sure if I'm treating the release correctly.  I think
-	# release should show up in the -l (ie -lgmp5) so we don't want to
-	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
-	newdeplibs=
-	droppeddeps=no
-	case "$deplibs_check_method" in
-	pass_all)
-	  # Don't check for shared/static.  Everything works.
-	  # This might be a little naive.  We might want to check
-	  # whether the library exists or not.  But this is on
-	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behaviour.
-	  newdeplibs=$deplibs
-	  ;;
-	test_compile)
-	  # This code stresses the "libraries are programs" paradigm to its
-	  # limits. Maybe even breaks it.  We compile a program, linking it
-	  # against the deplibs as a proxy for the library.  Then we can check
-	  # whether they linked in statically or dynamically with ldd.
-	  $rm conftest.c
-	  cat > conftest.c <<EOF
-	  int main() { return 0; }
-EOF
-	  $rm conftest
-	  $CC -o conftest conftest.c $deplibs
-	  if test $? -eq 0 ; then
-	    ldd_output=`ldd conftest`
-	    for i in $deplibs; do
-	      name="`expr X$i : 'X-l\(.*\)'`"
-	      # If $name is empty we are operating on a -L argument.
-	      if test "$name" != "" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		set dummy $deplib_matches
-		deplib_match=$2
-		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		  newdeplibs="$newdeplibs $i"
-		else
-		  droppeddeps=yes
-		  echo
-		  echo "*** Warning: This library needs some functionality provided by $i."
-		  echo "*** I have the capability to make that library automatically link in when"
-		  echo "*** you link to this library.  But I can only do this if you have a"
-		  echo "*** shared version of the library, which you do not appear to have."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  else
-	    # Error occured in the first compile.  Let's try to salvage the situation:
-	    # Compile a seperate program for each library.
-	    for i in $deplibs; do
-	      name="`expr X$i : 'X-l\(.*\)'`"
-	     # If $name is empty we are operating on a -L argument.
-	      if test "$name" != "" ; then
-		$rm conftest
-		$CC -o conftest conftest.c $i
-		# Did it work?
-		if test $? -eq 0 ; then
-		  ldd_output=`ldd conftest`
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    echo
-		    echo "*** Warning: This library needs some functionality provided by $i."
-		    echo "*** I have the capability to make that library automatically link in when"
-		    echo "*** you link to this library.  But I can only do this if you have a"
-		    echo "*** shared version of the library, which you do not appear to have."
-		  fi
-		else
-		  droppeddeps=yes
-		  echo
-		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  echo "***  make it link in!  You will probably need to install it or some"
-		  echo "*** library that it depends on before this library will be fully"
-		  echo "*** functional.  Installing it before continuing would be even better."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  fi
-	  ;;
-	file_magic*)
-	  set dummy $deplibs_check_method
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
-	  for a_deplib in $deplibs; do
-	    name="`expr X$a_deplib : 'X-l\(.*\)'`"
-	    # If $name is empty we are operating on a -L argument.
-	    if test "$name" != "" ; then
-	      libname=`eval \\$echo \"$libname_spec\"`
-	      for i in $lib_search_path; do
-		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		    for potent_lib in $potential_libs; do
-		      # Follow soft links.
-		      if ls -lLd "$potent_lib" 2>/dev/null \
-			 | grep " -> " >/dev/null; then
-			continue 
-		      fi
-		      # The statement above tries to avoid entering an
-		      # endless loop below, in case of cyclic links.
-		      # We might still enter an endless loop, since a link
-		      # loop can be closed while we follow links,
-		      # but so what?
-		      potlib="$potent_lib"
-		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
-			case "$potliblink" in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-			esac
-		      done
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-			 | sed 10q \
-			 | egrep "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
-			a_deplib=""
-			break 2
-		      fi
-		    done
-	      done
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		echo
-		echo "*** Warning: This library needs some functionality provided by $a_deplib."
-		echo "*** I have the capability to make that library automatically link in when"
-		echo "*** you link to this library.  But I can only do this if you have a"
-		echo "*** shared version of the library, which you do not appear to have."
-	      fi
-	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
-	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	none | unknown | *)
-	  newdeplibs=""
-	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
-	     grep . >/dev/null; then
-	    echo
-	    if test "X$deplibs_check_method" = "Xnone"; then
-	      echo "*** Warning: inter-library dependencies are not supported in this platform."
-	    else
-	      echo "*** Warning: inter-library dependencies are not known to be supported."
-	    fi
-	    echo "*** All declared inter-library dependencies are being dropped."
-	    droppeddeps=yes
-	  fi
-	  ;;
-	esac
-	versuffix=$versuffix_save
-	major=$major_save
-	release=$release_save
-	libname=$libname_save
-	name=$name_save
-
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
-	    echo
-	    echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    echo "*** a static module, that should work as long as the dlopening"
-	    echo "*** application is linked with the -dlopen flag."
-	    if test -z "$global_symbol_pipe"; then
-	      echo
-	      echo "*** However, this would only work if libtool was able to extract symbol"
-	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      echo "*** not find such a program.  So, this module is probably useless."
-	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
-	      build_libtool_libs=module
-	      build_old_libs=yes
-	    else
-	      build_libtool_libs=no
-	    fi
-	  else
-	    echo "*** The inter-library dependencies that have been dropped here will be"
-	    echo "*** automatically added whenever a program is linked with this library"
-	    echo "*** or is declared to -dlopen it."
-	  fi
-	fi
-	# Done checking deplibs!
-	deplibs=$newdeplibs
-      fi
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-      
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	# Get the real and link names of the library.
-	eval library_names=\"$library_names_spec\"
-	set dummy $library_names
-	realname="$2"
-	shift; shift
-
-	if test -n "$soname_spec"; then
-	  eval soname=\"$soname_spec\"
-	else
-	  soname="$realname"
-	fi
-
-	lib="$output_objdir/$realname"
-	for link
-	do
-	  linknames="$linknames $link"
-	done
-
-	# Ensure that we have .o objects for linkers which dislike .lo
-	# (e.g. aix) in case we are running --disable-static
-	for obj in $libobjs; do
-	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$xdir" = "X$obj"; then
-	    xdir="."
-	  else
-	    xdir="$xdir"
-	  fi
-	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
-	  if test ! -f $xdir/$oldobj; then
-	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
-	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
-	  fi
-	done
-
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
-	# Prepare the list of exported symbols
-	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    eval cmds=\"$export_symbols_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd" || exit $?
-	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex"; then
-	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
-	    fi
-	  fi
-	fi
-
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-	fi
-
-	if test -n "$convenience"; then
-	  if test -n "$whole_archive_flag_spec"; then
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  else
-	    gentop="$output_objdir/${outputname}x"
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "mkdir $gentop"
-	    $run mkdir "$gentop"
-	    status=$?
-	    if test $status -ne 0 && test ! -d "$gentop"; then
-	      exit $status
-	    fi
-	    generated="$generated $gentop"
-
-	    for xlib in $convenience; do
-	      # Extract the objects.
-	      case "$xlib" in
-	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	      *) xabs=`pwd`"/$xlib" ;;
-	      esac
-	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	      xdir="$gentop/$xlib"
-
-	      $show "${rm}r $xdir"
-	      $run ${rm}r "$xdir"
-	      $show "mkdir $xdir"
-	      $run mkdir "$xdir"
-	      status=$?
-	      if test $status -ne 0 && test ! -d "$xdir"; then
-		exit $status
-	      fi
-	      $show "(cd $xdir && $AR x $xabs)"
-	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
-	    done
-	  fi
-	fi
-
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-	  eval flag=\"$thread_safe_flag_spec\"
-	  linkopts="$linkopts $flag"
-	fi
-
-	# Do each of the archive commands.
-	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval cmds=\"$archive_expsym_cmds\"
-	else
-	  eval cmds=\"$archive_cmds\"
-	fi
-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-
-	# Create links to the real library.
-	for linkname in $linknames; do
-	  if test "$realname" != "$linkname"; then
-	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-	  fi
-	done
-
-	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
-	  # On all known operating systems, these are identical.
-	  dlname="$soname"
-	fi
-      fi
-      ;;
-
-    *.lo | *.o | *.obj)
-      if test -n "$link_against_libtool_libs"; then
-	$echo "$modename: error: cannot link libtool libraries into objects" 1>&2
-	exit 1
-      fi
-
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
-
-      case "$output" in
-      *.lo)
-	if test -n "$objs"; then
-	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit 1
-	fi
-	libobj="$output"
-	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-	;;
-      *)
-	libobj=
-	obj="$output"
-	;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
-      wl= 
-
-      if test -n "$convenience"; then
-	if test -n "$whole_archive_flag_spec"; then
-	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
-	else
-	  gentop="$output_objdir/${obj}x"
-	  $show "${rm}r $gentop"
-	  $run ${rm}r "$gentop"
-	  $show "mkdir $gentop"
-	  $run mkdir "$gentop"
-	  status=$?
-	  if test $status -ne 0 && test ! -d "$gentop"; then
-	    exit $status
-	  fi
-	  generated="$generated $gentop"
-
-	  for xlib in $convenience; do
-	    # Extract the objects.
-	    case "$xlib" in
-	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	    *) xabs=`pwd`"/$xlib" ;;
-	    esac
-	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	    xdir="$gentop/$xlib"
-
-	    $show "${rm}r $xdir"
-	    $run ${rm}r "$xdir"
-	    $show "mkdir $xdir"
-	    $run mkdir "$xdir"
-	    status=$?
-	    if test $status -ne 0 && test ! -d "$xdir"; then
-	      exit $status
-	    fi
-	    $show "(cd $xdir && $AR x $xabs)"
-	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
-	  done
-	fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
-
-      output="$obj"
-      eval cmds=\"$reload_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	exit 0
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	# Create an invalid libtool object if no PIC, so that we don't
-	# accidentally link it into a program.
-	$show "echo timestamp > $libobj"
-	$run eval "echo timestamp > $libobj" || exit $?
-	exit 0
-      fi
-
-      if test -n "$pic_flag"; then
-	# Only do commands if we really have different PIC objects.
-	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
-	eval cmds=\"$reload_cmds\"
-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-      else
-	# Just create a symlink.
-	$show $rm $libobj
-	$run $rm $libobj
-	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
-	if test "X$xdir" = "X$libobj"; then
-	  xdir="."
-	else
-	  xdir="$xdir"
-	fi
-	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
-	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
-	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
-	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
-      fi
-
-      if test -n "$gentop"; then
-	$show "${rm}r $gentop"
-	$run ${rm}r $gentop
-      fi
-
-      exit 0
-      ;;
-
-    # Anything else should be a program.
-    *)
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
-
-      if test "$preload" = yes; then
-	if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
-	   test "$dlopen_self_static" = unknown; then
-	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-	fi 
-      fi
-    
-      if test -n "$rpath$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath $xrpath; do
-	  # This is the magic to use -rpath.
-	  case "$compile_rpath " in
-	  *" $libdir "*) ;;
-	  *) compile_rpath="$compile_rpath $libdir" ;;
-	  esac
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$finalize_perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$output_objdir" = "X$output"; then
-	output_objdir="$objdir"
-      else
-	output_objdir="$output_objdir/$objdir"
-      fi
-
-      # Create the binary in the object directory, then wrap it.
-      if test ! -d $output_objdir; then
-	$show "$mkdir $output_objdir"
-	$run $mkdir $output_objdir
-	status=$?
-	if test $status -ne 0 && test ! -d $output_objdir; then
-	  exit $status
-	fi
-      fi
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-	# Transform all the library objects into standard objects.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	  dlsyms="${outputname}S.c"
-	else
-	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-	fi
-      fi
-
-      if test -n "$dlsyms"; then
-	case "$dlsyms" in
-	"") ;;
-	*.c)
-	  # Discover the nlist of each of the dlfiles.
-	  nlist="$output_objdir/${outputname}.nm"
-
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Parse the name list into a source file.
-	  $show "creating $output_objdir/$dlsyms"
-
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-	  if test "$dlself" = yes; then
-	    $show "generating symbol list for \`$output'"
-
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
-	    # Add our own program objects to the symbol list.
-	    progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	    for arg in $progfiles; do
-	      $show "extracting global C symbols from \`$arg'"
-	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	    done
-
-	    if test -n "$exclude_expsyms"; then
-	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-	    
-	    if test -n "$export_symbols_regex"; then
-	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-
-	    # Prepare the list of exported symbols
-	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$output.exp"
-	      $run $rm $export_symbols
-	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-	    else
-	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
-	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
-	      $run eval 'mv "$nlist"T "$nlist"'
-	    fi
-	  fi
-
-	  for arg in $dlprefiles; do
-	    $show "extracting global C symbols from \`$arg'"
-	    name=`echo "$arg" | sed -e 's%^.*/%%'`
-	    $run eval 'echo ": $name " >> "$nlist"'
-	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	  done
-
-	  if test -z "$run"; then
-	    # Make sure we have at least an empty file.
-	    test -f "$nlist" || : > "$nlist"
-
-	    if test -n "$exclude_expsyms"; then
-	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-	      $mv "$nlist"T "$nlist"
-	    fi
-
-	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
-	      :
-	    else
-	      grep -v "^: " < "$nlist" > "$nlist"S
-	    fi
-
-	    if test -f "$nlist"S; then
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-	    else
-	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-	    sed -n -e 's/^: \([^ ]*\) $/  {\"\1\", (lt_ptr_t) 0},/p' \
-		-e 's/^. \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr_t) \&\2},/p' \
-		  < "$nlist" >> "$output_objdir/$dlsyms"
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr_t) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-	  fi
-
-	  pic_flag_for_symtable=
-	  case "$host" in
-	  # compiling the symbol table file with pic_flag works around
-	  # a FreeBSD bug that causes programs to crash when -lm is
-	  # linked before any other PIC object.  But we must not use
-	  # pic_flag when linking with -static.  The problem exists in
-	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
-	    esac;;
-	  *-*-hpux*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
-	    esac
-	  esac
-
-	  # Now compile the dynamic symbol file.
-	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-	  # Clean up the generated files.
-	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Transform the symbol file into the correct name.
-	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  ;;
-	*)
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit 1
-	  ;;
-	esac
-      else
-	# We keep going just in case the user didn't refer to
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-	# really was required.
-
-	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
-	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	link_command="$compile_command$compile_rpath"
-
-	# We have no uninstalled library dependencies, so finalize right now.
-	$show "$link_command"
-	$run eval "$link_command"
-	status=$?
-	
-	# Delete the generated files.
-	if test -n "$dlsyms"; then
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
-	fi
-
-	exit $status
-      fi
-
-      if test -n "$shlibpath_var"; then
-	# We should set the shlibpath_var
-	rpath=
-	for dir in $temp_rpath; do
-	  case "$dir" in
-	  [\\/]* | [A-Za-z]:[\\/]*)
-	    # Absolute path.
-	    rpath="$rpath$dir:"
-	    ;;
-	  *)
-	    # Relative path: add a thisdir entry.
-	    rpath="$rpath\$thisdir/$dir:"
-	    ;;
-	  esac
-	done
-	temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-	if test -n "$perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-	if test -n "$finalize_perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-      fi
-
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
-	
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-      
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
-	case "$0" in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
-	esac
-	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-	# win32 will think the script is a binary if it has
-	# a .exe suffix, so we strip it off here.
-	case $output in
-	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
-	esac
-	$rm $output
-	trap "$rm $output; exit 1" 1 2 15
-
-	$echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  link_against_libtool_libs='$link_against_libtool_libs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-	$echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-	if test "$fast_install" = yes; then
-	  echo >> $output "\
-  program=lt-'$outputname'
-  progdir=\"\$thisdir/$objdir\"
-  
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
-
-	  echo >> $output "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if (cd \"\$thisdir\" && eval \$relink_command); then :
-      else
-	$rm \"\$progdir/\$file\"
-	exit 1
-      fi
-    fi
-
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-	else
-	  echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-	fi
-
-	echo >> $output "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-	  $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-	fi
-
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
-	$echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-	case $host in
-	  # win32 systems need to use the prog path for dll
-	  # lookup to work
-	*-*-cygwin*)
-	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-	  ;;
-
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2*)
-	  $echo >> $output "\
-      exec \$progdir\\\\\$program \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $echo >> $output "\
-      # Export the path to the program.
-      PATH=\"\$progdir:\$PATH\"
-      export PATH
-
-      exec \$program \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
-  fi
-fi\
-"
-	chmod +x $output
-      fi
-      exit 0
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
-	  build_libtool_libs=no
-	else
-	  oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
-	fi
-	addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	$show "${rm}r $gentop"
-	$run ${rm}r "$gentop"
-	$show "mkdir $gentop"
-	$run mkdir "$gentop"
-	status=$?
-	if test $status -ne 0 && test ! -d "$gentop"; then
-	  exit $status
-	fi
-	generated="$generated $gentop"
-	  
-	# Add in members from convenience archives.
-	for xlib in $addlibs; do
-	  # Extract the objects.
-	  case "$xlib" in
-	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	  *) xabs=`pwd`"/$xlib" ;;
-	  esac
-	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	  xdir="$gentop/$xlib"
-
-	  $show "${rm}r $xdir"
-	  $run ${rm}r "$xdir"
-	  $show "mkdir $xdir"
-	  $run mkdir "$xdir"
-	  status=$?
-	  if test $status -ne 0 && test ! -d "$xdir"; then
-	    exit $status
-	  fi
-	  $show "(cd $xdir && $AR x $xabs)"
-	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-	done
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-	eval cmds=\"$old_archive_from_new_cmds\"
-      else
-	# Ensure that we have .o objects in place in case we decided
-	# not to build a shared library, and have fallen back to building
-	# static libs even though --disable-static was passed!
-	for oldobj in $oldobjs; do
-	  if test ! -f $oldobj; then
-	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
-	    if test "X$xdir" = "X$oldobj"; then
-	      xdir="."
-	    else
-	      xdir="$xdir"
-	    fi
-	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
-	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
-	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
-	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
-	  fi
-	done
-
-	eval cmds=\"$old_archive_cmds\"
-      fi
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
-
-    # Now create the libtool archive.
-    case "$output" in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
-
-      if test -n "$xrpath"; then
-	temp_xrpath=
-	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
-	done
-	dependency_libs="$temp_xrpath $dependency_libs"
-      fi
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-	for installed in no yes; do
-	  if test "$installed" = yes; then
-	    if test -z "$install_libdir"; then
-	      break
-	    fi
-	    output="$output_objdir/$outputname"i
-	  fi
-	  $rm $output
-	  $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$dlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'\
-"
-	done
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
-      ;;
-    esac
-    exit 0
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg="$nonopt"
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case "$arg" in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-	files="$files $dest"
-	dest="$arg"
-	continue
-      fi
-
-      case "$arg" in
-      -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
-      -s)
-	stripme=" -s"
-	continue
-	;;
-      -*) ;;
-
-      *)
-	# If the previous option needed an argument, then skip it.
-	if test -n "$prev"; then
-	  prev=
-	else
-	  dest="$arg"
-	  continue
-	fi
-	;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-	$echo "$modename: no file or destination specified" 1>&2
-      else
-	$echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test $# -gt 2; then
-	$echo "$modename: \`$dest' is not a directory" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-    fi
-    case "$destdir" in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-	case "$file" in
-	*.lo) ;;
-	*)
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	  ;;
-	esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case "$file" in
-      *.a | *.lib)
-	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
-	;;
-
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	library_names=
-	old_library=
-	# If there is no directory component, then add one.
-	case "$file" in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Add the libdir to current_libdirs if it is the destination.
-	if test "X$destdir" = "X$libdir"; then
-	  case "$current_libdirs " in
-	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
-	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
-	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
-	  esac
-	fi
-
-	dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
-	test "X$dir" = "X$file/" && dir=
-	dir="$dir$objdir"
-
-	# See the names of the shared library.
-	set dummy $library_names
-	if test -n "$2"; then
-	  realname="$2"
-	  shift
-	  shift
-
-	  # Install the shared library and build the symlinks.
-	  $show "$install_prog $dir/$realname $destdir/$realname"
-	  $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
-
-	  if test $# -gt 0; then
-	    # Delete the old symlinks, and create new ones.
-	    for linkname
-	    do
-	      if test "$linkname" != "$realname"; then
-		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-	      fi
-	    done
-	  fi
-
-	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
-	  eval cmds=\"$postinstall_cmds\"
-	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
-	  done
-	  IFS="$save_ifs"
-	fi
-
-	# Install the pseudo-library for information purposes.
-	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	instname="$dir/$name"i
-	$show "$install_prog $instname $destdir/$name"
-	$run eval "$install_prog $instname $destdir/$name" || exit $?
-
-	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-	;;
-
-      *.lo)
-	# Install (i.e. copy) a libtool object.
-
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# Deduce the name of the destination old-style object file.
-	case "$destfile" in
-	*.lo)
-	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-	  ;;
-	*.o | *.obj)
-	  staticdest="$destfile"
-	  destfile=
-	  ;;
-	*)
-	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	# Install the libtool object if requested.
-	if test -n "$destfile"; then
-	  $show "$install_prog $file $destfile"
-	  $run eval "$install_prog $file $destfile" || exit $?
-	fi
-
-	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
-	  # Deduce the name of the old-style object file.
-	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-	  $show "$install_prog $staticobj $staticdest"
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-	fi
-	exit 0
-	;;
-
-      *)
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# Do a test to see if this is really a libtool program.
-	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  link_against_libtool_libs=
-	  relink_command=
-
-	  # If there is no directory component, then add one.
-	  case "$file" in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Check the variables that should have been set.
-	  if test -z "$link_against_libtool_libs"; then
-	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
-	    exit 1
-	  fi
-
-	  finalize=yes
-	  for lib in $link_against_libtool_libs; do
-	    # Check to see that each library is installed.
-	    libdir=
-	    if test -f "$lib"; then
-	      # If there is no directory component, then add one.
-	      case "$lib" in
-	      */* | *\\*) . $lib ;;
-	      *) . ./$lib ;;
-	      esac
-	    fi
-	    libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
-	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-	      finalize=no
-	    fi
-	  done
-
-	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
-	    if test "$finalize" = yes && test -z "$run"; then
-	      tmpdir="/tmp"
-	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
-	      tmpdir="$tmpdir/libtool-$$"
-	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
-	      else
-		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
-		continue
-	      fi
-	      outputname="$tmpdir/$file"
-	      # Replace the output file specification.
-	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-	      $show "$relink_command"
-	      if $run eval "$relink_command"; then :
-	      else
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-		${rm}r "$tmpdir"
-		continue
-	      fi
-	      file="$outputname"
-	    else
-	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
-	    fi
-	  else
-	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-	  fi
-	fi
-
-	$show "$install_prog$stripme $file $destfile"
-	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-	test -n "$outputname" && ${rm}r "$tmpdir"
-	;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      # Do each command in the postinstall commands.
-      eval cmds=\"$old_postinstall_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec $SHELL $0 --finish$current_libdirs
-      exit 1
-    fi
-
-    exit 0
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  eval cmds=\"$finish_cmds\"
-	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    $show "$cmd"
-	    $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
-	  done
-	  IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-	fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit 0
-
-    echo "----------------------------------------------------------------------"
-    echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      echo "   $libdir"
-    done
-    echo
-    echo "If you ever happen to want to link against installed libraries"
-    echo "in a given directory, LIBDIR, you must either use libtool, and"
-    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
-    echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    echo
-    echo "See any operating system documentation about shared libraries for"
-    echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    echo "----------------------------------------------------------------------"
-    exit 0
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit 1
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-
-      dir=
-      case "$file" in
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	# Read the libtool library.
-	dlname=
-	library_names=
-
-	# If there is no directory component, then add one.
-	case "$file" in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
-	fi
-	;;
-
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
-
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-	continue
-	;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case "$file" in
-      -*) ;;
-      *)
-	# Do a test to see if this is really a libtool program.
-	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case "$file" in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-	;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-        # Export the shlibpath_var.
-        eval "export $shlibpath_var"
-      fi
-
-      # Restore saved enviroment variables
-      if test "${save_LC_ALL+set}" = set; then
-	LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-	LANG="$save_LANG"; export LANG
-      fi
-
-      # Now actually exec the command.
-      eval "exec \$cmd$args"
-
-      $echo "$modename: cannot exec \$cmd$args"
-      exit 1
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-        $echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit 0
-    fi
-    ;;
-
-  # libtool uninstall mode
-  uninstall)
-    modename="$modename: uninstall"
-    rm="$nonopt"
-    files=
-
-    for arg
-    do
-      case "$arg" in
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$dir" = "X$file" && dir=.
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      rmfiles="$file"
-
-      case "$name" in
-      *.la)
-	# Possibly a libtool archive, so verify it.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  . $dir/$name
-
-	  # Delete the libtool libraries and symlinks.
-	  for n in $library_names; do
-	    rmfiles="$rmfiles $dir/$n"
-	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
-
-	  $show "$rm $rmfiles"
-	  $run $rm $rmfiles
-
-	  if test -n "$library_names"; then
-	    # Do each command in the postuninstall commands.
-	    eval cmds=\"$postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-	  if test -n "$old_library"; then
-	    # Do each command in the old_postuninstall commands.
-	    eval cmds=\"$old_postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-	  # FIXME: should reinstall the best remaining shared library.
-	fi
-	;;
-
-      *.lo)
-	if test "$build_old_libs" = yes; then
-	  oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
-	  rmfiles="$rmfiles $dir/$oldobj"
-	fi
-	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-	;;
-
-      *)
-	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-	;;
-      esac
-    done
-    exit 0
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit 1
-    ;;
-  esac
-
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$generic_help" 1>&2
-  exit 1
-fi # test -z "$show_help"
-
-# We need to display help for each of the modes.
-case "$mode" in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --version         print version information
-
-MODE must be one of the following:
-
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
-  exit 0
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-		    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-		    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-		    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-  ;;
-esac
-
-echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/saslauthd/config/missing b/saslauthd/config/missing
deleted file mode 100755
index 6a37006..0000000
--- a/saslauthd/config/missing
+++ /dev/null
@@ -1,336 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-  aclocal*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f y.tab.h ]; then
-	echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit 1
-    fi
-    ;;
-
-  makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
-    fi
-    touch $file
-    ;;
-
-  tar)
-    shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case "$firstarg" in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case "$firstarg" in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
diff --git a/saslauthd/config/mkinstalldirs b/saslauthd/config/mkinstalldirs
deleted file mode 100755
index d2d5f21..0000000
--- a/saslauthd/config/mkinstalldirs
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage" 1>&2
-      exit 0
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-case $dirmode in
-  '')
-    if mkdir -p -- . 2>/dev/null; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    fi
-    ;;
-esac
-
-for file
-do
-  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-  shift
-
-  pathcomp=
-  for d
-  do
-    pathcomp="$pathcomp$d"
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-  	errstatus=$lasterr
-      else
-  	if test ! -z "$dirmode"; then
-	  echo "chmod $dirmode $pathcomp"
-    	  lasterr=""
-  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-  	  if test ! -z "$lasterr"; then
-  	    errstatus=$lasterr
-  	  fi
-  	fi
-      fi
-    fi
-
-    pathcomp="$pathcomp/"
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# End:
-# mkinstalldirs ends here
diff --git a/saslauthd/config/plain.m4 b/saslauthd/config/plain.m4
deleted file mode 100644
index ee9e0c4..0000000
--- a/saslauthd/config/plain.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl Check for PLAIN (and therefore crypt)
-
-AC_DEFUN([SASL_PLAIN_CHK],[
-AC_REQUIRE([SASL2_CRYPT_CHK])
-
-dnl PLAIN
- AC_ARG_ENABLE(plain, [  --enable-plain          enable PLAIN authentication [yes] ],
-  plain=$enableval,
-  plain=yes)
-
- PLAIN_LIBS=""
- if test "$plain" != no; then
-  dnl In order to compile plain, we need crypt.
-  if test "$cmu_have_crypt" = yes; then
-    PLAIN_LIBS=$LIB_CRYPT
-  fi
- fi
- AC_SUBST(PLAIN_LIBS)
-
- AC_MSG_CHECKING(PLAIN)
- if test "$plain" != no; then
-  AC_MSG_RESULT(enabled)
-  SASL_MECHS="$SASL_MECHS libplain.la"
-  if test "$enable_static" = yes; then
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS plain.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/plain.c"
-    AC_DEFINE(STATIC_PLAIN,[],[Link PLAIN Staticly])
-  fi
- else
-  AC_MSG_RESULT(disabled)
- fi
-])
diff --git a/saslauthd/config/sasldb.m4 b/saslauthd/config/sasldb.m4
deleted file mode 100644
index b28b087..0000000
--- a/saslauthd/config/sasldb.m4
+++ /dev/null
@@ -1,156 +0,0 @@
-dnl Functions to check what database to use for libsasldb
-
-dnl Berkeley DB specific checks first..
-
-dnl Figure out what database type we're using
-AC_DEFUN([SASL_DB_CHECK], [
-cmu_save_LIBS="$LIBS"
-AC_ARG_WITH(dblib, [  --with-dblib=DBLIB      set the DB library to use [berkeley] ],
-  dblib=$withval,
-  dblib=auto_detect)
-
-CYRUS_BERKELEY_DB_OPTS()
-
-SASL_DB_LIB=""
-
-case "$dblib" in
-dnl this is unbelievably painful due to confusion over what db-3 should be
-dnl named.  arg.
-  berkeley)
-	CYRUS_BERKELEY_DB_CHK()
-	CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
-	SASL_DB_INC=$BDB_INCADD
-	SASL_DB_LIB="${BDB_LIBADD}"
-	;;
-  gdbm)
-	AC_ARG_WITH(gdbm,[  --with-gdbm=PATH        use gdbm from PATH],
-                    with_gdbm="${withval}")
-
-        case "$with_gdbm" in
-           ""|yes)
-               AC_CHECK_HEADER(gdbm.h, [
-			AC_CHECK_LIB(gdbm, gdbm_open, SASL_DB_LIB="-lgdbm",
-                                           dblib="no")],
-			dblib="no")
-               ;;
-           *)
-               if test -d $with_gdbm; then
-                 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
-                 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
-                 SASL_DB_LIB="-lgdbm" 
-               else
-                 with_gdbm="no"
-               fi
-       esac
-	;;
-  ndbm)
-	dnl We want to attempt to use -lndbm if we can, just in case
-	dnl there's some version of it installed and overriding libc
-	AC_CHECK_HEADER(ndbm.h, [
-			AC_CHECK_LIB(ndbm, dbm_open, SASL_DB_LIB="-lndbm", [
-				AC_CHECK_FUNC(dbm_open,,dblib="no")])],
-				dblib="no")
-	;;
-  auto_detect)
-        dnl How about berkeley db?
-	CYRUS_BERKELEY_DB_CHK()
-	if test "$dblib" = no; then
-	  dnl How about ndbm?
-	  AC_CHECK_HEADER(ndbm.h, [
-		AC_CHECK_LIB(ndbm, dbm_open,
-			     dblib="ndbm"; SASL_DB_LIB="-lndbm",
-		   	     dblib="weird")],
-		   dblib="no")
-	  if test "$dblib" = "weird"; then
-	    dnl Is ndbm in the standard library?
-            AC_CHECK_FUNC(dbm_open, dblib="ndbm", dblib="no")
-	  fi
-
-	  if test "$dblib" = no; then
-            dnl Can we use gdbm?
-   	    AC_CHECK_HEADER(gdbm.h, [
-		AC_CHECK_LIB(gdbm, gdbm_open, dblib="gdbm";
-					     SASL_DB_LIB="-lgdbm", dblib="no")],
-  			     dblib="no")
-	  fi
-	else
-	  dnl we took Berkeley
-	  CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
-	  SASL_DB_INC=$BDB_INCADD
-          SASL_DB_LIB="${BDB_LIBADD}"
-	fi
-	;;
-  none)
-	;;
-  no)
-	;;
-  *)
-	AC_MSG_WARN([Bad DB library implementation specified;])
-	AC_ERROR([Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"])
-	dblib=no
-	;;
-esac
-LIBS="$cmu_save_LIBS"
-
-AC_MSG_CHECKING(DB library to use)
-AC_MSG_RESULT($dblib)
-
-SASL_DB_BACKEND="db_${dblib}.lo"
-SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
-SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
-SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
-SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
-
-case "$dblib" in
-  gdbm) 
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-    AC_DEFINE(SASL_GDBM,[],[Use GDBM for SASLdb])
-    ;;
-  ndbm)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-    AC_DEFINE(SASL_NDBM,[],[Use NDBM for SASLdb])
-    ;;
-  berkeley)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-    AC_DEFINE(SASL_BERKELEYDB,[],[Use BerkeleyDB for SASLdb])
-    ;;
-  *)
-    AC_MSG_WARN([Disabling SASL authentication database support])
-    dnl note that we do not add libsasldb.la to SASL_MECHS, since it
-    dnl will just fail to load anyway.
-    SASL_DB_BACKEND="db_none.lo"
-    SASL_DB_BACKEND_STATIC="db_none.o"
-    SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
-    SASL_DB_UTILS=""
-    SASL_DB_MANS=""
-    SASL_DB_LIB=""
-    ;;
-esac
-
-if test "$enable_static" = yes; then
-    if test "$dblib" != "none"; then
-      SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
-      SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
-      AC_DEFINE(STATIC_SASLDB,[],[Link SASLdb Staticly])
-    else
-      SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
-      SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
-    fi
-fi
-
-AC_SUBST(SASL_DB_UTILS)
-AC_SUBST(SASL_DB_MANS)
-AC_SUBST(SASL_DB_BACKEND)
-AC_SUBST(SASL_DB_BACKEND_STATIC)
-AC_SUBST(SASL_DB_INC)
-AC_SUBST(SASL_DB_LIB)
-])
-
-dnl Figure out what database path we're using
-AC_DEFUN([SASL_DB_PATH_CHECK], [
-AC_ARG_WITH(dbpath, [  --with-dbpath=PATH      set the DB path to use [/etc/sasldb2] ],
-  dbpath=$withval,
-  dbpath=/etc/sasldb2)
-AC_MSG_CHECKING(DB path to use)
-AC_MSG_RESULT($dbpath)
-AC_DEFINE_UNQUOTED(SASL_DB_PATH, "$dbpath", [Path to default SASLdb database])])
diff --git a/saslauthd/configure b/saslauthd/configure
deleted file mode 100755
index 04cb414..0000000
--- a/saslauthd/configure
+++ /dev/null
@@ -1,15983 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-
-  if test $as_have_required = yes &&	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-	   done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-	done
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf at gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="mechanisms.h"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LIBOBJS
-LTLIBOBJS
-LDAP_LIBS
-LIB_PAM
-MAIN_COMPAT_OBJ
-SASL_DB_LIB
-SASL_DB_INC
-SASL_DB_BACKEND_STATIC
-SASL_DB_BACKEND
-SASL_DB_MANS
-SASL_DB_UTILS
-LIB_SIA
-GSSAPIBASE_LIBS
-GSSAPI_LIBS
-LIB_CRYPT
-SASL_KRB_LIB
-LIB_DES
-CMU_LIB_SUBDIR
-EGREP
-GREP
-LIB_SOCKET
-LN_S
-CPP
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-SASLAUTHD_FALSE
-SASLAUTHD_TRUE
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_saslauthd
-enable_dependency_tracking
-with_lib_subdir
-with_openssl
-with_des
-enable_krb4
-enable_gssapi
-with_gss_impl
-enable_sia
-enable_auth_sasldb
-with_dbpath
-with_dblib
-with_bdb_libdir
-with_bdb_incdir
-with_gdbm
-enable_httpform
-with_pam
-with_ipctype
-with_ldap
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -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_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$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 ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$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 | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$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 ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    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 | -n)
-    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 ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$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_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=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 ;;
-
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
-
-
-# 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 the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  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
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --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
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-krb4           enable KERBEROS_V4 authentication [no]
-  --enable-gssapi=<DIR>   enable GSSAPI authentication [yes]
-  --enable-sia            enable SIA authentication no
-  --enable-auth-sasldb    enable experimental SASLdb authentication module no
-  --enable-httpform       enable HTTP form authentication [no]
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-saslauthd=DIR    enable use of the saslauth daemon using state dir DIR
-  --with-lib-subdir=DIR   Find libraries in DIR instead of lib
-  --with-openssl=PATH     use OpenSSL from PATH
-  --with-des=DIR          with DES (look in DIR) yes
-  --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
-                          choose specific GSSAPI implementation [[auto]]
-  --with-dbpath=PATH      set the DB path to use /etc/sasldb2
-  --with-dblib=DBLIB      set the DB library to use berkeley
-  --with-bdb-libdir=DIR   Berkeley DB lib files are in DIR
-  --with-bdb-incdir=DIR   Berkeley DB include files are in DIR
-  --with-gdbm=PATH        use gdbm from PATH
-  --with-pam=DIR          use PAM (rooted in DIR) yes
-  --with-ipctype={unix,doors}    use ipctype unix
-  --with-ldap=DIR         use LDAP (in DIR) no
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-ac_aux_dir=
-for ac_dir in config "$srcdir"/config; 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
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-# Check whether --with-saslauthd was given.
-if test "${with_saslauthd+set}" = set; then
-  withval=$with_saslauthd; with_saslauthd=$withval
-else
-  with_saslauthd=yes
-fi
-
-  if test "$with_saslauthd" = yes; then
-    with_saslauthd="/var/state/saslauthd"
-  fi
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SASLAUTHD /**/
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PATH_SASLAUTHD_RUNDIR "$with_saslauthd"
-_ACEOF
-
- if test "$with_saslauthd" != no; then
-  SASLAUTHD_TRUE=
-  SASLAUTHD_FALSE='#'
-else
-  SASLAUTHD_TRUE='#'
-  SASLAUTHD_FALSE=
-fi
-
-
-am__api_version='1.11'
-
-# 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
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# 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"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /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
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-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.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&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}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
-done
-IFS=$as_save_IFS
-
-fi
-
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE=saslauthd
- VERSION=2.1.26
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-
-	ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_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 $# != 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
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&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
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&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
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# 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"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /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
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-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.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&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}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for __attribute__" >&5
-$as_echo_n "checking for __attribute__... " >&6; }
-if test "${ac_cv___attribute__+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
-  exit(1);
-}
-
-int
-main ()
-{
-
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv___attribute__=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv___attribute__=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___ATTRIBUTE__ 1
-_ACEOF
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
-$as_echo "$ac_cv___attribute__" >&6; }
-
-
-   # CMU GUESS RUNPATH SWITCH
-  { $as_echo "$as_me:$LINENO: checking for runpath switch" >&5
-$as_echo_n "checking for runpath switch... " >&6; }
-if test "${andrew_cv_runpath_switch+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-    # first, try -R
-    SAVE_LDFLAGS="${LDFLAGS}"
-    LDFLAGS="-R /usr/lib"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  andrew_cv_runpath_switch="-R"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-  	LDFLAGS="-Wl,-rpath,/usr/lib"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  andrew_cv_runpath_switch="-Wl,-rpath,"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	andrew_cv_runpath_switch="none"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS="${SAVE_LDFLAGS}"
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $andrew_cv_runpath_switch" >&5
-$as_echo "$andrew_cv_runpath_switch" >&6; }
-
-
-	save_LIBS="$LIBS"
-	LIB_SOCKET=""
-	{ $as_echo "$as_me:$LINENO: checking for connect" >&5
-$as_echo_n "checking for connect... " >&6; }
-if test "${ac_cv_func_connect+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define connect to an innocuous variant, in case <limits.h> declares connect.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define connect innocuous_connect
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char connect (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef connect
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-/* 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_connect || defined __stub___connect
-choke me
-#endif
-
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_connect=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_connect=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
-$as_echo "$ac_cv_func_connect" >&6; }
-if test "x$ac_cv_func_connect" = x""yes; then
-  :
-else
-  { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_nsl_gethostbyname=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_nsl_gethostbyname=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
-  LIB_SOCKET="-lnsl $LIB_SOCKET"
-fi
-
-		{ $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
-$as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_connect=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_connect=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
-$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then
-  LIB_SOCKET="-lsocket $LIB_SOCKET"
-fi
-
-
-fi
-
-	LIBS="$LIB_SOCKET $save_LIBS"
-	{ $as_echo "$as_me:$LINENO: checking for res_search" >&5
-$as_echo_n "checking for res_search... " >&6; }
-if test "${ac_cv_func_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define res_search innocuous_res_search
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char res_search (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef res_search
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-/* 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_res_search || defined __stub___res_search
-choke me
-#endif
-
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
-$as_echo "$ac_cv_func_res_search" >&6; }
-if test "x$ac_cv_func_res_search" = x""yes; then
-  :
-else
-  LIBS="-lresolv $LIB_SOCKET $save_LIBS"
-		cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-[
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#ifdef HAVE_ARPA_NAMESER_COMPAT_H
-#include <arpa/nameser_compat.h>
-#endif
-#include <resolv.h>]
-int
-main ()
-{
-[
-const char host[12]="openafs.org";
-u_char ans[1024];
-res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
-return 0;
-]
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  LIB_SOCKET="-lresolv $LIB_SOCKET"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-
-	LIBS="$LIB_SOCKET $save_LIBS"
-
-
-for ac_func in dn_expand dns_lookup
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-	LIBS="$save_LIBS"
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#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))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# Check whether --with-lib-subdir was given.
-if test "${with_lib_subdir+set}" = set; then
-  withval=$with_lib_subdir;
-fi
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (long))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (long))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-{ $as_echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
-$as_echo_n "checking what directory libraries are found in... " >&6; }
-if test "${ac_cv_cmu_lib_subdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
-test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
-if test "X$with_lib_subdir" = "X" ; then
-  ac_cv_cmu_lib_subdir=lib
-  if test $ac_cv_sizeof_long -eq 4 ; then
-    test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
-  fi
-  if test $ac_cv_sizeof_long -eq 8 ; then
-    test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
-  fi
-else
-  ac_cv_cmu_lib_subdir=$with_lib_subdir
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
-$as_echo "$ac_cv_cmu_lib_subdir" >&6; }
-CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
-
-
-
-
-
-# Check whether --with-openssl was given.
-if test "${with_openssl+set}" = set; then
-  withval=$with_openssl; with_openssl=$withval
-else
-  with_openssl="yes"
-fi
-
-
-	save_CPPFLAGS=$CPPFLAGS
-	save_LDFLAGS=$LDFLAGS
-
-	if test -d $with_openssl; then
-	  CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
-
-  # this is CMU ADD LIBPATH
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
-  else
-	LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR $andrew_cv_runpath_switch${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
-  fi
-
-	fi
-
-case "$with_openssl" in
-	no)
-	  with_openssl="no";;
-	*)
-	  	                  LIB_RSAREF=""
-	        { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
-$as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
-if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrsaref  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RSAPublicEncrypt ();
-int
-main ()
-{
-return RSAPublicEncrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_rsaref_RSAPublicEncrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_rsaref_RSAPublicEncrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
-$as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
-if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
-  cmu_have_rsaref=yes;
-			{ $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lRSAglue" >&5
-$as_echo_n "checking for RSAPublicEncrypt in -lRSAglue... " >&6; }
-if test "${ac_cv_lib_RSAglue_RSAPublicEncrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lRSAglue  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RSAPublicEncrypt ();
-int
-main ()
-{
-return RSAPublicEncrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_RSAglue_RSAPublicEncrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_RSAglue_RSAPublicEncrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_RSAglue_RSAPublicEncrypt" >&5
-$as_echo "$ac_cv_lib_RSAglue_RSAPublicEncrypt" >&6; }
-if test "x$ac_cv_lib_RSAglue_RSAPublicEncrypt" = x""yes; then
-  LIB_RSAREF="-lRSAglue -lrsaref"
-else
-  LIB_RSAREF="-lrsaref"
-fi
-
-else
-  cmu_have_rsaref=no
-fi
-
-
-		if test "${ac_cv_header_openssl_evp_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
-$as_echo_n "checking for openssl/evp.h... " >&6; }
-if test "${ac_cv_header_openssl_evp_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
-$as_echo "$ac_cv_header_openssl_evp_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/evp.h usability" >&5
-$as_echo_n "checking openssl/evp.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/evp.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/evp.h presence" >&5
-$as_echo_n "checking openssl/evp.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/evp.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
-$as_echo_n "checking for openssl/evp.h... " >&6; }
-if test "${ac_cv_header_openssl_evp_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_evp_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
-$as_echo "$ac_cv_header_openssl_evp_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_evp_h" = x""yes; then
-
-			{ $as_echo "$as_me:$LINENO: checking for EVP_DigestInit in -lcrypto" >&5
-$as_echo_n "checking for EVP_DigestInit in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_EVP_DigestInit+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char EVP_DigestInit ();
-int
-main ()
-{
-return EVP_DigestInit ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_EVP_DigestInit=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_EVP_DigestInit=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_EVP_DigestInit" >&5
-$as_echo "$ac_cv_lib_crypto_EVP_DigestInit" >&6; }
-if test "x$ac_cv_lib_crypto_EVP_DigestInit" = x""yes; then
-  with_openssl="yes"
-else
-  with_openssl="no"
-fi
-
-else
-  with_openssl=no
-fi
-
-
-		;;
-esac
-
-	if test "$with_openssl" != "no"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPENSSL /**/
-_ACEOF
-
-	else
-		CPPFLAGS=$save_CPPFLAGS
-		LDFLAGS=$save_LDFLAGS
-	fi
-
-{ $as_echo "$as_me:$LINENO: checking for OpenSSL" >&5
-$as_echo_n "checking for OpenSSL... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
-$as_echo "$with_openssl" >&6; }
-
-
-
-# Check whether --with-des was given.
-if test "${with_des+set}" = set; then
-  withval=$with_des; with_des=$withval
-else
-  with_des=yes
-fi
-
-
-LIB_DES=""
-if test "$with_des" != no; then
-  if test -d $with_des; then
-    CPPFLAGS="$CPPFLAGS -I${with_des}/include"
-    LDFLAGS="$LDFLAGS -L${with_des}/lib"
-  fi
-
-  if test "$with_openssl" != no; then
-        { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
-
-        if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
-$as_echo_n "checking openssl/des.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/des.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
-$as_echo_n "checking openssl/des.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/des.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_des_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_des_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SSL_DES /**/
-_ACEOF
-
-                                       LIB_DES="-lcrypto";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-
-else
-  with_des=no
-fi
-
-
-        if test "$with_des" = no; then
-      { $as_echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char DES_cbc_encrypt ();
-int
-main ()
-{
-return DES_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_DES_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_DES_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = x""yes; then
-
-        if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
-$as_echo_n "checking openssl/des.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/des.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
-$as_echo_n "checking openssl/des.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/des.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_des_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_des_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SSL_DES /**/
-_ACEOF
-
-                                       LIB_DES="-lcrypto";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-
-else
-  with_des=no
-fi
-
-    fi
-  fi
-
-  if test "$with_des" = no; then
-    { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
-if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_des_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then
-  LIB_DES="-ldes";
-                                        with_des=yes
-else
-  with_des=no
-fi
-
-  fi
-
-  if test "$with_des" = no; then
-     { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
-if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes425  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_des425_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des425_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then
-  LIB_DES="-ldes425";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-  fi
-
-  if test "$with_des" = no; then
-     { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes524" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes524... " >&6; }
-if test "${ac_cv_lib_des524_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes524  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_des524_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des524_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des524_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des524_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des524_des_cbc_encrypt" = x""yes; then
-  LIB_DES="-ldes524";
-                                       with_des=yes
-else
-  with_des=no
-fi
-
-  fi
-
-  if test "$with_des" = no; then
-
-            LIB_RSAREF=""
-    { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
-$as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
-if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrsaref  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RSAPublicEncrypt ();
-int
-main ()
-{
-return RSAPublicEncrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_rsaref_RSAPublicEncrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_rsaref_RSAPublicEncrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
-$as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
-if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
-  LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
-else
-  cmu_have_rsaref=no
-fi
-
-
-    { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIB_RSAREF $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypto_des_cbc_encrypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_des_cbc_encrypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
-
-	if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
-$as_echo_n "checking openssl/des.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/des.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
-$as_echo_n "checking openssl/des.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/des.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: openssl/des.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
-$as_echo_n "checking for openssl/des.h... " >&6; }
-if test "${ac_cv_header_openssl_des_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_openssl_des_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
-$as_echo "$ac_cv_header_openssl_des_h" >&6; }
-
-fi
-if test "x$ac_cv_header_openssl_des_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SSL_DES /**/
-_ACEOF
-
-					LIB_DES="-lcrypto";
-					with_des=yes
-else
-  with_des=no
-fi
-
-
-else
-  with_des=no
-fi
-
-  fi
-fi
-
-if test "$with_des" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_DES /**/
-_ACEOF
-
-fi
-
-
-
-
-
-
-
-  # Check whether --enable-krb4 was given.
-if test "${enable_krb4+set}" = set; then
-  enableval=$enable_krb4; krb4=$enableval
-else
-  krb4=no
-fi
-
-
-  if test "$krb4" != no; then
-
-{ $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
-
-fi
-
-
-            if test -d ${krb4}; then
-       { $as_echo "$as_me:$LINENO: checking for Kerberos includes" >&5
-$as_echo_n "checking for Kerberos includes... " >&6; }
-if test "${cyrus_krbinclude+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-         for krbhloc in include/kerberosIV include/kerberos include
-         do
-           if test -f ${krb4}/${krbhloc}/krb.h ; then
-             cyrus_krbinclude=${krb4}/${krbhloc}
-             break
-           fi
-         done
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
-$as_echo "$cyrus_krbinclude" >&6; }
-
-       if test -n "${cyrus_krbinclude}"; then
-         CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
-       fi
-       LDFLAGS="$LDFLAGS -L$krb4/lib"
-    fi
-
-    if test "$with_des" != no; then
-      if test "${ac_cv_header_krb_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for krb.h" >&5
-$as_echo_n "checking for krb.h... " >&6; }
-if test "${ac_cv_header_krb_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
-$as_echo "$ac_cv_header_krb_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking krb.h usability" >&5
-$as_echo_n "checking krb.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <krb.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking krb.h presence" >&5
-$as_echo_n "checking krb.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <krb.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: krb.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: krb.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for krb.h" >&5
-$as_echo_n "checking for krb.h... " >&6; }
-if test "${ac_cv_header_krb_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_krb_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
-$as_echo "$ac_cv_header_krb_h" >&6; }
-
-fi
-if test "x$ac_cv_header_krb_h" = x""yes; then
-
-        { $as_echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
-$as_echo_n "checking for com_err in -lcom_err... " >&6; }
-if test "${ac_cv_lib_com_err_com_err+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcom_err  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char com_err ();
-int
-main ()
-{
-return com_err ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_com_err_com_err=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_com_err_com_err=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
-$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
-if test "x$ac_cv_lib_com_err_com_err" = x""yes; then
-
-	  { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
-$as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb $LIB_DES -lcom_err $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_mk_priv ();
-int
-main ()
-{
-return krb_mk_priv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb_krb_mk_priv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb_krb_mk_priv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
-$as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
-if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
-  COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
-else
-  krb4lib=no
-fi
-
-else
-
-    	  { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
-$as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb $LIB_DES $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_mk_priv ();
-int
-main ()
-{
-return krb_mk_priv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb_krb_mk_priv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb_krb_mk_priv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
-$as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
-if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
-  COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
-else
-  krb4lib=no
-fi
-
-fi
-
-else
-  krb4="no"
-fi
-
-
-
-      if test "$krb4" != "no" -a "$krb4lib" = "no"; then
-	{ $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb4" >&5
-$as_echo_n "checking for krb_mk_priv in -lkrb4... " >&6; }
-if test "${ac_cv_lib_krb4_krb_mk_priv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb4 $LIB_DES $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_mk_priv ();
-int
-main ()
-{
-return krb_mk_priv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb4_krb_mk_priv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb4_krb_mk_priv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_mk_priv" >&5
-$as_echo "$ac_cv_lib_krb4_krb_mk_priv" >&6; }
-if test "x$ac_cv_lib_krb4_krb_mk_priv" = x""yes; then
-  COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes
-else
-  krb4=no
-fi
-
-      fi
-      if test "$krb4" = no; then
-          { $as_echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
-$as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}
-      fi
-    else
-      { $as_echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
-$as_echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
-      krb4=no
-    fi
-  fi
-
-  if test "$krb4" != no; then
-    cmu_save_LIBS="$LIBS"
-    LIBS="$LIBS $SASL_KRB_LIB"
-
-for ac_func in krb_get_err_text
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-    LIBS="$cmu_save_LIBS"
-  fi
-
-  { $as_echo "$as_me:$LINENO: checking KERBEROS_V4" >&5
-$as_echo_n "checking KERBEROS_V4... " >&6; }
-  if test "$krb4" != no; then
-    { $as_echo "$as_me:$LINENO: result: enabled" >&5
-$as_echo "enabled" >&6; }
-    SASL_MECHS="$SASL_MECHS libkerberos4.la"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_KERBEROS4 /**/
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KRB /**/
-_ACEOF
-
-    SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
-  else
-    { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-  fi
-
-
-{ $as_echo "$as_me:$LINENO: checking for crypt" >&5
-$as_echo_n "checking for crypt... " >&6; }
-if test "${ac_cv_func_crypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define crypt innocuous_crypt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char crypt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef crypt
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-/* 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_crypt || defined __stub___crypt
-choke me
-#endif
-
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_crypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_crypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
-$as_echo "$ac_cv_func_crypt" >&6; }
-if test "x$ac_cv_func_crypt" = x""yes; then
-  cmu_have_crypt=yes
-else
-  { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-$as_echo_n "checking for crypt in -lcrypt... " >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypt_crypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypt_crypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
-if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
-  LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
-else
-  cmu_have_crypt=no
-fi
-
-fi
-
-
-
-
-
-# Check whether --enable-gssapi was given.
-if test "${enable_gssapi+set}" = set; then
-  enableval=$enable_gssapi; gssapi=$enableval
-else
-  gssapi=yes
-fi
-
-
-# Check whether --with-gss_impl was given.
-if test "${with_gss_impl+set}" = set; then
-  withval=$with_gss_impl; gss_impl=$withval
-else
-  gss_impl=auto
-fi
-
-
-if test "$gssapi" != no; then
-  platform=
-  case "${host}" in
-    *-*-linux*)
-      platform=__linux
-      ;;
-    *-*-hpux*)
-      platform=__hpux
-      ;;
-    *-*-irix*)
-      platform=__irix
-      ;;
-    *-*-solaris2*)
-# When should we use __sunos?
-      platform=__solaris
-      ;;
-    *-*-aix*)
-###_AIX
-      platform=__aix
-      ;;
-    *)
-      { $as_echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
-$as_echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
-      if test "$gss_impl" = "cybersafe"; then
-        { { $as_echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
-$as_echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
-   { (exit 1); exit 1; }; }
-      fi
-      ;;
-  esac
-
-  cmu_saved_CPPFLAGS=$CPPFLAGS
-
-  if test -d ${gssapi}; then
-    CPPFLAGS="$CPPFLAGS -I$gssapi/include"
-# We want to keep -I in our CPPFLAGS, but only if we succeed
-    cmu_saved_CPPFLAGS=$CPPFLAGS
-### I am not sure how useful is this (and whether this is required at all
-### especially when we have to provide two -L flags for new CyberSafe
-    LDFLAGS="$LDFLAGS -L$gssapi/lib"
-
-    if test -n "$platform"; then
-      if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
-        CPPFLAGS="$CPPFLAGS -D$platform"
-        if test -d "${gssapi}/appsec-sdk/include"; then
-          CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
-        fi
-      fi
-    fi
-  fi
-  if test "${ac_cv_header_gssapi_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
-$as_echo_n "checking for gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gssapi.h usability" >&5
-$as_echo_n "checking gssapi.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gssapi.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gssapi.h presence" >&5
-$as_echo_n "checking gssapi.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gssapi.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gssapi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
-$as_echo_n "checking for gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gssapi_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gssapi_h" = x""yes; then
-  :
-else
-  if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
-$as_echo_n "checking for gssapi/gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
-$as_echo_n "checking gssapi/gssapi.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gssapi/gssapi.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
-$as_echo_n "checking gssapi/gssapi.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
-$as_echo_n "checking for gssapi/gssapi.h... " >&6; }
-if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
-$as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then
-  :
-else
-  { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
-$as_echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
-fi
-
-
-fi
-
-
-
-for ac_header in gssapi/gssapi_ext.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-  CPPFLAGS=$cmu_saved_CPPFLAGS
-
-fi
-
-if test "$gssapi" != no; then
-  if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSSAPI_H /**/
-_ACEOF
-
-  fi
-
-  # We need to find out which gssapi implementation we are
-  # using. Supported alternatives are: MIT Kerberos 5,
-  # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
-  # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
-  # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
-  #
-  # The choice is reflected in GSSAPIBASE_LIBS
-
-
-{ $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
-
-fi
-
-  if test -d ${gssapi}; then
-     gssapi_dir="${gssapi}/lib"
-     GSSAPIBASE_LIBS="-L$gssapi_dir"
-     GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
-  else
-     # FIXME: This is only used for building cyrus, and then only as
-     # a real hack.  it needs to be fixed.
-     gssapi_dir="/usr/local/lib"
-  fi
-
-  # Check a full link against the Heimdal libraries.
-  # If this fails, check a full link against the MIT libraries.
-  # If this fails, check a full link against the CyberSafe libraries.
-  # If this fails, check a full link against the Solaris 8 and up libgss.
-
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
-    gss_failed=0
-    { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
-$as_echo_n "checking for gss_unwrap in -lgssapi... " >&6; }
-if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_unwrap ();
-int
-main ()
-{
-return gss_unwrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gssapi_gss_unwrap=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gssapi_gss_unwrap=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
-$as_echo "$ac_cv_lib_gssapi_gss_unwrap" >&6; }
-if test "x$ac_cv_lib_gssapi_gss_unwrap" = x""yes; then
-  gss_impl="heimdal"
-else
-  gss_failed=1
-fi
-
-    if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
-      gss_impl="failed"
-    fi
-  fi
-
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
-    # check for libkrb5support first
-    { $as_echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
-$as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; }
-if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb5int_getspecific ();
-int
-main ()
-{
-return krb5int_getspecific ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_krb5support_krb5int_getspecific=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_krb5support_krb5int_getspecific=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
-$as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
-if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = x""yes; then
-  K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
-fi
-
-
-    gss_failed=0
-    { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
-$as_echo_n "checking for gss_unwrap in -lgssapi_krb5... " >&6; }
-if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_unwrap ();
-int
-main ()
-{
-return gss_unwrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gssapi_krb5_gss_unwrap=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gssapi_krb5_gss_unwrap=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
-$as_echo "$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
-if test "x$ac_cv_lib_gssapi_krb5_gss_unwrap" = x""yes; then
-  gss_impl="mit"
-else
-  gss_failed=1
-fi
-
-    if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
-      gss_impl="failed"
-    fi
-  fi
-
-  # For Cybersafe one has to set a platform define in order to make compilation work
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
-
-    cmu_saved_CPPFLAGS=$CPPFLAGS
-    cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
-# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
-    if test -d "${gssapi}/appsec-rt/lib"; then
-      GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
-    fi
-    CPPFLAGS="$CPPFLAGS -D$platform"
-    if test -d "${gssapi}/appsec-sdk/include"; then
-      CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
-    fi
-
-    gss_failed=0
-
-# Check for CyberSafe with two libraries first, than fall back to a single
-# library (older CyberSafe)
-
-    unset ac_cv_lib_gss_csf_gss_acq_user
-    { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
-$as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
-if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char csf_gss_acq_user ();
-int
-main ()
-{
-return csf_gss_acq_user ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gss_csf_gss_acq_user=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gss_csf_gss_acq_user=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
-$as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
-if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
-  gss_impl="cybersafe03"
-else
-  unset ac_cv_lib_gss_csf_gss_acq_user;
-                  { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
-$as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
-if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char csf_gss_acq_user ();
-int
-main ()
-{
-return csf_gss_acq_user ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gss_csf_gss_acq_user=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gss_csf_gss_acq_user=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
-$as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
-if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
-  gss_impl="cybersafe"
-else
-  gss_failed=1
-fi
-
-fi
-
-
-    if test "$gss_failed" = "1"; then
-# Restore variables
-      GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
-      CPPFLAGS=$cmu_saved_CPPFLAGS
-
-      if test "$gss_impl" != "auto"; then
-        gss_impl="failed"
-      fi
-    fi
-  fi
-
-  if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
-    gss_failed=0
-    { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
-$as_echo_n "checking for gss_unwrap in -lgss... " >&6; }
-if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss -lgss $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_unwrap ();
-int
-main ()
-{
-return gss_unwrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gss_gss_unwrap=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gss_gss_unwrap=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
-$as_echo "$ac_cv_lib_gss_gss_unwrap" >&6; }
-if test "x$ac_cv_lib_gss_gss_unwrap" = x""yes; then
-  gss_impl="seam"
-else
-  gss_failed=1
-fi
-
-    if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
-      gss_impl="failed"
-    fi
-  fi
-
-  if test "$gss_impl" = "mit"; then
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
-    GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
-  elif test "$gss_impl" = "heimdal"; then
-    CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
-    GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
-  elif test "$gss_impl" = "cybersafe03"; then
-# Version of CyberSafe with two libraries
-    CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
-    # there is no static libgss for CyberSafe
-    GSSAPIBASE_STATIC_LIBS=none
-  elif test "$gss_impl" = "cybersafe"; then
-    CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
-    GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
-    # there is no static libgss for CyberSafe
-    GSSAPIBASE_STATIC_LIBS=none
-  elif test "$gss_impl" = "seam"; then
-    GSSAPIBASE_LIBS=-lgss
-    # there is no static libgss on Solaris 8 and up
-    GSSAPIBASE_STATIC_LIBS=none
-  elif test "$gss_impl" = "failed"; then
-    gssapi="no"
-    GSSAPIBASE_LIBS=
-    GSSAPIBASE_STATIC_LIBS=
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
-$as_echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
-  else
-    gssapi="no"
-    GSSAPIBASE_LIBS=
-    GSSAPIBASE_STATIC_LIBS=
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
-$as_echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
-  fi
-fi
-
-#
-# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
-# in gssapi\rfckrb5.h
-#
-if test "$gssapi" != "no"; then
-  if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-                  #ifdef GSS_C_NT_HOSTBASED_SERVICE
-                    hostbased_service_gss_nt_yes
-                  #endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
-$as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
-fi
-rm -f conftest*
-
-
-  elif test "$ac_cv_header_gssapi_h" = "yes"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-  elif test "$ac_cv_header_gssapi_gssapi_h"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-  fi
-
-  if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-                  #ifdef GSS_C_NT_USER_NAME
-                   user_name_yes_gss_nt
-                  #endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_USER_NAME /**/
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
-$as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
-fi
-rm -f conftest*
-
-  elif test "$ac_cv_header_gssapi_h" = "yes"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_USER_NAME /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
-  rfc5587=yes
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
-  rfc5801=yes
-fi
-rm -f conftest*
-
-  elif test "$ac_cv_header_gssapi_gssapi_h"; then
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_C_NT_USER_NAME /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi/gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
-  rfc5587=yes
-fi
-rm -f conftest*
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
-  rfc5801=yes
-fi
-rm -f conftest*
-
-  fi
-fi
-
-GSSAPI_LIBS=""
-{ $as_echo "$as_me:$LINENO: checking GSSAPI" >&5
-$as_echo_n "checking GSSAPI... " >&6; }
-if test "$gssapi" != no; then
-  { $as_echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
-$as_echo "with implementation ${gss_impl}" >&6; }
-  { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int
-main ()
-{
-return res_search ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_res_search=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_res_search=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
-  GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
-fi
-
-  SASL_MECHS="$SASL_MECHS libgssapiv2.la"
-  SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
-  SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c"
-  if test "$rfc5587" = "yes" -a "$rfc5801" = "yes"; then
-    SASL_MECHS="$SASL_MECHS libgs2.la"
-    SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
-    SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gs2.c"
-  fi
-
-  cmu_save_LIBS="$LIBS"
-  LIBS="$LIBS $GSSAPIBASE_LIBS"
-
-for ac_func in gsskrb5_register_acceptor_identity
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in gss_decapsulate_token
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in gss_encapsulate_token
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in gss_oid_equal
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-  LIBS="$cmu_save_LIBS"
-
-  cmu_save_LIBS="$LIBS"
-  LIBS="$LIBS $GSSAPIBASE_LIBS"
-
-for ac_func in gss_get_name_attribute
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-  LIBS="$cmu_save_LIBS"
-
-  cmu_save_LIBS="$LIBS"
-  LIBS="$LIBS $GSSAPIBASE_LIBS"
-  { $as_echo "$as_me:$LINENO: checking for SPNEGO support in GSSAPI libraries" >&5
-$as_echo_n "checking for SPNEGO support in GSSAPI libraries... " >&6; }
-  if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#else
-#include <gssapi/gssapi.h>
-#endif
-
-int main(void)
-{
-    gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
-    gss_OID_set mech_set;
-    OM_uint32 min_stat;
-    int have_spnego = 0;
-
-    if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
-	gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
-	gss_release_oid_set(&min_stat, &mech_set);
-    }
-
-    return (!have_spnego);  // 0 = success, 1 = failure
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSS_SPNEGO /**/
-_ACEOF
-
-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-  LIBS="$cmu_save_LIBS"
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabled" >&5
-$as_echo "disabled" >&6; }
-fi
-
-
-
-
-if test "$gssapi" != no; then
-	if test "$gss_impl" = "heimdal"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define KRB5_HEIMDAL /**/
-_ACEOF
-
-	fi
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GSSAPI /**/
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for crypt" >&5
-$as_echo_n "checking for crypt... " >&6; }
-if test "${ac_cv_func_crypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define crypt innocuous_crypt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char crypt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef crypt
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-/* 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_crypt || defined __stub___crypt
-choke me
-#endif
-
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_crypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_crypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
-$as_echo "$ac_cv_func_crypt" >&6; }
-if test "x$ac_cv_func_crypt" = x""yes; then
-  cmu_have_crypt=yes
-else
-  { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-$as_echo_n "checking for crypt in -lcrypt... " >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_crypt_crypt=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypt_crypt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
-if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
-  LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
-else
-  cmu_have_crypt=no
-fi
-
-fi
-
-
-
-
-# Check whether --enable-sia was given.
-if test "${enable_sia+set}" = set; then
-  enableval=$enable_sia; sia=$enableval
-else
-  sia=no
-fi
-
-LIB_SIA=""
-if test "$sia" != no; then
-  if test -f /etc/sia/matrix.conf; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SIA /**/
-_ACEOF
-
-    LIB_SIA="-lsecurity -ldb -lm -laud"
-  else
-    { { $as_echo "$as_me:$LINENO: error: No support for SIA found" >&5
-$as_echo "$as_me: error: No support for SIA found" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-
-# Check whether --enable-auth-sasldb was given.
-if test "${enable_auth_sasldb+set}" = set; then
-  enableval=$enable_auth_sasldb; authsasldb=$enableval
-else
-  authsasldb=no
-fi
-
-if test "$authsasldb" != no; then
-  if test ! -d "../sasldb"; then
-     echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
-     exit 0;
-  fi
-
-cat >>confdefs.h <<\_ACEOF
-#define AUTH_SASLDB /**/
-_ACEOF
-
-
-
-# Check whether --with-dbpath was given.
-if test "${with_dbpath+set}" = set; then
-  withval=$with_dbpath; dbpath=$withval
-else
-  dbpath=/etc/sasldb2
-fi
-
-{ $as_echo "$as_me:$LINENO: checking DB path to use" >&5
-$as_echo_n "checking DB path to use... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $dbpath" >&5
-$as_echo "$dbpath" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define SASL_DB_PATH "$dbpath"
-_ACEOF
-
-
-cmu_save_LIBS="$LIBS"
-
-# Check whether --with-dblib was given.
-if test "${with_dblib+set}" = set; then
-  withval=$with_dblib; dblib=$withval
-else
-  dblib=auto_detect
-fi
-
-
-
-
-# Check whether --with-bdb-libdir was given.
-if test "${with_bdb_libdir+set}" = set; then
-  withval=$with_bdb_libdir; with_bdb_lib=$withval
-else
-   test "${with_bdb_lib+set}" = set || with_bdb_lib=none
-fi
-
-
-# Check whether --with-bdb-incdir was given.
-if test "${with_bdb_incdir+set}" = set; then
-  withval=$with_bdb_incdir; with_bdb_inc=$withval
-else
-   test "${with_bdb_inc+set}" = set || with_bdb_inc=none
-fi
-
-
-
-SASL_DB_LIB=""
-
-case "$dblib" in
-  berkeley)
-
-
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_bdb_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
-	    BDB_INCADD="-I$with_bdb_inc"
-	else
-	    BDB_INCADD=""
-	fi
-
-	                if test "${ac_cv_header_db_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking db.h usability" >&5
-$as_echo_n "checking db.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <db.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking db.h presence" >&5
-$as_echo_n "checking db.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <db.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: db.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_db_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-
-fi
-if test "x$ac_cv_header_db_h" = x""yes; then
-
-	BDB_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_bdb_lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
-  else
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
-  else
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-	else
-	    BDB_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-	    for dbname in ${with_bdb} \
-	        db-5.2 db5.2 db52 \
-	        db-5.1 db5.2 db51 \
-	        db-5.0 db5.2 db50 \
-	        db-4.8 db4.8 db48 \
-	        db-4.7 db4.7 db47 \
-	        db-4.6 db4.6 db46 \
-	        db-4.5 db4.5 db45 \
-	        db-4.4 db4.4 db44 \
-	        db-4.3 db4.3 db43 \
-	        db-4.2 db4.2 db42 \
-	        db-4.1 db4.1 db41 \
-	        db-4.0 db4.0 db40 db-4 db4 \
-	        db-3.3 db3.3 db33 \
-	        db-3.2 db3.2 db32 \
-	        db-3.1 db3.1 db31 \
-	        db-3.0 db3.0 db30 db-3 db3 \
-	        db
-	      do
-	    LIBS="$saved_LIBS -l$dbname"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_create(NULL, NULL, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-	    if test "$dblib" = "berkeley"; then break; fi
-          done
-        if test "$dblib" = "no"; then
-	    LIBS="$saved_LIBS -ldb"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        fi
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$BDB_SAVE_LDFLAGS
-
-else
-  dblib="no"
-fi
-
-
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-
-	CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
-	SASL_DB_INC=$BDB_INCADD
-	SASL_DB_LIB="${BDB_LIBADD}"
-	;;
-  gdbm)
-
-# Check whether --with-gdbm was given.
-if test "${with_gdbm+set}" = set; then
-  withval=$with_gdbm; with_gdbm="${withval}"
-fi
-
-
-        case "$with_gdbm" in
-           ""|yes)
-               if test "${ac_cv_header_gdbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
-$as_echo_n "checking gdbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gdbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
-$as_echo_n "checking gdbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gdbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gdbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gdbm_h" = x""yes; then
-
-			{ $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgdbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gdbm_open ();
-int
-main ()
-{
-return gdbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gdbm_gdbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gdbm_gdbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
-  SASL_DB_LIB="-lgdbm"
-else
-  dblib="no"
-fi
-
-else
-  dblib="no"
-fi
-
-
-               ;;
-           *)
-               if test -d $with_gdbm; then
-                 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
-                 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
-                 SASL_DB_LIB="-lgdbm"
-               else
-                 with_gdbm="no"
-               fi
-       esac
-	;;
-  ndbm)
-			if test "${ac_cv_header_ndbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
-$as_echo_n "checking ndbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <ndbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
-$as_echo_n "checking ndbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ndbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_ndbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_ndbm_h" = x""yes; then
-
-			{ $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
-$as_echo_n "checking for dbm_open in -lndbm... " >&6; }
-if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lndbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ndbm_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ndbm_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
-$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
-if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
-  SASL_DB_LIB="-lndbm"
-else
-
-				{ $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
-$as_echo_n "checking for dbm_open... " >&6; }
-if test "${ac_cv_func_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dbm_open innocuous_dbm_open
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dbm_open (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dbm_open
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-/* 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_dbm_open || defined __stub___dbm_open
-choke me
-#endif
-
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
-$as_echo "$ac_cv_func_dbm_open" >&6; }
-if test "x$ac_cv_func_dbm_open" = x""yes; then
-  :
-else
-  dblib="no"
-fi
-
-fi
-
-else
-  dblib="no"
-fi
-
-
-	;;
-  auto_detect)
-
-
-
-	cmu_save_CPPFLAGS=$CPPFLAGS
-
-	if test -d $with_bdb_inc; then
-	    CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
-	    BDB_INCADD="-I$with_bdb_inc"
-	else
-	    BDB_INCADD=""
-	fi
-
-	                if test "${ac_cv_header_db_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking db.h usability" >&5
-$as_echo_n "checking db.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <db.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking db.h presence" >&5
-$as_echo_n "checking db.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <db.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: db.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for db.h" >&5
-$as_echo_n "checking for db.h... " >&6; }
-if test "${ac_cv_header_db_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_db_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-$as_echo "$ac_cv_header_db_h" >&6; }
-
-fi
-if test "x$ac_cv_header_db_h" = x""yes; then
-
-	BDB_SAVE_LDFLAGS=$LDFLAGS
-
-	if test -d $with_bdb_lib; then
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
-  else
-	LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-
-  # this is CMU ADD LIBPATH TO
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
-  else
-	BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
-  fi
-
-	else
-	    BDB_LIBADD=""
-	fi
-
-	saved_LIBS=$LIBS
-	    for dbname in ${with_bdb} \
-	        db-5.2 db5.2 db52 \
-	        db-5.1 db5.2 db51 \
-	        db-5.0 db5.2 db50 \
-	        db-4.8 db4.8 db48 \
-	        db-4.7 db4.7 db47 \
-	        db-4.6 db4.6 db46 \
-	        db-4.5 db4.5 db45 \
-	        db-4.4 db4.4 db44 \
-	        db-4.3 db4.3 db43 \
-	        db-4.2 db4.2 db42 \
-	        db-4.1 db4.1 db41 \
-	        db-4.0 db4.0 db40 db-4 db4 \
-	        db-3.3 db3.3 db33 \
-	        db-3.2 db3.2 db32 \
-	        db-3.1 db3.1 db31 \
-	        db-3.0 db3.0 db30 db-3 db3 \
-	        db
-	      do
-	    LIBS="$saved_LIBS -l$dbname"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_create(NULL, NULL, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-	    if test "$dblib" = "berkeley"; then break; fi
-          done
-        if test "$dblib" = "no"; then
-	    LIBS="$saved_LIBS -ldb"
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-#include <db.h>
-int
-main ()
-{
-db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	dblib="no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        fi
-	LIBS=$saved_LIBS
-
-	LDFLAGS=$BDB_SAVE_LDFLAGS
-
-else
-  dblib="no"
-fi
-
-
-
-	CPPFLAGS=$cmu_save_CPPFLAGS
-
-	if test "$dblib" = no; then
-	  	  if test "${ac_cv_header_ndbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
-$as_echo_n "checking ndbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <ndbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
-$as_echo_n "checking ndbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ndbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
-$as_echo_n "checking for ndbm.h... " >&6; }
-if test "${ac_cv_header_ndbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_ndbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
-$as_echo "$ac_cv_header_ndbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_ndbm_h" = x""yes; then
-
-		{ $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
-$as_echo_n "checking for dbm_open in -lndbm... " >&6; }
-if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lndbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ndbm_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ndbm_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
-$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
-if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
-  dblib="ndbm"; SASL_DB_LIB="-lndbm"
-else
-  dblib="weird"
-fi
-
-else
-  dblib="no"
-fi
-
-
-	  if test "$dblib" = "weird"; then
-	                { $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
-$as_echo_n "checking for dbm_open... " >&6; }
-if test "${ac_cv_func_dbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dbm_open innocuous_dbm_open
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dbm_open (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dbm_open
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbm_open ();
-/* 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_dbm_open || defined __stub___dbm_open
-choke me
-#endif
-
-int
-main ()
-{
-return dbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_dbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
-$as_echo "$ac_cv_func_dbm_open" >&6; }
-if test "x$ac_cv_func_dbm_open" = x""yes; then
-  dblib="ndbm"
-else
-  dblib="no"
-fi
-
-	  fi
-
-	  if test "$dblib" = no; then
-               	    if test "${ac_cv_header_gdbm_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
-$as_echo_n "checking gdbm.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gdbm.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
-$as_echo_n "checking gdbm.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gdbm.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
-$as_echo_n "checking for gdbm.h... " >&6; }
-if test "${ac_cv_header_gdbm_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_gdbm_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
-$as_echo "$ac_cv_header_gdbm_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gdbm_h" = x""yes; then
-
-		{ $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgdbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gdbm_open ();
-int
-main ()
-{
-return gdbm_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_gdbm_gdbm_open=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_gdbm_gdbm_open=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
-  dblib="gdbm";
-					     SASL_DB_LIB="-lgdbm"
-else
-  dblib="no"
-fi
-
-else
-  dblib="no"
-fi
-
-
-	  fi
-	else
-	  	  CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
-	  SASL_DB_INC=$BDB_INCADD
-          SASL_DB_LIB="${BDB_LIBADD}"
-	fi
-	;;
-  none)
-	;;
-  no)
-	;;
-  *)
-	{ $as_echo "$as_me:$LINENO: WARNING: Bad DB library implementation specified;" >&5
-$as_echo "$as_me: WARNING: Bad DB library implementation specified;" >&2;}
-	{ { $as_echo "$as_me:$LINENO: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&5
-$as_echo "$as_me: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&2;}
-   { (exit 1); exit 1; }; }
-	dblib=no
-	;;
-esac
-LIBS="$cmu_save_LIBS"
-
-{ $as_echo "$as_me:$LINENO: checking DB library to use" >&5
-$as_echo_n "checking DB library to use... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $dblib" >&5
-$as_echo "$dblib" >&6; }
-
-SASL_DB_BACKEND="db_${dblib}.lo"
-SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
-SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
-SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
-SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
-
-case "$dblib" in
-  gdbm)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-
-cat >>confdefs.h <<\_ACEOF
-#define SASL_GDBM /**/
-_ACEOF
-
-    ;;
-  ndbm)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-
-cat >>confdefs.h <<\_ACEOF
-#define SASL_NDBM /**/
-_ACEOF
-
-    ;;
-  berkeley)
-    SASL_MECHS="$SASL_MECHS libsasldb.la"
-
-cat >>confdefs.h <<\_ACEOF
-#define SASL_BERKELEYDB /**/
-_ACEOF
-
-    ;;
-  *)
-    { $as_echo "$as_me:$LINENO: WARNING: Disabling SASL authentication database support" >&5
-$as_echo "$as_me: WARNING: Disabling SASL authentication database support" >&2;}
-            SASL_DB_BACKEND="db_none.lo"
-    SASL_DB_BACKEND_STATIC="db_none.o"
-    SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
-    SASL_DB_UTILS=""
-    SASL_DB_MANS=""
-    SASL_DB_LIB=""
-    ;;
-esac
-
-if test "$enable_static" = yes; then
-    if test "$dblib" != "none"; then
-      SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
-      SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_SASLDB /**/
-_ACEOF
-
-    else
-      SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
-      SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
-    fi
-fi
-
-
-
-
-
-
-
-
-  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
-fi
-
-# Check whether --enable-httpform was given.
-if test "${enable_httpform+set}" = set; then
-  enableval=$enable_httpform; httpform=$enableval
-else
-  httpform=no
-fi
-
-if test "$httpform" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HTTPFORM /**/
-_ACEOF
-
-fi
-
-
-# Check whether --with-pam was given.
-if test "${with_pam+set}" = set; then
-  withval=$with_pam; with_pam=$withval
-else
-  with_pam=yes
-fi
-
-if test "$with_pam" != no; then
-  if test -d $with_pam; then
-    CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
-    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
-  fi
-  cmu_save_LIBS="$LIBS"
-  { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
-$as_echo_n "checking for pam_start in -lpam... " >&6; }
-if test "${ac_cv_lib_pam_pam_start+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpam $SASL_DL_LIB $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pam_start ();
-int
-main ()
-{
-return pam_start ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_pam_pam_start=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_pam_pam_start=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
-$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
-if test "x$ac_cv_lib_pam_pam_start" = x""yes; then
-
-	  if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
-$as_echo_n "checking for security/pam_appl.h... " >&6; }
-if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
-$as_echo "$ac_cv_header_security_pam_appl_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
-$as_echo_n "checking security/pam_appl.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <security/pam_appl.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
-$as_echo_n "checking security/pam_appl.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <security/pam_appl.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
-$as_echo_n "checking for security/pam_appl.h... " >&6; }
-if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_security_pam_appl_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
-$as_echo "$ac_cv_header_security_pam_appl_h" >&6; }
-
-fi
-if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then
-  :
-else
-  with_pam=no
-fi
-
-
-else
-  with_pam=no
-fi
-
-  LIBS="$cmu_save_LIBS"
-fi
-
-
-# Check whether --with-ipctype was given.
-if test "${with_ipctype+set}" = set; then
-  withval=$with_ipctype; with_ipctype=$withval
-else
-  with_ipctype="unix"
-fi
-
-MAIN_COMPAT_OBJ="saslauthd-${with_ipctype}.o"
-
-if test "$with_ipctype" = "doors"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_DOORS /**/
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SASLAUTHD_THREADED /**/
-_ACEOF
-
-  LIBS="$LIBS -ldoor -lpthread"
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for PAM support" >&5
-$as_echo_n "checking for PAM support... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $with_pam" >&5
-$as_echo "$with_pam" >&6; }
-LIB_PAM=""
-if test "$with_pam" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PAM /**/
-_ACEOF
-
-  LIB_PAM="-lpam"
-fi
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
-$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_aton ();
-int
-main ()
-{
-return inet_aton ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_resolv_inet_aton=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_resolv_inet_aton=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
-$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
-if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
-
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking to include LDAP support" >&5
-$as_echo_n "checking to include LDAP support... " >&6; }
-
-# Check whether --with-ldap was given.
-if test "${with_ldap+set}" = set; then
-  withval=$with_ldap; with_ldap=$withval
-else
-  with_ldap=no
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $with_ldap" >&5
-$as_echo "$with_ldap" >&6; }
-
-if test -d $with_ldap; then
-    CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
-
-  # this is CMU ADD LIBPATH
-  if test "$andrew_cv_runpath_switch" = "none" ; then
-	LDFLAGS="-L${with_ldap}/lib ${LDFLAGS}"
-  else
-	LDFLAGS="-L${with_ldap}/lib $andrew_cv_runpath_switch${with_ldap}/lib ${LDFLAGS}"
-  fi
-
-fi
-
-LDAP_LIBS=""
-if test "$with_ldap" != no; then
-  { $as_echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
-$as_echo_n "checking for ldap_initialize in -lldap... " >&6; }
-if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap -llber $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ldap_initialize ();
-int
-main ()
-{
-return ldap_initialize ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ldap_ldap_initialize=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ldap_ldap_initialize=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_initialize" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LDAP /**/
-_ACEOF
-
-                                        LDAP_LIBS="-lldap -llber"
-					if test "$with_openssl" != "no"; then
-					    LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
-					fi
-fi
-
-
-fi
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  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 <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#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))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-
-int
-main ()
-{
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_sys_wait_h=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_sys_wait_h=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-if test $ac_cv_header_sys_wait_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_WAIT_H 1
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_time=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_time=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-fi
-
-
-
-
-
-
-
-
-
-for ac_header in crypt.h fcntl.h krb5.h strings.h syslog.h unistd.h sys/time.h sys/uio.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* 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";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 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;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_const=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_c_const=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const /**/
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
-$as_echo_n "checking for pid_t... " >&6; }
-if test "${ac_cv_type_pid_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_type_pid_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (pid_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((pid_t)))
-	  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_pid_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-$as_echo "$ac_cv_type_pid_t" >&6; }
-if test "x$ac_cv_type_pid_t" = x""yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
-
-fi
-
-
-LTLIBOBJS=`echo "$LIBOBJS" | sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'`
-
-
-{ $as_echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
-$as_echo_n "checking whether $CC implements __func__... " >&6; }
-if test "${have_func+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-printf("%s", __func__);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  have_func=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	have_func=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $have_func" >&5
-$as_echo "$have_func" >&6; }
-if test "$have_func" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FUNC /**/
-_ACEOF
-
-else
-       { $as_echo "$as_me:$LINENO: checking whether $CC implements __PRETTY_FUNCTION__" >&5
-$as_echo_n "checking whether $CC implements __PRETTY_FUNCTION__... " >&6; }
-       if test "${have_pretty_function+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-printf("%s", __PRETTY_FUNCTION__);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  have_pretty_function=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	have_pretty_function=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-
-       { $as_echo "$as_me:$LINENO: result: $have_pretty_function" >&5
-$as_echo "$have_pretty_function" >&6; }
-       if test "$have_pretty_function" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PRETTY_FUNCTION /**/
-_ACEOF
-
-       else
-               { $as_echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
-$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
-               if test "${have_function+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-printf("%s", __FUNCTION__);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  have_function=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	have_function=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-
-               { $as_echo "$as_me:$LINENO: result: $have_function" >&5
-$as_echo "$have_function" >&6; }
-               if test "$have_function" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FUNCTION /**/
-_ACEOF
-
-               fi
-       fi
-fi
-
-{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_signal=int
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_signal=void
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
-
-
-
-for ac_func in gethostname mkdir socket strdup
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-for ac_func in getspnam getuserpw
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- break
-fi
-done
-
-
-
-
-for ac_func in asprintf strlcat strlcpy
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-if test $ac_cv_func_getspnam = yes; then
-	{ $as_echo "$as_me:$LINENO: checking if getpwnam_r/getspnam_r take 5 arguments" >&5
-$as_echo_n "checking if getpwnam_r/getspnam_r take 5 arguments... " >&6; }
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <pwd.h>
-#include <shadow.h>
-
-int
-main ()
-{
-
-struct passwd *pw;
-struct passwd pwbuf;
-char pwdata[512];
-(void) getpwnam_r("bin", &pwbuf, pwdata, sizeof(pwdata), &pw);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define GETXXNAM_R_5ARG 1
-_ACEOF
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-GETADDRINFOOBJS=""
-sasl_cv_getaddrinfo=no
-
-{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
-$as_echo_n "checking for getaddrinfo... " >&6; }
-if test "${ac_cv_func_getaddrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getaddrinfo innocuous_getaddrinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getaddrinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getaddrinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaddrinfo ();
-/* 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_getaddrinfo || defined __stub___getaddrinfo
-choke me
-#endif
-
-int
-main ()
-{
-return getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_getaddrinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_getaddrinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
-$as_echo "$ac_cv_func_getaddrinfo" >&6; }
-if test "x$ac_cv_func_getaddrinfo" = x""yes; then
-    ac_cv_lib_socket_getaddrinfo=no
-  ac_cv_lib_inet6_getaddrinfo=no
-
-else
-    { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
-$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaddrinfo ();
-int
-main ()
-{
-return getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_getaddrinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_getaddrinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
-$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
-if test "x$ac_cv_lib_socket_getaddrinfo" = x""yes; then
-      LIBS="$LIBS -lsocket"
-    ac_cv_lib_inet6_getaddrinfo=no
-
-else
-      { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
-$as_echo_n "checking whether your system has IPv6 directory... " >&6; }
-    if test "${ipv6_cv_dir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-        for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
-	if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
-	  break
-	fi
-      done
-fi
-    { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
-$as_echo "$ipv6_cv_dir" >&6; }
-    if test $ipv6_cv_dir = no; then
-      ac_cv_lib_inet6_getaddrinfo=no
-    else
-      if test x$ipv6_libinet6 = x; then
-	ipv6_libinet6=no
-	SAVELDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
-      fi
-      { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
-$as_echo_n "checking for getaddrinfo in -linet6... " >&6; }
-if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet6  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaddrinfo ();
-int
-main ()
-{
-return getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_inet6_getaddrinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_inet6_getaddrinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
-$as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; }
-if test "x$ac_cv_lib_inet6_getaddrinfo" = x""yes; then
-  	if test $ipv6_libinet6 = no; then
-	  ipv6_libinet6=yes
-	  LIBS="$LIBS -linet6"
-	fi
-fi
-      if test $ipv6_libinet6 = no; then
-	LDFLAGS="$SAVELDFLAGS"
-      fi
-    fi
-fi
-
-fi
-ipv6_cv_getaddrinfo=no
-if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
-     -o $ac_cv_lib_inet6_getaddrinfo = yes
-then
-  ipv6_cv_getaddrinfo=yes
-fi
-if test $ipv6_cv_getaddrinfo = no; then
-  if test getaddrinfo = getaddrinfo; then
-    for ipv6_cv_pfx in o n; do
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
-  as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
-$as_echo_n "checking for ${ipv6_cv_pfx}getaddrinfo... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef ${ipv6_cv_pfx}getaddrinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ${ipv6_cv_pfx}getaddrinfo ();
-/* 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_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
-choke me
-#endif
-
-int
-main ()
-{
-return ${ipv6_cv_pfx}getaddrinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-
-fi
-rm -f conftest*
-
-      if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-        ipv6_cv_getaddrinfo=yes
-        break
-      fi
-    done
-  fi
-fi
-if test $ipv6_cv_getaddrinfo = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-else
-  sasl_cv_getaddrinfo=yes
-fi
-if test $sasl_cv_getaddrinfo = yes; then
-	case " $LIBOBJS " in
-  *" getaddrinfo.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
- ;;
-esac
-
-fi
-
-GETNAMEINFOOBJS=""
-sasl_cv_getnameinfo=no
-
-{ $as_echo "$as_me:$LINENO: checking for getnameinfo" >&5
-$as_echo_n "checking for getnameinfo... " >&6; }
-if test "${ac_cv_func_getnameinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getnameinfo innocuous_getnameinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getnameinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getnameinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-/* 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_getnameinfo || defined __stub___getnameinfo
-choke me
-#endif
-
-int
-main ()
-{
-return getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_getnameinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_getnameinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
-$as_echo "$ac_cv_func_getnameinfo" >&6; }
-if test "x$ac_cv_func_getnameinfo" = x""yes; then
-    ac_cv_lib_socket_getnameinfo=no
-  ac_cv_lib_inet6_getnameinfo=no
-
-else
-    { $as_echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
-$as_echo_n "checking for getnameinfo in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-int
-main ()
-{
-return getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_socket_getnameinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_getnameinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
-$as_echo "$ac_cv_lib_socket_getnameinfo" >&6; }
-if test "x$ac_cv_lib_socket_getnameinfo" = x""yes; then
-      LIBS="$LIBS -lsocket"
-    ac_cv_lib_inet6_getnameinfo=no
-
-else
-      { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
-$as_echo_n "checking whether your system has IPv6 directory... " >&6; }
-    if test "${ipv6_cv_dir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-        for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
-	if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
-	  break
-	fi
-      done
-fi
-    { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
-$as_echo "$ipv6_cv_dir" >&6; }
-    if test $ipv6_cv_dir = no; then
-      ac_cv_lib_inet6_getnameinfo=no
-    else
-      if test x$ipv6_libinet6 = x; then
-	ipv6_libinet6=no
-	SAVELDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
-      fi
-      { $as_echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
-$as_echo_n "checking for getnameinfo in -linet6... " >&6; }
-if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet6  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-int
-main ()
-{
-return getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_inet6_getnameinfo=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_inet6_getnameinfo=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
-$as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; }
-if test "x$ac_cv_lib_inet6_getnameinfo" = x""yes; then
-  	if test $ipv6_libinet6 = no; then
-	  ipv6_libinet6=yes
-	  LIBS="$LIBS -linet6"
-	fi
-fi
-      if test $ipv6_libinet6 = no; then
-	LDFLAGS="$SAVELDFLAGS"
-      fi
-    fi
-fi
-
-fi
-ipv6_cv_getnameinfo=no
-if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
-     -o $ac_cv_lib_inet6_getnameinfo = yes
-then
-  ipv6_cv_getnameinfo=yes
-fi
-if test $ipv6_cv_getnameinfo = no; then
-  if test getnameinfo = getaddrinfo; then
-    for ipv6_cv_pfx in o n; do
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
-  as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
-$as_echo_n "checking for ${ipv6_cv_pfx}getnameinfo... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef ${ipv6_cv_pfx}getnameinfo
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ${ipv6_cv_pfx}getnameinfo ();
-/* 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_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
-choke me
-#endif
-
-int
-main ()
-{
-return ${ipv6_cv_pfx}getnameinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-
-fi
-rm -f conftest*
-
-      if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO /**/
-_ACEOF
-
-        ipv6_cv_getnameinfo=yes
-        break
-      fi
-    done
-  fi
-fi
-if test $ipv6_cv_getnameinfo = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETNAMEINFO /**/
-_ACEOF
-
-else
-  sasl_cv_getnameinfo=yes
-fi
-if test $sasl_cv_getnameinfo = yes; then
-	case " $LIBOBJS " in
-  *" getnameinfo.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS getnameinfo.$ac_objext"
- ;;
-esac
-
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
-$as_echo_n "checking whether you have ss_family in struct sockaddr_storage... " >&6; }
-if test "${ipv6_cv_ss_family+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr_storage ss; int i = ss.ss_family;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ipv6_cv_ss_family=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ipv6_cv_ss_family=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test $ipv6_cv_ss_family = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SS_FAMILY /**/
-_ACEOF
-
-else
-  :
-fi
-{ $as_echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
-$as_echo "$ipv6_cv_ss_family" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
-$as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; }
-if test "${ipv6_cv_sa_len+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr sa; int i = sa.sa_len;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ipv6_cv_sa_len=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ipv6_cv_sa_len=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test $ipv6_cv_sa_len = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKADDR_SA_LEN /**/
-_ACEOF
-
-else
-  :
-fi
-{ $as_echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
-$as_echo "$ipv6_cv_sa_len" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
-$as_echo_n "checking for socklen_t... " >&6; }
-if test "${ipv6_cv_socklen_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-socklen_t len = 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ipv6_cv_socklen_t=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ipv6_cv_socklen_t=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-if test $ipv6_cv_socklen_t = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKLEN_T /**/
-_ACEOF
-
-else
-  :
-fi
-{ $as_echo "$as_me:$LINENO: result: $ipv6_cv_socklen_t" >&5
-$as_echo "$ipv6_cv_socklen_t" >&6; }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/socket.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "sockaddr_storage" >/dev/null 2>&1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE /**/
-_ACEOF
-
-fi
-rm -f conftest*
-
-
-
-
-
-
-
-
-ac_config_headers="$ac_config_headers saslauthd.h"
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# 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, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# 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.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${SASLAUTHD_TRUE}" && test -z "${SASLAUTHD_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"SASLAUTHD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"SASLAUTHD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
- if test -n "$EXEEXT"; then
-  am__EXEEXT_TRUE=
-  am__EXEEXT_FALSE='#'
-else
-  am__EXEEXT_TRUE='#'
-  am__EXEEXT_FALSE=
-fi
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf at gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "saslauthd.h") CONFIG_HEADERS="$CONFIG_HEADERS saslauthd.h" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr='
'
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #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.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$_am_arg" : 'X\(//\)[^/]' \| \
-	 X"$_am_arg" : 'X\(//\)$' \| \
-	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      { as_dir=$dirpart/$fdir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/saslauthd/configure.in b/saslauthd/configure.in
deleted file mode 100644
index 0addcf4..0000000
--- a/saslauthd/configure.in
+++ /dev/null
@@ -1,340 +0,0 @@
-AC_INIT(mechanisms.h)
-AC_PREREQ([2.54])
-
-AC_CONFIG_AUX_DIR(config)
-AC_CANONICAL_HOST
-
-dnl Should we enable SASLAUTHd at all?
-AC_ARG_WITH(saslauthd, [  --with-saslauthd=DIR    enable use of the saslauth daemon using state dir DIR ],
-		with_saslauthd=$withval,
-		with_saslauthd=yes)
-  if test "$with_saslauthd" = yes; then
-    with_saslauthd="/var/state/saslauthd"
-  fi
-  AC_DEFINE(HAVE_SASLAUTHD,[],[Include support for saslauthd?])
-  AC_DEFINE_UNQUOTED(PATH_SASLAUTHD_RUNDIR, "$with_saslauthd",[Location of saslauthd socket])
-AM_CONDITIONAL(SASLAUTHD, test "$with_saslauthd" != no)
-
-AM_INIT_AUTOMAKE(saslauthd,2.1.26)
-CMU_INIT_AUTOMAKE
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_AWK
-AC_PROG_MAKE_SET
-AC_PROG_LN_S
-AC_PROG_INSTALL
-
-dnl Checks for build foo
-CMU_C___ATTRIBUTE__
-CMU_GUESS_RUNPATH_SWITCH
-
-dnl Checks for libraries.
-CMU_SOCKETS
-
-CMU_HAVE_OPENSSL
-AC_MSG_CHECKING(for OpenSSL)
-AC_MSG_RESULT($with_openssl)
-
-SASL_DES_CHK
-
-dnl mechanism-related checking
-SASL_KERBEROS_V4_CHK
-SASL_GSSAPI_CHK
-
-if test "$gssapi" != no; then
-	if test "$gss_impl" = "heimdal"; then
-	    AC_DEFINE(KRB5_HEIMDAL,[],[Using Heimdal])
-	fi
-	AC_DEFINE(HAVE_GSSAPI,[],[Include GSSAPI/Kerberos 5 Support])
-fi
-
-SASL2_CRYPT_CHK
-
-AC_ARG_ENABLE(sia, [  --enable-sia            enable SIA authentication [no] ],
-  sia=$enableval,
-  sia=no)
-LIB_SIA=""
-if test "$sia" != no; then
-  if test -f /etc/sia/matrix.conf; then
-    AC_DEFINE(HAVE_SIA,[],[Include SIA Support])
-    LIB_SIA="-lsecurity -ldb -lm -laud"
-  else
-    AC_ERROR([No support for SIA found])
-  fi
-fi
-AC_SUBST(LIB_SIA)
-
-AC_ARG_ENABLE(auth-sasldb, [  --enable-auth-sasldb    enable experimental SASLdb authentication module [no] ],
-  authsasldb=$enableval,
-  authsasldb=no)
-if test "$authsasldb" != no; then
-  if test ! -d "../sasldb"; then
-     echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
-     exit 0;
-  fi
-  AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
-  SASL_DB_PATH_CHECK()
-  SASL_DB_CHECK()
-  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
-fi
-
-AC_ARG_ENABLE(httpform, [  --enable-httpform       enable HTTP form authentication [[no]] ],
-  httpform=$enableval,
-  httpform=no)
-if test "$httpform" != no; then
-  AC_DEFINE(HAVE_HTTPFORM,[],[Include HTTP form Support])
-fi
-
-AC_ARG_WITH(pam, [  --with-pam=DIR          use PAM (rooted in DIR) [yes] ],
-	with_pam=$withval,
-	with_pam=yes)
-if test "$with_pam" != no; then
-  if test -d $with_pam; then
-    CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
-    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
-  fi
-  cmu_save_LIBS="$LIBS"
-  AC_CHECK_LIB(pam, pam_start, [
-	  AC_CHECK_HEADER(security/pam_appl.h,,
-			  with_pam=no)],
-		with_pam=no, $SASL_DL_LIB)
-  LIBS="$cmu_save_LIBS"
-fi
-
-AC_ARG_WITH(ipctype, [  --with-ipctype={unix,doors}    use ipctype [unix] ],
-	with_ipctype=$withval,
-	with_ipctype="unix")
-MAIN_COMPAT_OBJ="saslauthd-${with_ipctype}.o"
-AC_SUBST(MAIN_COMPAT_OBJ)
-if test "$with_ipctype" = "doors"; then
-  AC_DEFINE(USE_DOORS,[],[Use the doors IPC API])
-  AC_DEFINE(SASLAUTHD_THREADED,[],[Saslauthd runs threaded?])
-  LIBS="$LIBS -ldoor -lpthread"
-fi
-
-AC_MSG_CHECKING(for PAM support)
-AC_MSG_RESULT($with_pam)
-LIB_PAM=""
-if test "$with_pam" != no; then
-  AC_DEFINE(HAVE_PAM,[],[Support for PAM?])
-  LIB_PAM="-lpam"
-fi
-AC_SUBST(LIB_PAM)
-
-AC_CHECK_LIB(resolv, inet_aton)
-
-AC_MSG_CHECKING(to include LDAP support)
-AC_ARG_WITH(ldap, [  --with-ldap=DIR         use LDAP (in DIR) [no] ],
-	with_ldap=$withval,
-	with_ldap=no)
-AC_MSG_RESULT($with_ldap)
-
-if test -d $with_ldap; then
-    CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
-    CMU_ADD_LIBPATH(${with_ldap}/lib)
-fi
-
-LDAP_LIBS=""
-if test "$with_ldap" != no; then
-  AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Support for LDAP?])
-                                        LDAP_LIBS="-lldap -llber"
-					if test "$with_openssl" != "no"; then
-					    LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
-					fi],,-llber)
-  
-fi
-AC_SUBST(LDAP_LIBS)
-
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-AC_CHECK_HEADERS(crypt.h fcntl.h krb5.h strings.h syslog.h unistd.h sys/time.h sys/uio.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST  
-AC_TYPE_PID_T
-
-LTLIBOBJS=`echo "$LIB@&t at OBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
-AC_SUBST(LTLIBOBJS)
-
-dnl Checks for which function macros exist
-AC_MSG_CHECKING(whether $CC implements __func__)
-AC_CACHE_VAL(have_func,
-[AC_TRY_LINK([#include <stdio.h>],[printf("%s", __func__);],
-have_func=yes,
-have_func=no)])
-AC_MSG_RESULT($have_func)
-if test "$have_func" = yes; then
-       AC_DEFINE(HAVE_FUNC,[],[Does the compiler understand __func__])
-else
-       AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
-       AC_CACHE_VAL(have_pretty_function,
-       [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __PRETTY_FUNCTION__);],
-       have_pretty_function=yes,
-       have_pretty_function=no)])
-       AC_MSG_RESULT($have_pretty_function)
-       if test "$have_pretty_function" = yes; then
-               AC_DEFINE(HAVE_PRETTY_FUNCTION,[],[Does compiler understand __PRETTY_FUNCTION__])
-       else
-               AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
-               AC_CACHE_VAL(have_function,
-               [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __FUNCTION__);],
-               have_function=yes,
-               have_function=no)])
-               AC_MSG_RESULT($have_function)
-               if test "$have_function" = yes; then
-                       AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__])
-               fi
-       fi
-fi
-
-dnl Checks for library functions.
-AC_TYPE_SIGNAL
-AC_CHECK_FUNCS(gethostname mkdir socket strdup)
-dnl Only look for one or the other
-AC_CHECK_FUNCS(getspnam getuserpw, break)
-AC_CHECK_FUNCS(asprintf strlcat strlcpy)
-
-if test $ac_cv_func_getspnam = yes; then
-	AC_MSG_CHECKING(if getpwnam_r/getspnam_r take 5 arguments)
-	AC_TRY_COMPILE(
-		[
-#include <sys/types.h>
-#include <pwd.h>
-#include <shadow.h>
-		],
-		[
-struct passwd *pw;
-struct passwd pwbuf;
-char pwdata[512];
-(void) getpwnam_r("bin", &pwbuf, pwdata, sizeof(pwdata), &pw);
-		],
-		[AC_MSG_RESULT(yes)
-		 AC_DEFINE(GETXXNAM_R_5ARG, 1,
-			[Define if your getpwnam_r()/getspnam_r()
-			functions take 5 arguments])],
-		[AC_MSG_RESULT(no)]
-	)
-fi
-
-dnl Check for getaddrinfo
-GETADDRINFOOBJS=""
-sasl_cv_getaddrinfo=no
-IPv6_CHECK_FUNC(getaddrinfo,
-		[AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo() function?])], [sasl_cv_getaddrinfo=yes])
-if test $sasl_cv_getaddrinfo = yes; then
-	AC_LIBOBJ(getaddrinfo)
-fi
-
-dnl Check for getnameinfo
-GETNAMEINFOOBJS=""
-sasl_cv_getnameinfo=no
-IPv6_CHECK_FUNC(getnameinfo,
-		[AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo() function?])], [sasl_cv_getnameinfo=yes])
-if test $sasl_cv_getnameinfo = yes; then
-	AC_LIBOBJ(getnameinfo)
-fi
-
-IPv6_CHECK_SS_FAMILY()
-IPv6_CHECK_SA_LEN()
-IPv6_CHECK_SOCKLEN_T()
-
-AC_EGREP_HEADER(sockaddr_storage, sys/socket.h,
-                AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have a sockaddr_storage struct?]))
-
-AH_TOP([
-#ifndef _SASLAUTHD_H
-#define _SASLAUTHD_H
-
-#include <stdio.h>
-])
-
-AH_BOTTOM([
-
-#ifndef HAVE___ATTRIBUTE__
-/* Can't use attributes... */
-#define __attribute__(foo)
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifndef WIN32
-# include <netdb.h>   
-# include <sys/param.h>
-#else /* WIN32 */
-# include <winsock2.h>
-#endif /* WIN32 */ 
-#include <string.h>
-
-#include <netinet/in.h>
-
-#ifndef HAVE_SOCKLEN_T
-typedef unsigned int socklen_t;
-#endif /* HAVE_SOCKLEN_T */
-
-#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
-#define _SS_MAXSIZE     128     /* Implementation specific max size */
-#define _SS_PADSIZE     (_SS_MAXSIZE - sizeof (struct sockaddr))
-
-struct sockaddr_storage {
-        struct  sockaddr ss_sa;
-        char            __ss_pad2[_SS_PADSIZE];
-};
-# define ss_family ss_sa.sa_family
-#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
-
-#ifndef AF_INET6
-/* Define it to something that should never appear */
-#define AF_INET6        AF_MAX
-#endif
-
-/* Create a struct iovec if we need one */
-#if !defined(HAVE_SYS_UIO_H)
-struct iovec {
-    long iov_len;
-    char *iov_base;
-};
-#else
-#include <sys/types.h>
-#include <sys/uio.h>
-#endif
-
-#ifndef HAVE_GETADDRINFO
-#define getaddrinfo     sasl_getaddrinfo
-#define freeaddrinfo    sasl_freeaddrinfo
-#define getnameinfo     sasl_getnameinfo
-#define gai_strerror    sasl_gai_strerror
-#include "gai.h"
-#endif
-
-#ifndef AI_NUMERICHOST   /* support glibc 2.0.x */
-#define	AI_NUMERICHOST	4
-#define NI_NUMERICHOST	2
-#define NI_NAMEREQD	4
-#define NI_NUMERICSERV	8
-#endif
-
-/* handy string manipulation functions */
-#ifndef HAVE_STRLCPY
-extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
-#define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
-#endif
-#ifndef HAVE_STRLCAT
-extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
-#define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
-#endif
-#ifndef HAVE_ASPRINTF
-extern int asprintf(char **str, const char *fmt, ...);
-#endif
-
-#endif
-])
-
-AC_CONFIG_HEADERS(saslauthd.h)
-
-AC_OUTPUT(Makefile)
diff --git a/saslauthd/ipc_unix.c b/saslauthd/ipc_unix.c
index f82a245..58a1fa6 100644
--- a/saslauthd/ipc_unix.c
+++ b/saslauthd/ipc_unix.c
@@ -232,7 +232,7 @@ void ipc_loop() {
 			continue;
 		}
 
-        	conn_fd = accept(sock_fd, (struct sockaddr *)&client, &len);
+        	conn_fd = accept(sock_fd, (struct sockaddr *)&client, (unsigned int *) &len);
 		rc = errno;
 
 		rel_accept_lock();
diff --git a/saslauthd/krbtf.c b/saslauthd/krbtf.c
index 9084c1c..370850d 100644
--- a/saslauthd/krbtf.c
+++ b/saslauthd/krbtf.c
@@ -56,6 +56,7 @@
 
 /* PUBLIC DEPENDENCIES */
 #include <unistd.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 
@@ -90,7 +91,7 @@ static char tf_dir[] = PATH_SASLAUTHD_RUNDIR "/.tf";
 static char *tfn_cookie = 0;
 static int tfn_cookie_len = 0;
 static char pidstring[80];
-int pidstring_len = 0;
+size_t pidstring_len = 0;
 /* END PRIVATE DEPENDENCIES */
 
 #endif /* WANT_KRBTF */
diff --git a/saslauthd/lak.c b/saslauthd/lak.c
index 419a658..17f58ba 100644
--- a/saslauthd/lak.c
+++ b/saslauthd/lak.c
@@ -835,7 +835,12 @@ static int lak_connect(
 
 	rc = ldap_set_option(lak->ld, LDAP_OPT_NETWORK_TIMEOUT, &(lak->conf->timeout));
 	if (rc != LDAP_OPT_SUCCESS) {
-		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
+		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %ld.%ld.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
+	}
+
+	rc = ldap_set_option(lak->ld, LDAP_OPT_TIMEOUT, &(lak->conf->timeout));
+	if (rc != LDAP_OPT_SUCCESS) {
+		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMEOUT %ld.%ld.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
 	}
 
 	rc = ldap_set_option(lak->ld, LDAP_OPT_TIMELIMIT, &(lak->conf->time_limit));
@@ -1722,13 +1727,13 @@ static int lak_base64_decode(
 		return LAK_NOMEM;
 
 	EVP_DecodeInit(&EVP_ctx);
-	rc = EVP_DecodeUpdate(&EVP_ctx, text, &i, (char *)src, strlen(src));
+	rc = EVP_DecodeUpdate(&EVP_ctx, (unsigned char *) text, &i, (const unsigned char *)src, strlen(src));
 	if (rc < 0) {
 		free(text);
 		return LAK_FAIL;
 	}
 	tlen += i;
-	EVP_DecodeFinal(&EVP_ctx, text, &i); 
+	EVP_DecodeFinal(&EVP_ctx, (unsigned char *) text, &i);
 
 	*ret = text;
 	if (rlen != NULL)
diff --git a/saslauthd/mechanisms.h b/saslauthd/mechanisms.h
index e2323bf..3ed8d1c 100644
--- a/saslauthd/mechanisms.h
+++ b/saslauthd/mechanisms.h
@@ -32,7 +32,7 @@
 #ifndef _MECHANISMS_H
 #define _MECHANISMS_H
 
-#include "saslauthd.h"
+#include <config.h>
 
 /* PUBLIC DEPENDENCIES */
 /* Authentication mechanism dispatch table definition */
diff --git a/saslauthd/saslauthd-main.c b/saslauthd/saslauthd-main.c
index 5d9ca8a..e869eb3 100644
--- a/saslauthd/saslauthd-main.c
+++ b/saslauthd/saslauthd-main.c
@@ -631,7 +631,6 @@ void detach_tty() {
     int		null_fd;
     int         exit_result;
     pid_t      	pid;
-    char       	pid_buf[100];
     struct flock	lockinfo;
     
     /**************************************************************
@@ -893,7 +892,6 @@ void handle_sigchld() {
  * Do some final cleanup here.
  **************************************************************/
 void server_exit() {
-	struct flock    lock_st;
 
 	/*********************************************************
 	 * If we're not the master process, don't do anything
diff --git a/saslauthd/saslauthd-main.h b/saslauthd/saslauthd-main.h
index 87d223b..754626c 100644
--- a/saslauthd/saslauthd-main.h
+++ b/saslauthd/saslauthd-main.h
@@ -45,8 +45,9 @@
 #ifndef _SASLAUTHDMAIN_H
 #define _SASLAUTHDMAIN_H
 
+#include <config.h>
+
 #include <sys/types.h>
-#include "saslauthd.h"
 
 /****************************************************************
  * Plug in some autoconf magic to determine what IPC method
diff --git a/saslauthd/saslauthd.8 b/saslauthd/saslauthd.8
deleted file mode 100644
index 843edb0..0000000
--- a/saslauthd/saslauthd.8
+++ /dev/null
@@ -1,191 +0,0 @@
-SASLAUTHD(8)              BSD System Manager’s Manual             SASLAUTHD(8)
-
-NNAAMMEE
-     ssaassllaauutthhdd - sasl authentication server
-
-SSYYNNOOPPSSIISS
-     ssaassllaauutthhdd --aa _a_u_t_h_m_e_c_h [--TTvvddcchhllrr] [--OO _o_p_t_i_o_n] [--mm _m_u_x___p_a_t_h] [--nn _t_h_r_e_a_d_s]
-               [--ss _s_i_z_e] [--tt _t_i_m_e_o_u_t]
-
-DDEESSCCRRIIPPTTIIOONN
-     ssaassllaauutthhdd is a daemon process that handles plaintext authentication
-     requests on behalf of the SASL library.
-
-     The server fulfills two roles: it isolates all code requiring superuser
-     privileges into a single process, and it can be used to provide _p_r_o_x_y
-     authentication services to clients that do not understand SASL based
-     authentication.
-
-     ssaassllaauutthhdd should be started from the system boot scripts when going to
-     multi-user mode. When running against a protected authentication database
-     (e.g. the shadow mechanism), it must be run as the superuser.
-
-   OOppttiioonnss
-     Options named by lower-case letters configure the server itself.
-     Upper-case options control the behavior of specific authentication mecha-
-     nisms; their applicability to a particular authentication mechanism is
-     described in the _A_U_T_H_E_N_T_I_C_A_T_I_O_N _M_E_C_H_A_N_I_S_M_S section.
-
-     --aa _a_u_t_h_m_e_c_h
-             Use _a_u_t_h_m_e_c_h as the authentication mechanism. (See the
-             _A_U_T_H_E_N_T_I_C_A_T_I_O_N _M_E_C_H_A_N_I_S_M_S section below.) This parameter is
-             mandatory.
-
-     --OO _o_p_t_i_o_n
-             A mechanism specific option (e.g. rimap hostname or config file
-             path)
-
-     --HH _h_o_s_t_n_a_m_e
-             The remote host to be contacted by the rimap authentication mech-
-             anism. (Deprecated, use -O instead)
-
-     --mm _p_a_t_h
-             Use _p_a_t_h as the pathname to the named socket to listen on for
-             connection requests. This must be an absolute pathname, and MUST
-             NOT include the trailing "/mux".  Note that the default for this
-             value is "/var/state/saslauthd" (or what was specified at compile
-             time) and that this directory must exist for saslauthd to func-
-             tion.
-
-     --nn _t_h_r_e_a_d_s
-             Use _t_h_r_e_a_d_s processes for responding to authentication queries.
-             (default: 5)  A value of zero will indicate that saslauthd should
-             fork an individual process for each connection.  This can solve
-             leaks that occur in some deployments.
-
-     --ss _s_i_z_e
-             Use _s_i_z_e as the table size of the hash table (in kilobytes)
-
-     --tt _t_i_m_e_o_u_t
-             Use _t_i_m_e_o_u_t as the expiration time of the authentication cache
-             (in seconds)
-
-     --TT      Honour time-of-day login restrictions.
-
-     --hh      Show usage information
-
-     --cc      Enable caching of authentication credentials
-
-     --ll      Disable the use of a lock file for controlling access to
-             accept().
-
-     --rr      Combine the realm with the login (with an ’@’ sign in between).
-             e.g.  login: "foo" realm: "bar" will get passed as login:
-             "foo at bar".  Note that the realm will still be passed, which may
-             lead to unexpected behavior for authentication mechanisms that
-             make use of the realm, however for mechanisms which don’t, such
-             as _g_e_t_p_w_e_n_t, this is the only way to authenticate domain-specific
-             users sharing the same userid.
-
-     --vv      Print the version number and available authentication mechanisms
-             on standard error, then exit.
-
-     --dd      Debugging mode.
-
-   LLooggggiinngg
-     ssaassllaauutthhdd logs its activities via ssyyssllooggdd using the LOG_AUTH facility.
-
-AAUUTTHHEENNTTIICCAATTIIOONN MMEECCHHAANNIISSMMSS
-     ssaassllaauutthhdd supports one or more "authentication mechanisms", dependent
-     upon the facilities provided by the underlying operating system.  The
-     mechanism is selected by the --aa flag from the following list of choices:
-
-     dce        _(_A_I_X_)
-
-                Authenticate using the DCE authentication environment.
-
-     getpwent   _(_A_l_l _p_l_a_t_f_o_r_m_s_)
-
-                Authenticate using the ggeettppwweenntt() library function. Typically
-                this authenticates against the local password file. See your
-                system’s getpwent(3) man page for details.
-
-     kerberos4  _(_A_l_l _p_l_a_t_f_o_r_m_s_)
-
-                Authenticate against the local Kerberos 4 realm. (See the
-                _N_O_T_E_S section for caveats about this driver.)
-
-     kerberos5  _(_A_l_l _p_l_a_t_f_o_r_m_s_)
-
-                Authenticate against the local Kerberos 5 realm.
-
-     pam        _(_L_i_n_u_x_, _S_o_l_a_r_i_s_)
-
-                Authenticate using Pluggable Authentication Modules (PAM).
-
-     rimap      _(_A_l_l _p_l_a_t_f_o_r_m_s_)
-
-                Forward authentication requests to a remote IMAP server. This
-                driver connects to a remote IMAP server, specified using the
-                -O flag, and attempts to login (via an IMAP ‘LOGIN’ command)
-                using the credentials supplied to the local server. If the
-                remote authentication succeeds the local connection is also
-                considered to be authenticated. The remote connection is
-                closed as soon as the tagged response from the ‘LOGIN’ command
-                is received from the remote server.
-
-                The _o_p_t_i_o_n parameter to the --OO flag describes the remote
-                server to forward authentication requests to.  _h_o_s_t_n_a_m_e can be
-                a hostname (imap.example.com) or a dotted-quad IP address
-                (192.168.0.1). The latter is useful if the remote server is
-                multi-homed and has network interfaces that are unreachable
-                from the local IMAP server. The remote host is contacted on
-                the ‘imap’ service port. A non-default port can be specified
-                by appending a slash and the port name or number to the
-                _h_o_s_t_n_a_m_e argument.
-
-                The --OO flag and argument are mandatory when using the rimap
-                mechanism.
-
-     shadow     _(_A_I_X_, _I_r_i_x_, _L_i_n_u_x_, _S_o_l_a_r_i_s_)
-
-                Authenticate against the local "shadow password file".  The
-                exact mechanism is system dependent.  ssaassllaauutthhdd currently
-                understands the ggeettssppnnaamm() and ggeettuusseerrppww() library routines.
-                Some systems honour the --TT flag.
-
-     sasldb     _(_A_l_l _p_l_a_t_f_o_r_m_s_)
-
-                Authenticate against the SASL authentication database.  Note
-                that this is probably not what you want to use, and is even
-                disabled at compile-time by default.  If you want to use
-                sasldb with the SASL library, you probably want to use the
-                pwcheck_method of "auxprop" along with the sasldb auxprop plu-
-                gin instead.
-
-     ldap       _(_A_l_l _p_l_a_t_f_o_r_m_s _t_h_a_t _s_u_p_p_o_r_t _O_p_e_n_L_D_A_P _2_._0 _o_r _h_i_g_h_e_r_)
-
-                Authenticate against an ldap server.  The ldap configuration
-                parameters are read from /usr/local/etc/saslauthd.conf.  The
-                location of this file can be changed with the -O parameter.
-                See the LDAP_SASLAUTHD file included with the distribution for
-                the list of available parameters.
-
-     sia        _(_D_i_g_i_t_a_l _U_N_I_X_)
-
-                Authenticate using the Digital UNIX Security Integration
-                Architecture (a.k.a.  "enhanced security").
-
-NNOOTTEESS
-     The kerberos4 authentication driver consumes considerable resources. To
-     perform an authentication it must obtain a ticket granting ticket from
-     the TGT server oonn eevveerryy aauutthheennttiiccaattiioonn rreeqquueesstt.. The Kerberos library rou-
-     tines that obtain the TGT also create a local ticket file, on the reason-
-     able assumption that you will want to save the TGT for use by other Ker-
-     beros applications. These ticket files are unusable by ssaassllaauutthhdd , how-
-     ever there is no way not to create them. The overhead of creating and
-     removing these ticket files can cause serious performance degradation on
-     busy servers. (Kerberos was never intended to be used in this manner,
-     anyway.)
-
-FFIILLEESS
-     /var/run/saslauthd/mux  The default communications socket.
-
-     /usr/local/etc/saslauthd.conf
-                             The default configuration file for ldap support.
-
-SSEEEE AALLSSOO
-     passwd(1), getpwent(3), getspnam(3), getuserpw(3), sasl_checkpass(3)
-     sia_authenticate_user(3),
-
-CMU-SASL                          12 12 2005                          CMU-SASL
diff --git a/saslauthd/saslauthd.h.in b/saslauthd/saslauthd.h.in
deleted file mode 100644
index a61f3ba..0000000
--- a/saslauthd/saslauthd.h.in
+++ /dev/null
@@ -1,343 +0,0 @@
-/* saslauthd.h.in.  Generated from configure.in by autoheader.  */
-
-
-#ifndef _SASLAUTHD_H
-#define _SASLAUTHD_H
-
-#include <stdio.h>
-
-
-/* Include SASLdb Support */
-#undef AUTH_SASLDB
-
-/* Define if your getpwnam_r()/getspnam_r() functions take 5 arguments */
-#undef GETXXNAM_R_5ARG
-
-/* Define to 1 if you have the `asprintf' function. */
-#undef HAVE_ASPRINTF
-
-/* Define to 1 if you have the <crypt.h> header file. */
-#undef HAVE_CRYPT_H
-
-/* Define to 1 if you have the `dns_lookup' function. */
-#undef HAVE_DNS_LOOKUP
-
-/* Define to 1 if you have the `dn_expand' function. */
-#undef HAVE_DN_EXPAND
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Does the compiler understand __func__ */
-#undef HAVE_FUNC
-
-/* Does compiler understand __FUNCTION__ */
-#undef HAVE_FUNCTION
-
-/* Do we have a getaddrinfo? */
-#undef HAVE_GETADDRINFO
-
-/* Define to 1 if you have the `gethostname' function. */
-#undef HAVE_GETHOSTNAME
-
-/* Do we have a getnameinfo() function? */
-#undef HAVE_GETNAMEINFO
-
-/* Define to 1 if you have the `getspnam' function. */
-#undef HAVE_GETSPNAM
-
-/* Define to 1 if you have the `getuserpw' function. */
-#undef HAVE_GETUSERPW
-
-/* Include GSSAPI/Kerberos 5 Support */
-#undef HAVE_GSSAPI
-
-/* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_EXT_H
-
-/* Define if you have the gssapi.h header file */
-#undef HAVE_GSSAPI_H
-
-/* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function.
-   */
-#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
-
-/* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
-#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-
-/* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
-#undef HAVE_GSS_C_NT_USER_NAME
-
-/* Define to 1 if you have the `gss_decapsulate_token' function. */
-#undef HAVE_GSS_DECAPSULATE_TOKEN
-
-/* Define to 1 if you have the `gss_encapsulate_token' function. */
-#undef HAVE_GSS_ENCAPSULATE_TOKEN
-
-/* Define to 1 if you have the `gss_get_name_attribute' function. */
-#undef HAVE_GSS_GET_NAME_ATTRIBUTE
-
-/* Define to 1 if you have the `gss_oid_equal' function. */
-#undef HAVE_GSS_OID_EQUAL
-
-/* Define if your GSSAPI implementation supports SPNEGO */
-#undef HAVE_GSS_SPNEGO
-
-/* Include HTTP form Support */
-#undef HAVE_HTTPFORM
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Do we have Kerberos 4 Support? */
-#undef HAVE_KRB
-
-/* Define to 1 if you have the <krb5.h> header file. */
-#undef HAVE_KRB5_H
-
-/* Define to 1 if you have the `krb_get_err_text' function. */
-#undef HAVE_KRB_GET_ERR_TEXT
-
-/* Support for LDAP? */
-#undef HAVE_LDAP
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `mkdir' function. */
-#undef HAVE_MKDIR
-
-/* Do we have OpenSSL? */
-#undef HAVE_OPENSSL
-
-/* Support for PAM? */
-#undef HAVE_PAM
-
-/* Does compiler understand __PRETTY_FUNCTION__ */
-#undef HAVE_PRETTY_FUNCTION
-
-/* Include support for saslauthd? */
-#undef HAVE_SASLAUTHD
-
-/* Include SIA Support */
-#undef HAVE_SIA
-
-/* Does sockaddr have an sa_len? */
-#undef HAVE_SOCKADDR_SA_LEN
-
-/* Define to 1 if you have the `socket' function. */
-#undef HAVE_SOCKET
-
-/* Do we have a socklen_t? */
-#undef HAVE_SOCKLEN_T
-
-/* Is there an ss_family in sockaddr_storage? */
-#undef HAVE_SS_FAMILY
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
-/* Define to 1 if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Do we have a sockaddr_storage struct? */
-#undef HAVE_STRUCT_SOCKADDR_STORAGE
-
-/* Define to 1 if you have the <syslog.h> header file. */
-#undef HAVE_SYSLOG_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* define if your compiler has __attribute__ */
-#undef HAVE___ATTRIBUTE__
-
-/* Using Heimdal */
-#undef KRB5_HEIMDAL
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Location of saslauthd socket */
-#undef PATH_SASLAUTHD_RUNDIR
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Saslauthd runs threaded? */
-#undef SASLAUTHD_THREADED
-
-/* Use BerkeleyDB for SASLdb */
-#undef SASL_BERKELEYDB
-
-/* Path to default SASLdb database */
-#undef SASL_DB_PATH
-
-/* Use GDBM for SASLdb */
-#undef SASL_GDBM
-
-/* Use NDBM for SASLdb */
-#undef SASL_NDBM
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* User KERBEROS_V4 Staticly */
-#undef STATIC_KERBEROS4
-
-/* Link SASLdb Staticly */
-#undef STATIC_SASLDB
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Use the doors IPC API */
-#undef USE_DOORS
-
-/* Version number of package */
-#undef VERSION
-
-/* Use DES */
-#undef WITH_DES
-
-/* Use OpenSSL DES Implementation */
-#undef WITH_SSL_DES
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-
-
-#ifndef HAVE___ATTRIBUTE__
-/* Can't use attributes... */
-#define __attribute__(foo)
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifndef WIN32
-# include <netdb.h>   
-# include <sys/param.h>
-#else /* WIN32 */
-# include <winsock2.h>
-#endif /* WIN32 */ 
-#include <string.h>
-
-#include <netinet/in.h>
-
-#ifndef HAVE_SOCKLEN_T
-typedef unsigned int socklen_t;
-#endif /* HAVE_SOCKLEN_T */
-
-#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
-#define _SS_MAXSIZE     128     /* Implementation specific max size */
-#define _SS_PADSIZE     (_SS_MAXSIZE - sizeof (struct sockaddr))
-
-struct sockaddr_storage {
-        struct  sockaddr ss_sa;
-        char            __ss_pad2[_SS_PADSIZE];
-};
-# define ss_family ss_sa.sa_family
-#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
-
-#ifndef AF_INET6
-/* Define it to something that should never appear */
-#define AF_INET6        AF_MAX
-#endif
-
-/* Create a struct iovec if we need one */
-#if !defined(HAVE_SYS_UIO_H)
-struct iovec {
-    long iov_len;
-    char *iov_base;
-};
-#else
-#include <sys/types.h>
-#include <sys/uio.h>
-#endif
-
-#ifndef HAVE_GETADDRINFO
-#define getaddrinfo     sasl_getaddrinfo
-#define freeaddrinfo    sasl_freeaddrinfo
-#define getnameinfo     sasl_getnameinfo
-#define gai_strerror    sasl_gai_strerror
-#include "gai.h"
-#endif
-
-#ifndef AI_NUMERICHOST   /* support glibc 2.0.x */
-#define	AI_NUMERICHOST	4
-#define NI_NUMERICHOST	2
-#define NI_NAMEREQD	4
-#define NI_NUMERICSERV	8
-#endif
-
-/* handy string manipulation functions */
-#ifndef HAVE_STRLCPY
-extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
-#define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
-#endif
-#ifndef HAVE_STRLCAT
-extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
-#define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
-#endif
-#ifndef HAVE_ASPRINTF
-extern int asprintf(char **str, const char *fmt, ...);
-#endif
-
-#endif
-
diff --git a/saslauthd/testsaslauthd.8 b/saslauthd/testsaslauthd.8
new file mode 100644
index 0000000..b600045
--- /dev/null
+++ b/saslauthd/testsaslauthd.8
@@ -0,0 +1,16 @@
+.\" testsaslauthd - SASL2 test tool
+.\" Dima Barsky 23/12/2002
+.\"
+
+.\"
+.TH TESTSASLAUTHD 8 "December 23, 2002" "CMU SASL"
+.SH NAME
+testsaslauthd \- a test tool for saslauthd
+.SH SYNOPSIS
+.B testsaslauthd -u username -p password
+              [-r realm] [-s servicename]
+              [-f socket path] [-R repeatnum]
+
+.SH DESCRIPTION
+This tool is for testing the saslauthd daemon. Do not use it unless you 
+know what you are doing. Read the source code if you need more information.
diff --git a/saslauthd/testsaslauthd.c b/saslauthd/testsaslauthd.c
index f1e837a..5de666e 100644
--- a/saslauthd/testsaslauthd.c
+++ b/saslauthd/testsaslauthd.c
@@ -41,7 +41,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <saslauthd.h>
+#include <config.h>
 #include <stdio.h>
 
 #include <errno.h>
@@ -105,9 +105,7 @@ static int saslauthd_verify_password(const char *saslauthd_path,
     struct sockaddr_un srvaddr;
     int r;
     unsigned short count;
-    void *context;
     char pwpath[sizeof(srvaddr.sun_path)];
-    const char *p = NULL;
 #ifdef USE_DOORS
     door_arg_t arg;
 #endif
@@ -133,7 +131,6 @@ static int saslauthd_verify_password(const char *saslauthd_path,
      */
     {
  	unsigned short u_len, p_len, s_len, r_len;
- 	struct iovec iov[8];
  
  	u_len = htons(strlen(userid));
  	p_len = htons(strlen(passwd));
@@ -253,10 +250,7 @@ main(int argc, char *argv[])
   const char *realm = NULL, *service = NULL, *path = NULL;
   int c;
   int flag_error = 0;
-  unsigned passlen, verifylen;
-  const char *errstr = NULL;
-  int result;
-  char *user_domain = NULL;
+  int result = 0;
   int repeat = 0;
 
   while ((c = getopt(argc, argv, "p:u:r:s:f:R:")) != EOF)
diff --git a/saslauthd/utils.h b/saslauthd/utils.h
index a2556c4..dc3a9a3 100644
--- a/saslauthd/utils.h
+++ b/saslauthd/utils.h
@@ -45,12 +45,11 @@
 #ifndef _UTILS_H
 #define _UTILS_H
 
+#include <config.h>
 
 #include <syslog.h>
 #include <sys/types.h>
 #include <sys/uio.h>
-#include "saslauthd.h"
-
 
 /* log prioities */
 #define L_ERR			LOG_ERR
diff --git a/sasldb/.gitignore b/sasldb/.gitignore
new file mode 100644
index 0000000..7865954
--- /dev/null
+++ b/sasldb/.gitignore
@@ -0,0 +1,6 @@
+Makefile.in
+Makefile
+.deps
+.libs
+*.l[ao]
+*.o
diff --git a/sasldb/Makefile.am b/sasldb/Makefile.am
index 067477c..497ee25 100644
--- a/sasldb/Makefile.am
+++ b/sasldb/Makefile.am
@@ -44,25 +44,16 @@
 # Note that this doesn't necessaraly follow the libsasl2 verison info
 sasl_version = 1:25:0
 
-INCLUDES=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
+AM_CPPFLAGS=-fPIC -I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
 
-extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c
+extra_common_sources = db_none.c db_lmdb.c db_ndbm.c db_gdbm.c db_berkeley.c
 
 EXTRA_DIST = NTMakefile
 
 noinst_LTLIBRARIES = libsasldb.la
-noinst_LIBRARIES = libsasldb.a
 
 libsasldb_la_SOURCES = allockey.c sasldb.h
 EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
 libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
-libsasldb_la_LIBADD = $(SASL_DB_BACKEND) 
-
-# Prevent make dist stupidity
-libsasldb_a_SOURCES =
-EXTRA_libsasldb_a_SOURCES =
-
-libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
-	$(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
-
-
+libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
+libsasldb_la_LDFLAGS = -no-undefined
diff --git a/sasldb/Makefile.in b/sasldb/Makefile.in
deleted file mode 100644
index 37bdc8d..0000000
--- a/sasldb/Makefile.in
+++ /dev/null
@@ -1,599 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the SASLdb library
-# Rob Siemborski
-# $Id: Makefile.am,v 1.33 2011/09/05 14:18:10 murch Exp $
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = sasldb
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-libsasldb_a_AR = $(AR) $(ARFLAGS)
-libsasldb_a_LIBADD =
-am_libsasldb_a_OBJECTS =
-libsasldb_a_OBJECTS = $(am_libsasldb_a_OBJECTS)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-am_libsasldb_la_OBJECTS = allockey.lo
-libsasldb_la_OBJECTS = $(am_libsasldb_la_OBJECTS)
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libsasldb_a_SOURCES) $(EXTRA_libsasldb_a_SOURCES) \
-	$(libsasldb_la_SOURCES) $(EXTRA_libsasldb_la_SOURCES)
-DIST_SOURCES = $(libsasldb_a_SOURCES) $(EXTRA_libsasldb_a_SOURCES) \
-	$(libsasldb_la_SOURCES) $(EXTRA_libsasldb_la_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# Library version info - here at the top, for sanity
-# Note that this doesn't necessaraly follow the libsasl2 verison info
-sasl_version = 1:25:0
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
-extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c
-EXTRA_DIST = NTMakefile
-noinst_LTLIBRARIES = libsasldb.la
-noinst_LIBRARIES = libsasldb.a
-libsasldb_la_SOURCES = allockey.c sasldb.h
-EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
-libsasldb_la_LIBADD = $(SASL_DB_BACKEND) 
-
-# Prevent make dist stupidity
-libsasldb_a_SOURCES = 
-EXTRA_libsasldb_a_SOURCES = 
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sasldb/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu sasldb/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
-	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-clean-noinstLTLIBRARIES:
-	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libsasldb.la: $(libsasldb_la_OBJECTS) $(libsasldb_la_DEPENDENCIES) 
-	$(LINK)  $(libsasldb_la_OBJECTS) $(libsasldb_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/allockey.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db_berkeley.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db_gdbm.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db_ndbm.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/db_none.Plo at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
-	clean-noinstLTLIBRARIES mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
-	ctags distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am
-
-
-libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
-	$(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/sasldb/db_lmdb.c b/sasldb/db_lmdb.c
new file mode 100644
index 0000000..ca54b46
--- /dev/null
+++ b/sasldb/db_lmdb.c
@@ -0,0 +1,498 @@
+/* db_lmdb.c--SASL OpenLDAP LMDB interface
+ * Howard Chu
+ * $Id$
+ */
+/* 
+ * Copyright (C) 2011-2012 Howard Chu, All rights reserved. <hyc at symas.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The name "Carnegie Mellon University" must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission. For permission or any other legal
+ *    details, please contact  
+ *      Office of Technology Transfer
+ *      Carnegie Mellon University
+ *      5000 Forbes Avenue
+ *      Pittsburgh, PA  15213-3890
+ *      (412) 268-4387, fax: (412) 268-7395
+ *      tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by Computing Services
+ *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+
+#include <lmdb.h>
+
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
+#include "sasldb.h"
+
+static int db_ok = 0;
+static MDB_env *db_env;
+static MDB_dbi db_dbi;
+
+#define KILO 1024
+
+/*
+ * Open the environment
+ */
+static int do_open(const sasl_utils_t *utils,
+			 sasl_conn_t *conn,
+			 int rdwr, MDB_txn **mtxn)
+{
+    const char *path = SASL_DB_PATH;
+    void *cntxt;
+    MDB_env *env;
+    MDB_txn *txn;
+    sasl_getopt_t *getopt;
+    size_t mapsize = 0;
+    int readers = 0;
+    int ret;
+    int flags;
+
+    if (!db_env) {
+
+	if (utils->getcallback(conn, SASL_CB_GETOPT,
+			       (sasl_callback_ft *)&getopt, &cntxt) == SASL_OK) {
+	    const char *p;
+	    if (getopt(cntxt, NULL, "sasldb_path", &p, NULL) == SASL_OK
+		&& p != NULL && *p != 0) {
+		path = p;
+	    }
+	    if (getopt(cntxt, NULL, "sasldb_maxreaders", &p, NULL) == SASL_OK
+		&& p != NULL && *p != 0) {
+		readers = atoi(p);
+	    }
+	    if (getopt(cntxt, NULL, "sasldb_mapsize", &p, NULL) == SASL_OK
+		&& p != NULL && *p != 0) {
+		mapsize = atoi(p);
+		mapsize *= KILO;
+	    }
+	}
+
+	ret = mdb_env_create(&env);
+	if (ret) {
+	    utils->log(conn, SASL_LOG_ERR,
+		       "unable to create MDB environment: %s",
+		       mdb_strerror(ret));
+	    utils->seterror(conn, SASL_NOLOG, "Unable to create MDB environment");
+	    return SASL_FAIL;
+	}
+
+	if (readers) {
+	    ret = mdb_env_set_maxreaders(env, readers);
+	    if (ret) {
+		utils->log(conn, SASL_LOG_ERR,
+		       "unable to set MDB maxreaders: %s",
+		       mdb_strerror(ret));
+		utils->seterror(conn, SASL_NOLOG, "Unable to set MDB maxreaders");
+		return SASL_FAIL;
+	    }
+	}
+
+	if (mapsize) {
+	    ret = mdb_env_set_mapsize(env, mapsize);
+	    if (ret) {
+		utils->log(conn, SASL_LOG_ERR,
+		       "unable to set MDB mapsize: %s",
+		       mdb_strerror(ret));
+		utils->seterror(conn, SASL_NOLOG, "Unable to set MDB mapsize");
+		return SASL_FAIL;
+	    }
+	}
+
+	flags = MDB_NOSUBDIR;
+	if (!rdwr) flags |= MDB_RDONLY;
+	ret = mdb_env_open(env, path, flags, 0660);
+	if (ret) {
+	    mdb_env_close(env);
+	    if (!rdwr && ret == ENOENT) {
+		/* File not found and we are only reading the data.
+		   Treat as SASL_NOUSER. */
+		return SASL_NOUSER;
+	    }
+	    utils->log(conn, SASL_LOG_ERR,
+		       "unable to open MDB environment %s: %s",
+		       path, mdb_strerror(ret));
+	    utils->seterror(conn, SASL_NOLOG, "Unable to open MDB environment");
+	    return SASL_FAIL;
+	}
+    } else {
+    	env = db_env;
+    }
+
+    ret = mdb_txn_begin(env, NULL, rdwr ? 0 : MDB_RDONLY, &txn);
+    if (ret) {
+    	mdb_env_close(env);
+	utils->log(conn, SASL_LOG_ERR,
+		   "unable to open MDB transaction: %s",
+		   mdb_strerror(ret));
+	utils->seterror(conn, SASL_NOLOG, "Unable to open MDB transaction");
+	return SASL_FAIL;
+    }
+
+    if (!db_dbi) {
+	ret = mdb_open(txn, NULL, 0, &db_dbi);
+	if (ret) {
+	    mdb_txn_abort(txn);
+	    mdb_env_close(env);
+	    utils->log(conn, SASL_LOG_ERR,
+		       "unable to open MDB database: %s",
+		       mdb_strerror(ret));
+	    utils->seterror(conn, SASL_NOLOG, "Unable to open MDB database");
+	    return SASL_FAIL;
+	}
+    }
+
+    if (!db_env)
+	db_env = env;
+    *mtxn = txn;
+
+    return SASL_OK;
+}
+
+/*
+ * Close the environment
+ */
+static void do_close()
+{
+    mdb_env_close(db_env);
+    db_env = NULL;
+}
+
+
+/*
+ * Retrieve the secret from the database.
+ *
+ * Return SASL_NOUSER if the entry doesn't exist,
+ * SASL_OK on success.
+ *
+ */
+int _sasldb_getdata(const sasl_utils_t *utils,
+		    sasl_conn_t *context,
+		    const char *auth_identity,
+		    const char *realm,
+		    const char *propName,
+		    char *out, const size_t max_out, size_t *out_len)
+{
+  int result = SASL_OK;
+  char *key;
+  size_t key_len;
+  MDB_val dbkey, data;
+  MDB_txn *txn = NULL;
+
+  if(!utils) return SASL_BADPARAM;
+
+  /* check parameters */
+  if (!auth_identity || !realm || !propName || !out || !max_out) {
+      utils->seterror(context, 0,
+		      "Bad parameter in db_lmdb.c: _sasldb_getdata");
+      return SASL_BADPARAM;
+  }
+
+  if (!db_ok) {
+      utils->seterror(context, 0,
+		      "Database not checked");
+      return SASL_FAIL;
+  }
+
+  /* allocate a key */
+  result = _sasldb_alloc_key(utils, auth_identity, realm, propName,
+			     &key, &key_len);
+  if (result != SASL_OK) {
+      utils->seterror(context, 0,
+		      "Could not allocate key in _sasldb_getdata");
+      return result;
+  }
+
+  /* open the db */
+  result = do_open(utils, context, 0, &txn);
+  if (result != SASL_OK) goto cleanup;
+
+  /* create the key to search for */
+  dbkey.mv_data = key;
+  dbkey.mv_size = key_len;
+
+  /* ask MDB for the entry */
+  result = mdb_get(txn, db_dbi, &dbkey, &data);
+
+  switch (result) {
+  case 0:
+    /* success */
+    break;
+
+  case MDB_NOTFOUND:
+    result = SASL_NOUSER;
+    utils->seterror(context, SASL_NOLOG,
+		    "user: %s@%s property: %s not found in sasldb",
+		    auth_identity,realm,propName);
+    goto cleanup;
+    break;
+  default:
+    utils->seterror(context, 0,
+		    "error fetching from sasldb: %s",
+		    mdb_strerror(result));
+    result = SASL_FAIL;
+    goto cleanup;
+    break;
+  }
+
+  if(data.mv_size > max_out + 1)
+      return SASL_BUFOVER;
+
+  if(out_len) *out_len = data.mv_size;
+  memcpy(out, data.mv_data, data.mv_size);
+  out[data.mv_size] = '\0';
+
+ cleanup:
+
+  mdb_txn_abort(txn);
+  utils->free(key);
+
+  return result;
+}
+
+/*
+ * Put or delete an entry
+ *
+ *
+ */
+
+int _sasldb_putdata(const sasl_utils_t *utils,
+		    sasl_conn_t *context,
+		    const char *authid,
+		    const char *realm,
+		    const char *propName,
+		    const char *data_in, size_t data_len)
+{
+  int result = SASL_OK;
+  char *key;
+  size_t key_len;
+  MDB_val dbkey;
+  MDB_txn *txn = NULL;
+
+  if (!utils) return SASL_BADPARAM;
+
+  if (!authid || !realm || !propName) {
+      utils->seterror(context, 0,
+		      "Bad parameter in db_lmdb.c: _sasldb_putdata");
+      return SASL_BADPARAM;
+  }
+
+  if (!db_ok) {
+      utils->seterror(context, 0,
+		      "Database not checked");
+      return SASL_FAIL;
+  }
+
+  result = _sasldb_alloc_key(utils, authid, realm, propName,
+			     &key, &key_len);
+  if (result != SASL_OK) {
+       utils->seterror(context, 0,
+		      "Could not allocate key in _sasldb_putdata");
+       return result;
+  }
+
+  /* open the db */
+  result=do_open(utils, context, 1, &txn);
+  if (result!=SASL_OK) goto cleanup;
+
+  /* create the db key */
+  dbkey.mv_data = key;
+  dbkey.mv_size = key_len;
+
+  if (data_in) {   /* putting secret */
+    MDB_val data;
+
+    data.mv_data = (char *)data_in;
+    if(!data_len) data_len = strlen(data_in);
+    data.mv_size = data_len;
+
+    result = mdb_put(txn, db_dbi, &dbkey, &data, 0);
+
+    if (result != 0)
+    {
+      utils->log(NULL, SASL_LOG_ERR,
+		 "error updating sasldb: %s", mdb_strerror(result));
+      utils->seterror(context, SASL_NOLOG,
+		      "Couldn't update db");
+      result = SASL_FAIL;
+      goto cleanup;
+    }
+  } else {        /* removing secret */
+    result=mdb_del(txn, db_dbi, &dbkey, NULL);
+
+    if (result != 0)
+    {
+      utils->log(NULL, SASL_LOG_ERR,
+		 "error deleting entry from sasldb: %s", mdb_strerror(result));
+      utils->seterror(context, SASL_NOLOG,
+		      "Couldn't update db");
+      if (result == MDB_NOTFOUND)
+	  result = SASL_NOUSER;
+      else
+	  result = SASL_FAIL;
+      goto cleanup;
+    }
+  }
+  result = mdb_txn_commit(txn);
+  if (result) {
+      utils->log(NULL, SASL_LOG_ERR,
+		 "error committing to sasldb: %s", mdb_strerror(result));
+      utils->seterror(context, SASL_NOLOG,
+		      "Couldn't update db");
+      result = SASL_FAIL;
+  }
+  txn = NULL;
+
+ cleanup:
+
+  mdb_txn_abort(txn);
+  utils->free(key);
+
+  return result;
+}
+
+int _sasl_check_db(const sasl_utils_t *utils,
+		   sasl_conn_t *conn)
+{
+    const char *path = SASL_DB_PATH;
+    int ret;
+    void *cntxt;
+    sasl_getopt_t *getopt;
+    sasl_verifyfile_t *vf;
+
+    if (!utils) return SASL_BADPARAM;
+
+    if (utils->getcallback(conn, SASL_CB_GETOPT,
+			   (sasl_callback_ft *)&getopt, &cntxt) == SASL_OK) {
+	const char *p;
+	if (getopt(cntxt, NULL, "sasldb_path", &p, NULL) == SASL_OK
+	    && p != NULL && *p != 0) {
+	    path = p;
+	}
+    }
+
+    ret = utils->getcallback(conn, SASL_CB_VERIFYFILE,
+			     (sasl_callback_ft *)&vf, &cntxt);
+    if (ret != SASL_OK) {
+	utils->seterror(conn, 0, "verifyfile failed");
+	return ret;
+    }
+
+    ret = vf(cntxt, path, SASL_VRFY_PASSWD);
+
+    if (ret == SASL_OK) {
+	db_ok = 1;
+    }
+
+    if (ret == SASL_OK || ret == SASL_CONTINUE) {
+	return SASL_OK;
+    } else {
+	return ret;
+    }
+}
+
+#if defined(KEEP_DB_OPEN)
+void sasldb_auxprop_free (void *glob_context,
+                          const sasl_utils_t *utils)
+{
+    do_close();
+}
+#endif
+
+sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
+				   sasl_conn_t *conn)
+{
+    int ret;
+    MDB_txn *txn;
+    MDB_cursor *mc;
+
+    if(!utils || !conn) return NULL;
+
+    if(!db_ok) {
+	utils->seterror(conn, 0, "Database not OK in _sasldb_getkeyhandle");
+	return NULL;
+    }
+
+    ret = do_open(utils, conn, 0, &txn);
+
+    if (ret != SASL_OK) {
+	return NULL;
+    }
+
+    ret = mdb_cursor_open(txn, db_dbi, &mc);
+    if (ret) {
+	utils->seterror(conn, 0, "cursor_open failed in _sasldb_gekeythandle");
+    	return NULL;
+    }
+
+    return (sasldb_handle)mc;
+}
+
+int _sasldb_getnextkey(const sasl_utils_t *utils __attribute__((unused)),
+		       sasldb_handle handle, char *out,
+		       const size_t max_out, size_t *out_len)
+{
+    int result;
+    MDB_cursor *mc = (MDB_cursor *)handle;
+    MDB_val key;
+
+    if(!utils || !handle || !out || !max_out)
+	return SASL_BADPARAM;
+
+    result = mdb_cursor_get(mc, &key, NULL, MDB_NEXT);
+
+    if (result == MDB_NOTFOUND) return SASL_OK;
+
+    if (result != 0) {
+	return SASL_FAIL;
+    }
+
+    if (key.mv_size > max_out) {
+	return SASL_BUFOVER;
+    }
+
+    memcpy(out, key.mv_data, key.mv_size);
+    if (out_len) *out_len = key.mv_size;
+
+    return SASL_CONTINUE;
+}
+
+
+int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
+			     sasldb_handle handle)
+{
+    MDB_cursor *mc = (MDB_cursor *)handle;
+
+    if (!utils || !handle) return SASL_BADPARAM;
+
+    mdb_cursor_close(mc);
+
+    return SASL_OK;
+}
diff --git a/sasldb/sasldb.h b/sasldb/sasldb.h
index 0cef3b4..06183eb 100644
--- a/sasldb/sasldb.h
+++ b/sasldb/sasldb.h
@@ -73,7 +73,7 @@ int _sasldb_putdata(const sasl_utils_t *utils,
 		    const char *data, size_t data_len);
 
 /* Should be run before any db access is attempted */
-LIBSASL_API int _sasl_check_db(const sasl_utils_t *utils,
+int _sasl_check_db(const sasl_utils_t *utils,
 		   sasl_conn_t *conn);
 
 /* These allow iterating through the keys of the database */
@@ -84,15 +84,15 @@ typedef int (* sasldb_list_callback_t) (const char *authid,
 					const char *property,
 					void *rock);
 
-LIBSASL_API sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
+sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
 				   sasl_conn_t *conn);
-LIBSASL_API int _sasldb_getnextkey(const sasl_utils_t *utils,
+int _sasldb_getnextkey(const sasl_utils_t *utils,
 		       sasldb_handle handle, char *out,
 		       const size_t max_out, size_t *out_len);
-LIBSASL_API int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
+int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
 			     sasldb_handle handle);
 
-LIBSASL_API int _sasldb_listusers(const sasl_utils_t *utils,
+int _sasldb_listusers(const sasl_utils_t *utils,
 				  sasl_conn_t *context,
 				  sasldb_list_callback_t callback,
 				  void *callback_rock);
diff --git a/utils/.gitignore b/utils/.gitignore
new file mode 100644
index 0000000..cd6b27c
--- /dev/null
+++ b/utils/.gitignore
@@ -0,0 +1,14 @@
+Makefile.in
+Makefile
+.deps
+.libs
+*.l[ao]
+*.o
+smtptest
+testsuite
+testsuitestatic
+sasldblistusers2
+dbconverter-2
+dbconverter-1.5.9
+saslpasswd2
+pluginviewer
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 7e2f983..cce413b 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -89,7 +89,7 @@ libsfsasl2_la_SOURCES =
 libsfsasl2_la_LIBADD = sfsasl.lo
 libsfsasl2_la_LDFLAGS = -version-info 1:0:0 -export-dynamic -rpath $(libdir)
 
-INCLUDES=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
+AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
 EXTRA_DIST = saslpasswd2.8 sasldblistusers2.8 pluginviewer.8 sfsasl.h sfsasl.c smtptest.c testsuite.c pluginviewer.c NTMakefile
 
 sfsasl.lo: sfsasl.c
diff --git a/utils/Makefile.in b/utils/Makefile.in
deleted file mode 100644
index d766dd4..0000000
--- a/utils/Makefile.in
+++ /dev/null
@@ -1,859 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# Makefile.am for the SASL utilities
-# Rob Earhart
-#
-################################################################
-# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-#
-# 3. The name "Carnegie Mellon University" must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission. For permission or any other legal
-#    details, please contact  
-#      Office of Technology Transfer
-#      Carnegie Mellon University
-#      5000 Forbes Avenue
-#      Pittsburgh, PA  15213-3890
-#      (412) 268-4387, fax: (412) 268-7395
-#      tech-transfer at andrew.cmu.edu
-#
-# 4. Redistributions of any form whatsoever must retain the following
-#    acknowledgment:
-#    "This product includes software developed by Computing Services
-#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
-#
-# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
-# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
-# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-################################################################
-
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-sbin_PROGRAMS = @SASL_DB_UTILS@ @SMTPTEST_PROGRAM@ \
-	pluginviewer$(EXEEXT)
-EXTRA_PROGRAMS = saslpasswd2$(EXEEXT) sasldblistusers2$(EXEEXT) \
-	testsuite$(EXEEXT) testsuitestatic$(EXEEXT) smtptest$(EXEEXT) \
-	pluginviewer$(EXEEXT)
-noinst_PROGRAMS = dbconverter-2$(EXEEXT)
-subdir = utils
-DIST_COMMON = $(saslinclude_HEADERS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
-	$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
-	$(top_srcdir)/config/sasldb.m4 \
-	$(top_srcdir)/cmulocal/berkdb.m4 \
-	$(top_srcdir)/cmulocal/bsd_sockets.m4 \
-	$(top_srcdir)/cmulocal/c-attribute.m4 \
-	$(top_srcdir)/cmulocal/common.m4 \
-	$(top_srcdir)/cmulocal/cyrus.m4 \
-	$(top_srcdir)/cmulocal/init_automake.m4 \
-	$(top_srcdir)/cmulocal/ipv6.m4 \
-	$(top_srcdir)/cmulocal/openldap.m4 \
-	$(top_srcdir)/cmulocal/openssl.m4 \
-	$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" \
-	"$(DESTDIR)$(man8dir)" "$(DESTDIR)$(saslincludedir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libsfsasl2_la_DEPENDENCIES = sfsasl.lo
-am_libsfsasl2_la_OBJECTS =
-libsfsasl2_la_OBJECTS = $(am_libsfsasl2_la_OBJECTS)
-libsfsasl2_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(libsfsasl2_la_LDFLAGS) $(LDFLAGS) -o $@
-PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS)
-dbconverter_2_SOURCES = dbconverter-2.c
-dbconverter_2_OBJECTS = dbconverter-2.$(OBJEXT)
-am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-dbconverter_2_DEPENDENCIES = ../sasldb/libsasldb.la \
-	$(am__DEPENDENCIES_2)
-am_pluginviewer_OBJECTS = pluginviewer.$(OBJEXT)
-pluginviewer_OBJECTS = $(am_pluginviewer_OBJECTS)
-pluginviewer_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_sasldblistusers2_OBJECTS = sasldblistusers.$(OBJEXT)
-sasldblistusers2_OBJECTS = $(am_sasldblistusers2_OBJECTS)
-sasldblistusers2_DEPENDENCIES = ../sasldb/libsasldb.la \
-	$(am__DEPENDENCIES_2)
-am_saslpasswd2_OBJECTS = saslpasswd.$(OBJEXT)
-saslpasswd2_OBJECTS = $(am_saslpasswd2_OBJECTS)
-saslpasswd2_DEPENDENCIES = ../sasldb/libsasldb.la \
-	$(am__DEPENDENCIES_2)
-am_smtptest_OBJECTS =
-smtptest_OBJECTS = $(am_smtptest_OBJECTS)
-testsuite_SOURCES = testsuite.c
-testsuite_OBJECTS = testsuite.$(OBJEXT)
-testsuite_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_testsuitestatic_OBJECTS = testsuite.$(OBJEXT)
-testsuitestatic_OBJECTS = $(am_testsuitestatic_OBJECTS)
-am__DEPENDENCIES_3 = ../lib/.libs/libsasl2.a $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libsfsasl2_la_SOURCES) dbconverter-2.c \
-	$(pluginviewer_SOURCES) $(sasldblistusers2_SOURCES) \
-	$(saslpasswd2_SOURCES) $(smtptest_SOURCES) testsuite.c \
-	$(testsuitestatic_SOURCES)
-DIST_SOURCES = $(libsfsasl2_la_SOURCES) dbconverter-2.c \
-	$(pluginviewer_SOURCES) $(sasldblistusers2_SOURCES) \
-	$(saslpasswd2_SOURCES) $(smtptest_SOURCES) testsuite.c \
-	$(testsuitestatic_SOURCES)
-man8dir = $(mandir)/man8
-NROFF = nroff
-MANS = $(man_MANS)
-HEADERS = $(saslinclude_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DIRS = @DIRS@
-DMALLOC_LIBS = @DMALLOC_LIBS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETADDRINFOOBJS = @GETADDRINFOOBJS@
-GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
-GETSUBOPT = @GETSUBOPT@
-GREP = @GREP@
-GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
-GSSAPI_LIBS = @GSSAPI_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPCTYPE = @IPCTYPE@
-JAVAC = @JAVAC@
-JAVADOC = @JAVADOC@
-JAVAH = @JAVAH@
-JAVAROOT = @JAVAROOT@
-JAVA_INCLUDES = @JAVA_INCLUDES@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_DES = @LIB_DES@
-LIB_DOOR = @LIB_DOOR@
-LIB_LDAP = @LIB_LDAP@
-LIB_MYSQL = @LIB_MYSQL@
-LIB_PGSQL = @LIB_PGSQL@
-LIB_SOCKET = @LIB_SOCKET@
-LIB_SQLITE = @LIB_SQLITE@
-LIB_SQLITE3 = @LIB_SQLITE3@
-LN_S = @LN_S@
-LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
-LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
-LTLIBOBJS = @LTLIBOBJS@
-LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NTLM_LIBS = @NTLM_LIBS@
-OBJEXT = @OBJEXT@
-OTP_LIBS = @OTP_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PASSDSS_LIBS = @PASSDSS_LIBS@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PLAIN_LIBS = @PLAIN_LIBS@
-PURECOV = @PURECOV@
-PURIFY = @PURIFY@
-PWCHECKMETH = @PWCHECKMETH@
-RANLIB = @RANLIB@
-SASL_DB_BACKEND = @SASL_DB_BACKEND@
-SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
-SASL_DB_INC = @SASL_DB_INC@
-SASL_DB_LIB = @SASL_DB_LIB@
-SASL_DB_MANS = @SASL_DB_MANS@
-SASL_DB_UTILS = @SASL_DB_UTILS@
-SASL_DL_LIB = @SASL_DL_LIB@
-SASL_KRB_LIB = @SASL_KRB_LIB@
-SASL_MECHS = @SASL_MECHS@
-SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
-SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
-SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
-SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
-SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
-SCRAM_LIBS = @SCRAM_LIBS@
-SET_MAKE = @SET_MAKE@
-SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
-SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
-SHELL = @SHELL@
-SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
-SNPRINTFOBJS = @SNPRINTFOBJS@
-SRP_LIBS = @SRP_LIBS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-plugindir = @plugindir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET)
-all_sasl_static_libs = ../lib/.libs/libsasl2.a $(SASL_DB_LIB) $(LIB_SOCKET) $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(SASL_KRB_LIB) $(LIB_DES) $(PLAIN_LIBS) $(SRP_LIBS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE)
- at NO_SASL_DB_MANS_FALSE@man_MANS = saslpasswd2.8 sasldblistusers2.8 pluginviewer.8
- at NO_SASL_DB_MANS_TRUE@man_MANS = 
-saslpasswd2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
-saslpasswd2_SOURCES = saslpasswd.c
-sasldblistusers2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
-sasldblistusers2_SOURCES = sasldblistusers.c
-dbconverter_2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
-pluginviewer_LDADD = $(all_sasl_libs)
-pluginviewer_SOURCES = pluginviewer.c
-testsuite_LDADD = $(all_sasl_libs) @DMALLOC_LIBS@
-CLEANFILES = $(EXTRA_PROGRAMS)
-testsuitestatic_SOURCES = testsuite.c
-testsuitestatic_LDADD = $(all_sasl_static_libs) @DMALLOC_LIBS@ @SASL_DL_LIB@
-testsuitestatic_DEPENDENCIES = ../lib/.libs/libsasl2.a
-smtptest_SOURCES = 
-smtptest_DEPENDENCIES = ./smtptest.lo ./libsfsasl2.la
-smtptest_LDADD = ./smtptest.lo ./libsfsasl2.la @SFIO_LIB_FLAGS@ @DMALLOC_LIBS@ $(all_sasl_libs)
-saslincludedir = $(includedir)/sasl
-saslinclude_HEADERS = @SASL_UTIL_HEADERS_EXTRA@
-EXTRA_HEADERS = sfsasl.h
-
-# Note: we explicitly do *not* link to libsfio, as people will need to
-# link to that anyway if they want to use this. 
-lib_LTLIBRARIES = @SASL_UTIL_LIBS_EXTRA@
-EXTRA_LTLIBRARIES = libsfsasl2.la
-libsfsasl2_la_SOURCES = 
-libsfsasl2_la_LIBADD = sfsasl.lo
-libsfsasl2_la_LDFLAGS = -version-info 1:0:0 -export-dynamic -rpath $(libdir)
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
-EXTRA_DIST = saslpasswd2.8 sasldblistusers2.8 pluginviewer.8 sfsasl.h sfsasl.c smtptest.c testsuite.c pluginviewer.c NTMakefile
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu utils/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-	}
-
-uninstall-libLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-	done
-
-clean-libLTLIBRARIES:
-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libsfsasl2.la: $(libsfsasl2_la_OBJECTS) $(libsfsasl2_la_DEPENDENCIES) 
-	$(libsfsasl2_la_LINK)  $(libsfsasl2_la_OBJECTS) $(libsfsasl2_la_LIBADD) $(LIBS)
-
-clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-install-sbinPROGRAMS: $(sbin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p || test -f $$p1; \
-	  then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-sbinPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' `; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
-
-clean-sbinPROGRAMS:
-	@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-dbconverter-2$(EXEEXT): $(dbconverter_2_OBJECTS) $(dbconverter_2_DEPENDENCIES) 
-	@rm -f dbconverter-2$(EXEEXT)
-	$(LINK) $(dbconverter_2_OBJECTS) $(dbconverter_2_LDADD) $(LIBS)
-pluginviewer$(EXEEXT): $(pluginviewer_OBJECTS) $(pluginviewer_DEPENDENCIES) 
-	@rm -f pluginviewer$(EXEEXT)
-	$(LINK) $(pluginviewer_OBJECTS) $(pluginviewer_LDADD) $(LIBS)
-sasldblistusers2$(EXEEXT): $(sasldblistusers2_OBJECTS) $(sasldblistusers2_DEPENDENCIES) 
-	@rm -f sasldblistusers2$(EXEEXT)
-	$(LINK) $(sasldblistusers2_OBJECTS) $(sasldblistusers2_LDADD) $(LIBS)
-saslpasswd2$(EXEEXT): $(saslpasswd2_OBJECTS) $(saslpasswd2_DEPENDENCIES) 
-	@rm -f saslpasswd2$(EXEEXT)
-	$(LINK) $(saslpasswd2_OBJECTS) $(saslpasswd2_LDADD) $(LIBS)
-smtptest$(EXEEXT): $(smtptest_OBJECTS) $(smtptest_DEPENDENCIES) 
-	@rm -f smtptest$(EXEEXT)
-	$(LINK) $(smtptest_OBJECTS) $(smtptest_LDADD) $(LIBS)
-testsuite$(EXEEXT): $(testsuite_OBJECTS) $(testsuite_DEPENDENCIES) 
-	@rm -f testsuite$(EXEEXT)
-	$(LINK) $(testsuite_OBJECTS) $(testsuite_LDADD) $(LIBS)
-testsuitestatic$(EXEEXT): $(testsuitestatic_OBJECTS) $(testsuitestatic_DEPENDENCIES) 
-	@rm -f testsuitestatic$(EXEEXT)
-	$(LINK) $(testsuitestatic_OBJECTS) $(testsuitestatic_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dbconverter-2.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pluginviewer.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sasldblistusers.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/saslpasswd.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testsuite.Po at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-man8: $(man_MANS)
-	@$(NORMAL_INSTALL)
-	test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
-	@list=''; test -n "$(man8dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.8[a-z]*$$/p'; \
-	} | while read p; do \
-	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; echo "$$p"; \
-	done | \
-	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
-	sed 'N;N;s,\n, ,g' | { \
-	list=; while read file base inst; do \
-	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
-	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
-	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
-	  fi; \
-	done; \
-	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
-	while read files; do \
-	  test -z "$$files" || { \
-	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
-	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
-	done; }
-
-uninstall-man8:
-	@$(NORMAL_UNINSTALL)
-	@list=''; test -n "$(man8dir)" || exit 0; \
-	files=`{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.8[a-z]*$$/p'; \
-	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
-install-saslincludeHEADERS: $(saslinclude_HEADERS)
-	@$(NORMAL_INSTALL)
-	test -z "$(saslincludedir)" || $(MKDIR_P) "$(DESTDIR)$(saslincludedir)"
-	@list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(saslincludedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(saslincludedir)" || exit $$?; \
-	done
-
-uninstall-saslincludeHEADERS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(saslincludedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(saslincludedir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@list='$(MANS)'; if test -n "$$list"; then \
-	  list=`for p in $$list; do \
-	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-	  if test -n "$$list" && \
-	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
-	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
-	    exit 1; \
-	  else :; fi; \
-	else :; fi
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(saslincludedir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
-	clean-noinstPROGRAMS clean-sbinPROGRAMS mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man install-saslincludeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES install-sbinPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man: install-man8
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-libLTLIBRARIES uninstall-man \
-	uninstall-saslincludeHEADERS uninstall-sbinPROGRAMS
-
-uninstall-man: uninstall-man8
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
-	clean-sbinPROGRAMS ctags distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-libLTLIBRARIES \
-	install-man install-man8 install-pdf install-pdf-am install-ps \
-	install-ps-am install-saslincludeHEADERS install-sbinPROGRAMS \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-libLTLIBRARIES uninstall-man uninstall-man8 \
-	uninstall-saslincludeHEADERS uninstall-sbinPROGRAMS
-
-
-sfsasl.lo: sfsasl.c
-	$(LIBTOOL) --mode=compile $(COMPILE) @SFIO_INC_FLAGS@ -c $(srcdir)/sfsasl.c
-
-smtptest.lo: smtptest.c
-	$(LIBTOOL) --mode=compile $(COMPILE) @SFIO_INC_FLAGS@ -c $(srcdir)/smtptest.c
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/utils/dbconverter-2.c b/utils/dbconverter-2.c
index 04df2cb..33e18fb 100644
--- a/utils/dbconverter-2.c
+++ b/utils/dbconverter-2.c
@@ -376,7 +376,7 @@ int good_getopt(void *context __attribute__((unused)),
 }
 
 static struct sasl_callback goodsasl_cb[] = {
-    { SASL_CB_GETOPT, &good_getopt, NULL },
+    { SASL_CB_GETOPT, (int (*)(void))&good_getopt, NULL },
     { SASL_CB_LIST_END, NULL, NULL }
 };
 
diff --git a/utils/pluginviewer.c b/utils/pluginviewer.c
index 3164acd..41b859d 100644
--- a/utils/pluginviewer.c
+++ b/utils/pluginviewer.c
@@ -209,8 +209,8 @@ getpath(void *context,
 
 static int
 plugview_sasl_getopt (
-    void *context,
-    const char *plugin_name,
+    void *context __attribute__((unused)),
+    const char *plugin_name __attribute__((unused)),
     const char *option,
     const char **result,
     unsigned *len
@@ -422,7 +422,7 @@ main(int argc, char *argv[])
         case 'b':
             options = optarg;
             while (*options != '\0') {
-	        switch(getsubopt(&options, (const char * const *)bit_subopts, &value)) {
+	        switch(getsubopt(&options, (char * const *)bit_subopts, &value)) {
 	        case OPT_MIN:
                     if (! value) {
 	                errflag = 1;
@@ -447,7 +447,7 @@ main(int argc, char *argv[])
         case 'e':
             options = optarg;
             while (*options != '\0') {
-	        switch(getsubopt(&options, (const char * const *)ext_subopts, &value)) {
+	        switch(getsubopt(&options, (char * const *)ext_subopts, &value)) {
 	        case OPT_EXT_SSF:
                     if (! value) {
 	                errflag = 1;
@@ -476,7 +476,7 @@ main(int argc, char *argv[])
         case 'f':
             options = optarg;
             while (*options != '\0') {
-	        switch(getsubopt(&options, (const char * const *)flag_subopts, &value)) {
+	        switch(getsubopt(&options, (char * const *)flag_subopts, &value)) {
 	        case OPT_NOPLAIN:
 	            secprops.security_flags |= SASL_SEC_NOPLAINTEXT;
 	            break;
diff --git a/utils/sasldbconverter2.8 b/utils/sasldbconverter2.8
new file mode 100644
index 0000000..714dd01
--- /dev/null
+++ b/utils/sasldbconverter2.8
@@ -0,0 +1,61 @@
+.\" sasldbconverter-2 - Convert sasldb file into the new format
+.\" Original version by Dima Barsky 25/10/2002
+.\"
+
+.\" Copyright (c) 2009 Carnegie Mellon University.  All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer. 
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in
+.\"    the documentation and/or other materials provided with the
+.\"    distribution.
+.\"
+.\" 3. The name ""Carnegie Mellon University"" must not be used to
+.\"    endorse or promote products derived from this software without
+.\"    prior written permission. For permission or any other legal
+.\"    details, please contact  
+.\"      Office of Technology Transfer
+.\"      Carnegie Mellon University
+.\"      5000 Forbes Avenue
+.\"      Pittsburgh, PA  15213-3890
+.\"      (412) 268-4387, fax: (412) 268-7395
+.\"      tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\"    acknowledgment:
+.\"    ""This product includes software developed by Computing Services
+.\"     at Carnegie Mellon University (http://www.cmu.edu/computing/).""
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+.\"
+.TH SASLDBCONVERTER2 8 "April 11, 2009" "CMU SASL"
+.SH NAME
+sasldbconverter2 \- Convert sasldb file into the new format
+.SH SYNOPSIS
+.B sasldbconverter2 [old_sasldb_file [new_sasldb_file]]
+.SH DESCRIPTION
+.I sasldbconverter2
+takes the sasldb file specified on the
+command line and convert it to a new sasldb file in the default
+location (usually /etc/sasldb2). It is STRONGLY RECOMMENDED that you
+backup sasldb before allowing this program to run.
+.SH OPTIONS
+.TP
+.SH KNOWN BUGS
+This only works for sasldb files that use the gdbm library.
+.TP
+.SH SEE ALSO
+rfc4422 \- Simple Authentication and Security Layer (SASL)
diff --git a/utils/sasldblistusers.c b/utils/sasldblistusers.c
index 1b4d1e5..f755866 100644
--- a/utils/sasldblistusers.c
+++ b/utils/sasldblistusers.c
@@ -57,9 +57,13 @@
 
 #ifdef WIN32
 #include <saslutil.h>
+#if defined(__MINGW64_VERSION_MAJOR)
+#include <getopt.h>
+#else
 __declspec(dllimport) char *optarg;
 __declspec(dllimport) int optind;
 #endif
+#endif
 
 /* Cheating to make the utils work out right */
 LIBSASL_VAR const sasl_utils_t *sasl_global_utils;
diff --git a/utils/saslpasswd.c b/utils/saslpasswd.c
index b3902f5..b633f8f 100644
--- a/utils/saslpasswd.c
+++ b/utils/saslpasswd.c
@@ -58,9 +58,12 @@
 #include <io.h>
 
 #include <saslutil.h>
+#if defined(__MINGW64_VERSION_MAJOR)
+#include <getopt.h>
+#else
 __declspec(dllimport) char *optarg;
 __declspec(dllimport) int optind;
-
+#endif
 /* perror can't be used on Windows system calls, so we define a new macro to underline this */
 void p_oserror (const char *string);
 #endif /*WIN32*/
diff --git a/utils/sasltestsuite.8 b/utils/sasltestsuite.8
new file mode 100644
index 0000000..2c90f79
--- /dev/null
+++ b/utils/sasltestsuite.8
@@ -0,0 +1,22 @@
+.\" sasltestsuite - SASL2 test tool
+.\" Dima Barsky 23/11/2002
+.\"
+
+.\"
+.TH SASLTESTSUITE 8 "December 23, 2002" "CMU SASL"
+.SH NAME
+sasltestsuite \- SASL2 test tool
+.SH SYNOPSIS
+.B  sasltestsuite [-g name] [-s seed] [-r tests] -a -M
+    g -- gssapi service name to use (default: host)
+    r -- # of random tests to do (default: 25)
+    a -- do all corruption tests (and ignores random ones unless -r specified)
+    n -- skip the initial "do correctly" tests
+    h -- show this screen
+    s -- random seed to use
+    M -- detailed memory debugging ON
+
+.SH DESCRIPTION
+This tool is for testing the SASL2 installation. Do not use it
+unless you know what you are doing. Read the source code if you need 
+more information.
diff --git a/win32/common.mak b/win32/common.mak
index c2a9338..5c9c4b2 100644
--- a/win32/common.mak
+++ b/win32/common.mak
@@ -79,6 +79,20 @@ DB_LIBPATH=c:\work\isode\db\build_win32\Release_static
 !ENDIF
 !ENDIF
 
+!IF "$(LMDB_INCLUDE)" == ""
+LMDB_INCLUDE=c:\work\isode\lmdb\libraries\liblmdb
+!IF "$(VERBOSE)" != "0"
+!MESSAGE Defaulting LMDB include path to $(LMDB_INCLUDE).
+!ENDIF
+!ENDIF
+
+!IF "$(LMDB_LIBPATH)" == ""
+LMDB_LIBPATH=c:\work\isode\lmdb\libraries\liblmdb\Release
+!IF "$(VERBOSE)" != "0"
+!MESSAGE Defaulting LMDB library path to $(LMDB_LIBPATH).
+!ENDIF
+!ENDIF
+
 !IF "$(OPENSSL_INCLUDE)" == ""
 OPENSSL_INCLUDE="D:\openssl\engine-0.9.6g-md3\include"
 !IF "$(VERBOSE)" != "0"
@@ -194,7 +208,7 @@ CODEGEN=/MDd
 !ENDIF 
 !ENDIF 
 
-CPP_PROJ=$(CODEGEN) /W3 /Gm $(EXCEPTHANDLING) /ZI /Od /D "_DEBUG" /D _CRT_SECURE_NO_DEPRECATE=1 $(CPPFLAGS) /FD /GZ /c
+CPP_PROJ=$(CODEGEN) /W3 /Gm $(EXCEPTHANDLING) /ZI /Od /D "_DEBUG" /D _CRT_SECURE_NO_DEPRECATE=1 $(CPPFLAGS) /FD /RTC1 /c
 
 incremental=yes
 
diff --git a/win32/include/config.h b/win32/include/config.h
index 0ad9628..3440837 100644
--- a/win32/include/config.h
+++ b/win32/include/config.h
@@ -91,7 +91,7 @@ typedef int		    intptr_t;
 /* #undef SASL_NDBM */
 #define SASL_BERKELEYDB 1
 
-/* which mechs can we link staticly? */
+/* which mechs can we link statically? */
 #define STATIC_ANONYMOUS 1
 #define STATIC_CRAMMD5 1
 #define STATIC_DIGESTMD5 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cyrus-sasl2/cyrus-sasl2.git



More information about the Pkg-cyrus-sasl2-commits mailing list