[proftpd-dfsg] 01/03: Imported Upstream version 1.3.5a

Francesco Lovergine frankie at moszumanska.debian.org
Wed Jan 27 11:34:44 UTC 2016


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

frankie pushed a commit to branch master
in repository proftpd-dfsg.

commit a585ccf055a47ca30ed3bfc7a41abcbab168d87a
Author: Francesco Paolo Lovergine <frankie at debian.org>
Date:   Wed Jan 27 12:17:56 2016 +0100

    Imported Upstream version 1.3.5a
---
 .gitignore                                         |   31 +
 .travis.yml                                        |   42 +
 ChangeLog                                          |    8 +-
 Makefile.in                                        |    3 +
 NEWS                                               |   53 +-
 RELEASE_NOTES                                      |   38 +-
 config.h.in                                        |    3 +
 configure                                          |  126 +
 configure.in                                       |   16 +
 contrib/INSTALL.mod_wrap                           |   31 +
 contrib/README.mod_wrap                            |  242 +
 proftpd.spec => contrib/dist/rpm/proftpd.spec      |   10 +-
 contrib/ftpasswd                                   |    2 +-
 contrib/ftpmail                                    |    2 +-
 contrib/ftpquota                                   |    2 +-
 contrib/mod_ban.c                                  |    2 +-
 contrib/mod_copy.c                                 |  106 +-
 contrib/mod_ctrls_admin.c                          |    2 +-
 contrib/mod_deflate.c                              |    2 +-
 contrib/mod_dnsbl/mod_dnsbl.c                      |    2 +-
 contrib/mod_dnsbl/mod_dnsbl.h.in                   |    2 +-
 contrib/mod_dynmasq.c                              |    2 +-
 contrib/mod_exec.c                                 |    2 +-
 contrib/mod_geoip.c                                |   46 +-
 contrib/mod_ifsession.c                            |    2 +-
 contrib/mod_ifversion.c                            |    2 +-
 contrib/mod_ldap.c                                 |   10 +-
 contrib/mod_load/mod_load.c                        |    2 +-
 contrib/mod_load/{mod_load.c => mod_load.c.in}     |    9 +-
 contrib/mod_qos.c                                  |    2 +-
 contrib/mod_quotatab.c                             |   35 +-
 contrib/mod_quotatab.h                             |    2 +-
 contrib/mod_quotatab_file.c                        |    2 +-
 contrib/mod_quotatab_sql.c                         |    2 +-
 contrib/mod_radius.c                               |    2 +-
 contrib/mod_rewrite.c                              |    2 +-
 contrib/mod_sftp/agent.c                           |    2 +-
 contrib/mod_sftp/agent.h                           |    2 +-
 contrib/mod_sftp/auth-hostbased.c                  |    6 +-
 contrib/mod_sftp/auth-kbdint.c                     |    2 +-
 contrib/mod_sftp/auth-password.c                   |    2 +-
 contrib/mod_sftp/auth-publickey.c                  |    6 +-
 contrib/mod_sftp/auth.c                            |   10 +-
 contrib/mod_sftp/auth.h                            |    2 +-
 contrib/mod_sftp/blacklist.c                       |    2 +-
 contrib/mod_sftp/blacklist.h                       |    2 +-
 contrib/mod_sftp/channel.c                         |    2 +-
 contrib/mod_sftp/channel.h                         |    2 +-
 contrib/mod_sftp/cipher.c                          |    4 +-
 contrib/mod_sftp/cipher.h                          |    2 +-
 contrib/mod_sftp/compress.c                        |    2 +-
 contrib/mod_sftp/compress.h                        |    2 +-
 contrib/mod_sftp/configure                         |   15 +
 contrib/mod_sftp/configure.in                      |   18 +
 contrib/mod_sftp/crypto.c                          |    2 +-
 contrib/mod_sftp/crypto.h                          |    2 +-
 contrib/mod_sftp/date.c                            |    2 +-
 contrib/mod_sftp/date.h                            |    2 +-
 contrib/mod_sftp/disconnect.c                      |    2 +-
 contrib/mod_sftp/disconnect.h                      |    2 +-
 contrib/mod_sftp/display.c                         |    2 +-
 contrib/mod_sftp/display.h                         |    2 +-
 contrib/mod_sftp/fxp.c                             |   37 +-
 contrib/mod_sftp/fxp.h                             |    2 +-
 contrib/mod_sftp/interop.c                         |    2 +-
 contrib/mod_sftp/interop.h                         |    2 +-
 contrib/mod_sftp/kbdint.c                          |    6 +-
 contrib/mod_sftp/kbdint.h                          |    2 +-
 contrib/mod_sftp/kex.c                             |   16 +-
 contrib/mod_sftp/kex.h                             |    2 +-
 contrib/mod_sftp/keys.c                            |    2 +-
 contrib/mod_sftp/keys.h                            |    2 +-
 contrib/mod_sftp/keystore.c                        |    2 +-
 contrib/mod_sftp/keystore.h                        |    2 +-
 contrib/mod_sftp/mac.c                             |    8 +-
 contrib/mod_sftp/mac.h                             |    2 +-
 contrib/mod_sftp/misc.c                            |    2 +-
 contrib/mod_sftp/misc.h                            |    2 +-
 contrib/mod_sftp/mod_sftp.c                        |    2 +-
 contrib/mod_sftp/mod_sftp.h.in                     |    2 +-
 contrib/mod_sftp/msg.c                             |    2 +-
 contrib/mod_sftp/msg.h                             |    2 +-
 contrib/mod_sftp/packet.c                          |    2 +-
 contrib/mod_sftp/packet.h                          |    2 +-
 contrib/mod_sftp/rfc4716.c                         |    2 +-
 contrib/mod_sftp/rfc4716.h                         |    2 +-
 contrib/mod_sftp/scp.c                             |    2 +-
 contrib/mod_sftp/scp.h                             |    2 +-
 contrib/mod_sftp/service.c                         |    2 +-
 contrib/mod_sftp/service.h                         |    2 +-
 contrib/mod_sftp/session.c                         |    2 +-
 contrib/mod_sftp/session.h                         |    2 +-
 contrib/mod_sftp/ssh2.h                            |    2 +-
 contrib/mod_sftp/tap.c                             |    2 +-
 contrib/mod_sftp/tap.h                             |    2 +-
 contrib/mod_sftp/utf8.c                            |    2 +-
 contrib/mod_sftp/utf8.h                            |    2 +-
 contrib/mod_sftp_pam.c                             |    2 +-
 contrib/mod_sftp_sql.c                             |   28 +-
 contrib/mod_shaper.c                               |    8 +-
 contrib/mod_site_misc.c                            |    2 +-
 contrib/mod_snmp/PROFTPD-MIB.txt                   |    2 +-
 contrib/mod_snmp/agentx.h                          |    2 +-
 contrib/mod_snmp/asn1.c                            |    7 +-
 contrib/mod_snmp/asn1.h                            |    2 +-
 contrib/mod_snmp/mod_snmp.h.in                     |    2 +-
 contrib/mod_snmp/msg.c                             |    2 +-
 contrib/mod_snmp/msg.h                             |    2 +-
 contrib/mod_snmp/notify.c                          |    4 +-
 contrib/mod_snmp/packet.c                          |    2 +-
 contrib/mod_snmp/packet.h                          |    2 +-
 contrib/mod_snmp/pdu.c                             |    2 +-
 contrib/mod_snmp/pdu.h                             |    2 +-
 contrib/mod_snmp/smi.c                             |   14 +-
 contrib/mod_snmp/smi.h                             |    2 +-
 contrib/mod_snmp/stacktrace.c                      |    2 +-
 contrib/mod_snmp/stacktrace.h                      |    2 +-
 contrib/mod_snmp/uptime.c                          |    2 +-
 contrib/mod_snmp/uptime.h                          |    2 +-
 contrib/mod_sql.c                                  |   42 +-
 contrib/mod_sql.h                                  |    2 +-
 contrib/mod_sql_mysql.c                            |    2 +-
 contrib/mod_sql_odbc.c                             |    2 +-
 contrib/mod_sql_passwd.c                           |    2 +-
 contrib/mod_sql_postgres.c                         |    7 +-
 contrib/mod_sql_sqlite.c                           |    7 +-
 contrib/mod_tls.c                                  |  226 +-
 contrib/mod_tls.h                                  |    2 +-
 contrib/mod_tls_memcache.c                         |    2 +-
 contrib/mod_tls_shmcache.c                         |    2 +-
 contrib/mod_unique_id.c                            |    2 +-
 contrib/mod_wrap.c                                 |    2 +-
 contrib/mod_wrap2/mod_wrap2.c                      |   33 +-
 contrib/mod_wrap2/mod_wrap2.h.in                   |    2 +-
 contrib/mod_wrap2_file.c                           |   64 +-
 contrib/mod_wrap2_sql.c                            |    2 +-
 doc/Configuration.pdf                              |  Bin 0 -> 1456937 bytes
 doc/Configuration.sgml                             |   35 +
 doc/contrib/ftpasswd.html                          |    6 +-
 doc/contrib/ftpmail.html                           |    6 +-
 doc/contrib/ftpquota.html                          |    6 +-
 doc/contrib/index.html                             |    6 +-
 doc/contrib/mod_ban.html                           |    6 +-
 doc/contrib/mod_copy.html                          |   37 +-
 doc/contrib/mod_ctrls_admin.html                   |    6 +-
 doc/contrib/mod_deflate.html                       |    6 +-
 doc/contrib/mod_dnsbl.html                         |    6 +-
 doc/contrib/mod_dynmasq.html                       |    6 +-
 doc/contrib/mod_exec.html                          |    6 +-
 doc/contrib/mod_geoip.html                         |    6 +-
 doc/contrib/mod_ifsession.html                     |    6 +-
 doc/contrib/mod_ifversion.html                     |    6 +-
 doc/contrib/mod_ldap.html                          |    6 +-
 doc/contrib/mod_load.html                          |    6 +-
 doc/contrib/mod_log_forensic.html                  |    6 +-
 doc/contrib/mod_qos.html                           |    6 +-
 doc/contrib/mod_quotatab.html                      |    6 +-
 doc/contrib/mod_quotatab_file.html                 |    6 +-
 doc/contrib/mod_quotatab_ldap.html                 |    4 +-
 doc/contrib/mod_quotatab_radius.html               |    4 +-
 doc/contrib/mod_quotatab_sql.html                  |    6 +-
 doc/contrib/mod_radius.html                        |    6 +-
 doc/contrib/mod_ratio.html                         |    6 +-
 doc/contrib/mod_readme.html                        |    6 +-
 doc/contrib/mod_rewrite.html                       |    6 +-
 doc/contrib/mod_sftp.html                          |    6 +-
 doc/contrib/mod_sftp_pam.html                      |    6 +-
 doc/contrib/mod_sftp_sql.html                      |    6 +-
 doc/contrib/mod_shaper.html                        |    6 +-
 doc/contrib/mod_site_misc.html                     |    6 +-
 doc/contrib/mod_snmp.html                          |    6 +-
 doc/contrib/mod_sql.html                           |    6 +-
 doc/contrib/mod_sql_odbc.html                      |    6 +-
 doc/contrib/mod_sql_passwd.html                    |    6 +-
 doc/contrib/mod_sql_sqlite.html                    |    6 +-
 doc/contrib/mod_tls.html                           |    6 +-
 doc/contrib/mod_tls_memcache.html                  |    6 +-
 doc/contrib/mod_tls_shmcache.html                  |    6 +-
 doc/contrib/mod_unique_id.html                     |    6 +-
 doc/contrib/mod_wrap.html                          |    6 +-
 doc/contrib/mod_wrap2.html                         |    6 +-
 doc/contrib/mod_wrap2_file.html                    |    6 +-
 doc/contrib/mod_wrap2_sql.html                     |    6 +-
 doc/howto/ASCII.html                               |    6 +-
 doc/howto/AuthFiles.html                           |    4 +-
 doc/howto/Authentication.html                      |    6 +-
 doc/howto/BCP.html                                 |    6 +-
 doc/howto/Chroot.html                              |    6 +-
 doc/howto/Classes.html                             |    6 +-
 doc/howto/Compiling.html                           |    6 +-
 doc/howto/ConfigFile.html                          |    6 +-
 doc/howto/ConfigurationTricks.html                 |    6 +-
 doc/howto/ConnectionACLs.html                      |    6 +-
 doc/howto/Controls.html                            |    6 +-
 doc/howto/CreateHome.html                          |    6 +-
 doc/howto/DNS.html                                 |    6 +-
 doc/howto/DSO.html                                 |    6 +-
 doc/howto/Debugging.html                           |    6 +-
 doc/howto/Directory.html                           |    6 +-
 doc/howto/DisplayFiles.html                        |    8 +-
 doc/howto/ECCN.html                                |    2 +-
 doc/howto/FTP.html                                 |    6 +-
 doc/howto/FXP.html                                 |    6 +-
 doc/howto/Filters.html                             |    6 +-
 doc/howto/Globbing.html                            |    6 +-
 doc/howto/KeepAlives.html                          |    6 +-
 doc/howto/Limit.html                               |    6 +-
 doc/howto/ListOptions.html                         |    6 +-
 doc/howto/LogLevels.html                           |    2 +-
 doc/howto/LogMessages.html                         |    2 +-
 doc/howto/Logging.html                             |    6 +-
 doc/howto/Memcache.html                            |    6 +-
 doc/howto/NAT.html                                 |    2 +-
 doc/howto/Nonroot.html                             |    4 +-
 doc/howto/Quotas.html                              |    6 +-
 doc/howto/Radius.html                              |    6 +-
 doc/howto/Rewrite.html                             |    4 +-
 doc/howto/SQL.html                                 |    6 +-
 doc/howto/SSH.html                                 |    6 +-
 doc/howto/Scoreboard.html                          |    6 +-
 doc/howto/Sendfile.html                            |    6 +-
 doc/howto/ServerType.html                          |    6 +-
 doc/howto/Stopping.html                            |    6 +-
 doc/howto/TLS.html                                 |    6 +-
 doc/howto/Testing.html                             |    6 +-
 doc/howto/Timestamps.html                          |    6 +-
 doc/howto/Tracing.html                             |    6 +-
 doc/howto/Translations.html                        |    6 +-
 doc/howto/Umask.html                               |    6 +-
 doc/howto/Upgrade.html                             |    6 +-
 doc/howto/Versioning.html                          |    6 +-
 doc/howto/Vhost.html                               |    6 +-
 doc/howto/VirtualUsers.html                        |    6 +-
 doc/howto/index.html                               |    6 +-
 doc/mod_sample.c                                   |    2 +-
 doc/modules/index.html                             |    6 +-
 doc/modules/mod_auth.html                          |    6 +-
 doc/modules/mod_auth_file.html                     |    6 +-
 doc/modules/mod_auth_pam.html                      |    6 +-
 doc/modules/mod_auth_unix.html                     |    6 +-
 doc/modules/mod_cap.html                           |    6 +-
 doc/modules/mod_core.html                          |    6 +-
 doc/modules/mod_ctrls.html                         |    6 +-
 doc/modules/mod_delay.html                         |    6 +-
 doc/modules/mod_dso.html                           |    6 +-
 doc/modules/mod_facl.html                          |    6 +-
 doc/modules/mod_facts.html                         |    6 +-
 doc/modules/mod_ident.html                         |    6 +-
 doc/modules/mod_lang.html                          |    6 +-
 doc/modules/mod_log.html                           |    6 +-
 doc/modules/mod_ls.html                            |    6 +-
 doc/modules/mod_memcache.html                      |    6 +-
 doc/modules/mod_rlimit.html                        |    6 +-
 doc/modules/mod_site.html                          |    6 +-
 doc/modules/mod_xfer.html                          |    6 +-
 doc/utils/ftpasswd.html                            |    6 +-
 doc/utils/ftpmail.html                             |    6 +-
 doc/utils/ftpquota.html                            |    6 +-
 doc/utils/index.html                               |    6 +-
 doc/utils/prxs.html                                |    6 +-
 include/ascii.h                                    |    2 +-
 include/auth.h                                     |    2 +-
 include/bindings.h                                 |    2 +-
 include/child.h                                    |    2 +-
 include/class.h                                    |    2 +-
 include/cmd.h                                      |   12 +-
 include/compat.h                                   |    2 +-
 include/conf.h                                     |   10 +-
 include/ctrls.h                                    |    2 +-
 include/data.h                                     |    2 +-
 include/default_paths.h                            |    2 +-
 include/dirtree.h                                  |   10 +-
 include/display.h                                  |    2 +-
 include/encode.h                                   |    2 +-
 include/env.h                                      |    2 +-
 include/event.h                                    |    2 +-
 include/expr.h                                     |    2 +-
 include/feat.h                                     |    2 +-
 include/filter.h                                   |    2 +-
 include/fsio.h                                     |    6 +-
 include/ftp.h                                      |    2 +-
 include/help.h                                     |    2 +-
 include/{xferlog.h => ident.h}                     |   23 +-
 include/inet.h                                     |    2 +-
 include/{child.h => lastlog.h}                     |   52 +-
 include/libsupp.h                                  |    2 +-
 include/log.h                                      |    2 +-
 include/memcache.h                                 |    2 +-
 include/mkhome.h                                   |    2 +-
 include/mod_ctrls.h                                |    2 +-
 include/mod_log.h                                  |    2 +-
 include/modules.h                                  |    2 +-
 include/netacl.h                                   |    2 +-
 include/netaddr.h                                  |    2 +-
 include/netio.h                                    |    2 +-
 include/options.h                                  |    2 +-
 include/parser.h                                   |    2 +-
 include/pidfile.h                                  |    2 +-
 include/pool.h                                     |    2 +-
 include/pr-syslog.h                                |    2 +-
 include/privs.h                                    |    2 +-
 include/proctitle.h                                |    2 +-
 include/proftpd.h                                  |    2 +-
 include/regexp.h                                   |    2 +-
 include/response.h                                 |    2 +-
 include/rlimit.h                                   |    2 +-
 include/scoreboard.h                               |    2 +-
 include/session.h                                  |    5 +-
 include/sets.h                                     |    2 +-
 include/stash.h                                    |    2 +-
 include/str.h                                      |    2 +-
 include/support.h                                  |    2 +-
 include/table.h                                    |    2 +-
 include/throttle.h                                 |    2 +-
 include/timers.h                                   |    2 +-
 include/trace.h                                    |    2 +-
 src/version.c => include/utf8.h                    |   31 +-
 include/var.h                                      |    2 +-
 include/version.h                                  |    6 +-
 include/xferlog.h                                  |    2 +-
 lib/Makefile.in                                    |   28 -
 lib/libcap/_makenames.c                            |    4 +-
 lib/libcap/cap_alloc.c                             |    4 +-
 lib/libcap/cap_extint.c                            |    4 +-
 lib/libcap/cap_file.c                              |    4 +-
 lib/libcap/cap_flag.c                              |    4 +-
 lib/libcap/cap_proc.c                              |    4 +-
 lib/libcap/cap_sys.c                               |    4 +-
 lib/libcap/cap_text.c                              |    4 +-
 lib/libcap/libcap.h                                |    4 +-
 lib/libltdl/.cvsignore                             |   12 +
 lib/libltdl/acinclude.m4                           | 7080 ++++++++++++++++++++
 lib/libltdl/config.guess                           | 1526 +++++
 lib/libltdl/config.sub                             | 1658 +++++
 lib/libltdl/install-sh                             |  519 ++
 lib/libltdl/ltmain.sh                              | 6956 +++++++++++++++++++
 lib/libltdl/missing                                |  367 +
 lib/pr-syslog.c                                    |    2 +-
 lib/pr_fnmatch_loop.c                              |    5 +-
 lib/sstrncpy.c                                     |    7 +-
 lib/tpl.c                                          |    2 +-
 modules/Makefile.in                                |  383 --
 modules/mod_auth.c                                 |   14 +-
 modules/mod_auth_file.c                            |   10 +-
 modules/mod_auth_pam.c                             |    2 +-
 modules/mod_auth_unix.c                            |    2 +-
 modules/mod_cap.c                                  |    2 +-
 modules/mod_core.c                                 |    8 +-
 modules/mod_ctrls.c                                |    2 +-
 modules/mod_delay.c                                |    2 +-
 modules/mod_dso.c                                  |    2 +-
 modules/mod_facl.c                                 |    2 +-
 modules/mod_facts.c                                |    2 +-
 modules/mod_ident.c                                |    2 +-
 modules/mod_lang.c                                 |    2 +-
 modules/mod_log.c                                  |    2 +-
 modules/mod_ls.c                                   |   42 +-
 modules/mod_memcache.c                             |    2 +-
 modules/mod_rlimit.c                               |    2 +-
 modules/mod_site.c                                 |    2 +-
 modules/mod_xfer.c                                 |   30 +-
 src/Makefile.in                                    |  961 ---
 src/auth.c                                         |    2 +-
 src/bindings.c                                     |   20 +-
 src/child.c                                        |    2 +-
 src/class.c                                        |    2 +-
 src/cmd.c                                          |   89 +-
 src/ctrls.c                                        |   22 +-
 src/data.c                                         |   22 +-
 src/dirtree.c                                      |    2 +-
 src/display.c                                      |   21 +-
 src/encode.c                                       |    2 +-
 src/env.c                                          |    2 +-
 src/event.c                                        |    2 +-
 src/expr.c                                         |    2 +-
 src/feat.c                                         |    2 +-
 src/filter.c                                       |    2 +-
 src/fsio.c                                         |   75 +-
 src/ftpdctl.8                                      |   62 -
 src/ftpdctl.c                                      |    2 +-
 {utils => src}/ftpscrub.c                          |   16 +-
 src/help.c                                         |    2 +-
 src/ident.c                                        |  239 +
 src/inet.c                                         |   31 +-
 src/lastlog.c                                      |    2 +-
 src/log.c                                          |    4 +-
 src/main.c                                         |   56 +-
 src/memcache.c                                     |    2 +-
 src/mkhome.c                                       |    2 +-
 src/modules.c                                      |    2 +-
 src/netacl.c                                       |    2 +-
 src/netaddr.c                                      |   12 +-
 src/netio.c                                        |    2 +-
 src/parser.c                                       |    2 +-
 src/pidfile.c                                      |    2 +-
 src/pool.c                                         |    2 +-
 src/privs.c                                        |  144 +-
 src/proctitle.c                                    |    2 +-
 src/proftpd.8                                      |  145 -
 src/proftpd.conf.5                                 |   53 -
 src/prxs                                           |  322 -
 src/prxs.in                                        |    2 +-
 src/regexp.c                                       |    2 +-
 src/response.c                                     |    2 +-
 src/rlimit.c                                       |    2 +-
 src/scoreboard.c                                   |   52 +-
 src/session.c                                      |    2 +-
 src/sets.c                                         |    2 +-
 src/stash.c                                        |    2 +-
 src/str.c                                          |    2 +-
 src/support.c                                      |    2 +-
 src/table.c                                        |    2 +-
 src/throttle.c                                     |    2 +-
 src/timers.c                                       |    2 +-
 src/trace.c                                        |    2 +-
 src/utf8.c                                         |  203 +
 src/var.c                                          |    2 +-
 src/version.c                                      |    2 +-
 src/wtmp.c                                         |    2 +-
 src/xferlog.5                                      |  173 -
 src/xferlog.c                                      |    2 +-
 tests/api/array.c                                  |    2 +-
 tests/api/class.c                                  |    2 +-
 tests/api/cmd.c                                    |    3 +-
 tests/api/env.c                                    |    2 +-
 tests/api/event.c                                  |    2 +-
 tests/api/expr.c                                   |    2 +-
 tests/api/feat.c                                   |    2 +-
 tests/api/fsio.c                                   |   21 +-
 tests/api/modules.c                                |    2 +-
 tests/api/netacl.c                                 |    2 +-
 tests/api/netaddr.c                                |    2 +-
 tests/api/netio.c                                  |    2 +-
 tests/api/pool.c                                   |    2 +-
 tests/api/regexp.c                                 |    2 +-
 tests/api/response.c                               |    2 +-
 tests/api/scoreboard.c                             |    2 +-
 tests/api/sets.c                                   |    2 +-
 tests/api/stash.c                                  |    2 +-
 tests/api/str.c                                    |    9 +-
 tests/api/table.c                                  |    2 +-
 tests/api/tests.h                                  |    2 +-
 tests/api/timers.c                                 |    2 +-
 tests/api/var.c                                    |    2 +-
 tests/api/version.c                                |    2 +-
 tests/t/commands.t                                 |   11 +
 tests/t/config/directory.t                         |   11 +
 tests/t/etc/modules/mod_deflate/zmode.pdf          |  Bin 2288704 -> 0 bytes
 tests/t/etc/modules/mod_geoip/GeoIP.dat            |  Bin 0 -> 1084888 bytes
 tests/t/etc/modules/mod_geoip/GeoIPASNum.dat       |  Bin 0 -> 3658209 bytes
 tests/t/etc/modules/mod_geoip/GeoIPv6.dat          |  Bin 0 -> 1232477 bytes
 tests/t/etc/modules/mod_geoip/GeoLiteCity.dat      |  Bin 0 -> 30751876 bytes
 .../modules/mod_quotatab_file/ftpquota.limittab    |  Bin 0 -> 130 bytes
 .../modules/mod_quotatab_file/ftpquota.tallytab    |  Bin 0 -> 4 bytes
 tests/t/http.t                                     |   11 +
 tests/t/lib/ProFTPD/Tests/Commands.pm              | 3838 +++++++++++
 tests/t/lib/ProFTPD/Tests/Commands/PORT.pm         |  162 +
 tests/t/lib/ProFTPD/Tests/Commands/STAT.pm         |  378 +-
 tests/t/lib/ProFTPD/Tests/Config/Directory.pm      |  299 +
 tests/t/lib/ProFTPD/Tests/Config/DisplayConnect.pm |   39 +-
 tests/t/lib/ProFTPD/Tests/HTTP.pm                  |  270 +
 tests/t/lib/ProFTPD/Tests/Modules/mod_auth_file.pm |  141 +
 tests/t/lib/ProFTPD/Tests/Modules/mod_copy.pm      |  288 +
 tests/t/lib/ProFTPD/Tests/Modules/mod_sftp.pm      |  333 +
 .../t/lib/ProFTPD/Tests/Modules/mod_sql_sqlite.pm  |  149 +
 .../t/lib/ProFTPD/Tests/Modules/mod_wrap2_file.pm  |  282 +-
 tests/t/lib/ProFTPD/Tests/SMTP.pm                  |  173 +
 tests/t/smtp.t                                     |   11 +
 utils/Makefile.in                                  |   33 -
 utils/ftpcount.1                                   |   59 -
 utils/ftpcount.c                                   |    2 +-
 utils/ftpscrub.8                                   |   55 -
 utils/ftpscrub.c                                   |    2 +-
 utils/ftpshut.8                                    |  130 -
 utils/ftpshut.c                                    |    2 +-
 utils/ftptop.1                                     |   88 -
 utils/ftptop.c                                     |    2 +-
 utils/ftpwho.1                                     |   67 -
 utils/ftpwho.c                                     |    2 +-
 utils/misc.c                                       |    2 +-
 utils/scoreboard.c                                 |    2 +-
 utils/utils.h                                      |    2 +-
 482 files changed, 27316 insertions(+), 3714 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..08130ea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,31 @@
+config.log
+config.h
+config.cache
+config.status
+autom4te.cache
+proftpd
+proftpd.pc
+module-libs.txt
+ftpshut
+ftpwho
+ftpcount
+ftptop
+ftpdctl
+ftpscrub
+include/buildstamp.h
+Makefile
+Make.rules
+Make.modules
+modules/module_glue.c
+src/prxs
+src/*.[0-9]
+stamp-h
+utils/*.[0-9]
+*.a
+*.la
+*.o
+*.patch
+*~
+*.swp
+.libs
+libtool
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..0f1106a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,42 @@
+language: c
+
+compiler:
+  - gcc
+  - clang
+
+install:
+  - sudo apt-get update -qq
+  # for unit tests
+  - sudo apt-get install -y check
+  # for mod_lang
+  - sudo apt-get install -y gettext
+  # for mod_geoip
+  - sudo apt-get install -y libgeoip-dev
+  # for mod_ldap
+  - sudo apt-get install -y libldap2-dev libsasl2-dev
+  # for memcache support
+  - sudo apt-get install -y libmemcached-dev
+  # for mod_sql_mysql
+  - sudo apt-get install -y libmysqlclient-dev
+  # for PAM support
+  - sudo apt-get install -y libpam-dev
+  # for mod_sql_postgres
+  - sudo apt-get install -y libpq-dev
+  # for OpenSSL support
+  - sudo apt-get install -y libssl-dev
+  # for mod_sql_sqlite
+  - sudo apt-get install -y libsqlite3-dev sqlite3
+  # for PCRE support
+  - sudo apt-get install -y libpcre3-dev
+  # for static code analysis
+  - sudo apt-get install -y cppcheck rats
+
+script:
+  # - find . -type f -name "*.c" -print | grep -v tests | xargs cppcheck 2>&1
+  # - find . -type f -name "*.c" -print | grep -v tests | xargs rats --language=c
+  - ./configure --enable-ctrls --enable-facl --enable-memcache --enable-nls --enable-pcre --enable-tests --with-modules=mod_sql:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite:mod_sql_passwd:mod_sftp:mod_sftp_sql:mod_sftp_pam:mod_tls:mod_tls_shmcache:mod_tls_memcache:mod_ban:mod_copy:mod_ctrls_admin:mod_deflate:mod_dnsbl:mod_dynmasq:mod_exec:mod_facl:mod_geoip:mod_ifversion:mod_ldap:mod_load:mod_log_forensic:mod_quotatab:mod_quotatab_file:mod_quotatab_sql:mod_radius:mod_readme:mod_rewrite: [...]
+  - make
+  - make check-api
+  - make clean
+  - ./configure --enable-ctrls --enable-dso --enable-facl --enable-memcache --enable-nls --enable-pcre --enable-tests --with-shared=mod_sql:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite:mod_sql_passwd:mod_sftp:mod_sftp_sql:mod_sftp_pam:mod_tls:mod_tls_shmcache:mod_tls_memcache:mod_ban:mod_copy:mod_ctrls_admin:mod_deflate:mod_dnsbl:mod_dynmasq:mod_exec:mod_facl:mod_geoip:mod_ifversion:mod_ldap:mod_load:mod_log_forensic:mod_quotatab:mod_quotatab_file:mod_quotatab_sql:mod_radius:mod_readme: [...]
+  - make
diff --git a/ChangeLog b/ChangeLog
index e353cf8..9e61a2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45963,7 +45963,7 @@
 2003-06-11 19:08  castaglia
 
 	* src/: inet.c, modules.c:
-	  Missing $Id: ChangeLog,v 1.154 2014/05/15 16:20:23 castaglia Exp $ keyword.
+	  Missing $Id: ChangeLog,v 1.154 2014-05-15 16:20:23 castaglia Exp $ keyword.
 
 2003-06-11 15:45  castaglia
 
@@ -47142,7 +47142,7 @@
 
 	* contrib/: mod_sql.c, mod_sql.h, mod_sql_mysql.c,
 	  mod_sql_postgres.c:
-	  Adding $Id: ChangeLog,v 1.154 2014/05/15 16:20:23 castaglia Exp $ tags to the mod_sql files.
+	  Adding $Id: ChangeLog,v 1.154 2014-05-15 16:20:23 castaglia Exp $ tags to the mod_sql files.
 
 2003-03-14 07:54  castaglia
 
@@ -47661,12 +47661,12 @@
 
 	* src/netio.c, src/pool.c, src/sets.c, include/ident.h,
 	  include/timers.h:
-	  Adding more $Id: ChangeLog,v 1.154 2014/05/15 16:20:23 castaglia Exp $ keywords.
+	  Adding more $Id: ChangeLog,v 1.154 2014-05-15 16:20:23 castaglia Exp $ keywords.
 
 2003-02-11 23:34  castaglia
 
 	* src/feat.c:
-	  Added $Id: ChangeLog,v 1.154 2014/05/15 16:20:23 castaglia Exp $ keyword.
+	  Added $Id: ChangeLog,v 1.154 2014-05-15 16:20:23 castaglia Exp $ keyword.
 
 2003-02-10 15:34  castaglia
 
diff --git a/Makefile.in b/Makefile.in
index 70f55df..6929976 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -223,6 +223,9 @@ spec:
 dist: depend distclean spec
 	rm -rf `find . -name CVS`
 	rm -rf `find . -name .cvsignore`
+	rm -rf `find . -name .git`
+	rm -rf `find . -name .gitignore`
+	rm -rf `find . -name .travis.yml`
 	rm -rf `find . -name core`
 	rm -rf `find . -name '*~'`
 	rm -fr `find . -name '*.bak'`
diff --git a/NEWS b/NEWS
index e345abe..795323c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-$Id: NEWS,v 1.1597 2014/05/15 16:24:13 castaglia Exp $
+$Id: NEWS,v 1.1597 2014-05-15 16:24:13 castaglia Exp $
 
 -----------------------------------------------------------------------------
   More details on the bugs listed below can be found by using the bug number
@@ -9,6 +9,56 @@ $Id: NEWS,v 1.1597 2014/05/15 16:24:13 castaglia Exp $
   where `N' is the bug number.
 -----------------------------------------------------------------------------
 
+1.3.5a - Released 27-May-2015
+--------------------------------
+- Bug 4055 - "error setting listen fd IPV6_TCLASS: Protocol not available" log
+  message.
+- Bug 3944 - Session closed if active data transfer fails due to "Address
+  already in use" error.
+- Bug 4068 - MaxClients directive doesn't work for <Anonymous> sessions.
+- Bug 4069 - NLST -a shows / directory instead of the current directory.
+- Bug 4063 - Unable to create directory on NFS/CIFS partition: Permission
+  denied.
+- Bug 4073 - Polycom VOIP phones unable to use FTPS data transfers.
+- Bug 4077 - ShaperLog not closed/reopened on SIGHUP, causing log rotation
+  problems.
+- Bug 4079 - Invalid response encoding for SFTP space-available request.
+- Bug 4083 - Using SQLDefaultHomedir with null home results in "No such user".
+- Bug 4087 - mod_sftp does not handle "MaxLoginAttempts none" properly.
+- Bug 4089 - mod_sftp does not allow multiple attempts using a given
+  authentication method.
+- Bug 4090 - mod_wrap2_file does not support IPv6 addresses properly.
+- Bug 4091 - Log "Operation not permitted" privs errors at NOTICE rather than
+  ERROR.
+- Bug 4094 - Available space on file system using %f displays wrong value.
+- Bug 4108 - SSL handshakes for data connections sometimes stall for 3-30
+  seconds.
+- Bug 4109 - setsockopt() call for IPV6_TCLASS should use IPPROTO_IPV6.
+- Bug 4112 - Failure to connect using mod_sftp sometimes due to too-small
+  buffers.
+- Bug 4114 - mod_tls should not support SSLv3 by default.
+- Bug 4116 - Report exact SSL/TLS protocol version used in client connections.
+- Bug 4124 - DeleteAbortedStores defaults to "on" for all transfers, not just
+  HiddenStores.
+- Bug 4129 - mod_sql caches incorrect UID/GID when name cannot be retrieved.
+- Bug 4131 - mod_sftp's autoconf script does not detect OpenSSL SHA2 support.
+- Bug 4133 - LDAPUsers directive does not honor uid-number-filter-template
+  parameter.
+- Bug 4137 - GeoIPDenyFilter incorrectly takes precedence over GeoIPAllowFilter.
+- Bug 4140 - SFTP READLINK requests to symlinks to directories fail.
+- Bug 4143 - HTTPS/FTPS protocol confusion leads to XSS.
+- Bug 4145 - Segfault if AuthUserFile is a relative symlink.
+- Bug 4152 - Reduce logging of non-fatal "unable to open incoming connection"
+  errors.
+- Bug 4155 - SSH keys with too-long Comment headers aren't recognized by
+  mod_sftp_sql.
+- Bug 4156 - Segfault handling LIST/NLST FTP command on Mac OS X.
+- Bug 4160 - Malformed response to SSH_FXP_REALPATH with SFTP version 6.
+- Bug 4169 - Unauthenticated copying of files via SITE CPFR/CPTO allowed by
+  mod_copy.
+- Bug 4178 - TLS session reuse requirement for data connections not properly
+  enforced.
+
 1.3.5 - Released 15-May-2014
 --------------------------------
 - Bug 4018 - Implement checks for sensitive directories when chrooted.
@@ -77,7 +127,6 @@ $Id: NEWS,v 1.1597 2014/05/15 16:24:13 castaglia Exp $
 - Bug 3981 - Null pointer dereference in mod_exec with ExecOption useStdin.
 - Bug 3982 - Normalize log messages and levels.
 - Bug 3888 - Add LDAPLog directive to mod_ldap.
-- Bug 3982 - Normalize log messages and levels.
 - Bug 3986 - Support filesystems which do not support chmod(2)/chown(2),
   e.g. FAT/ExFAT.
 - Bug 3991 - SSL session caching modules use incorrect OpenSSL cache mode flags,
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 889589a..bc2c7a7 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -6,6 +6,42 @@ This file contains a description of the major changes to ProFTPD for the
 releases.  More information on these changes can be found in the NEWS and
 ChangeLog files.
 
+1.3.5a
+---------
+
+  + Fixed "stalled" SSL/TLS handshakes for data transfers.
+  + Fixed handling of SSH keys with overlong Comment headers in mod_sftp_sql.
+
+  + Changed Modules
+
+    mod_tls
+      By default, mod_tls will no longer support SSLv3 connections.  In
+      order to support SSLv3 connections (for sites that need to), you must
+      explicitly configure this via the TLSProtocol directive, e.g.:
+
+        TLSProtocol SSLv3 TLSv1 ...
+
+
+  + New Configuration Directives
+
+    CopyEngine
+      The mod_copy module is enabled by default; there may be cases where
+      the module should be disabled, without requiring a rebuild of the
+      server.  Thus mod_copy now supports a CopyEngine directive; see
+      doc/contrib/mod_copy.html#CopyEngine.
+
+
+  + Changed Configuration Directives
+
+    DeleteAbortedStores
+      The DeleteAbortedStores directive, for Bug#3917, was meant to be
+      enabled, but only when HiddenStores was in effect.  Unfortunately,
+      the fix caused a regression, as DeleteAbortedStores was enabled for
+      ALL transfers inadvertently.  The desired behavior, of enabling
+      DeleteAbortedStores only when HiddenStores is in effect, has been
+      properly implemented now.
+
+
 1.3.5
 ---------
 
@@ -571,4 +607,4 @@ ChangeLog files.
     and cmdtable.class renamed to cmdtable.cmd_class.  See Bug#3079 for
     details.
 
-Last Updated: $Date: 2014/05/09 14:52:12 $
+Last Updated: $Date: 2014-05-09 14:52:12 $
diff --git a/config.h.in b/config.h.in
index 4d23d6d..017ac00 100644
--- a/config.h.in
+++ b/config.h.in
@@ -82,6 +82,9 @@
 /* Define if you have struct sockcred.  */
 #undef HAVE_STRUCT_SOCKCRED
 
+/* Define if you have struct sockpeercred.  */
+#undef HAVE_STRUCT_SOCKPEERCRED
+
 /* Define if your spwd structure has member warn */
 #undef HAVE_SPWD_SP_WARN
 
diff --git a/configure b/configure
index f1f261f..070be4e 100755
--- a/configure
+++ b/configure
@@ -34003,6 +34003,132 @@ _ACEOF
 fi
 
 
+# See:
+#   https://github.com/proftpd/proftpd/issues/75
+{ echo "$as_me:$LINENO: checking for struct sockpeercred.uid" >&5
+echo $ECHO_N "checking for struct sockpeercred.uid... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_sockpeercred_uid+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #if HAVE_SYS_TYPES_H
+    # include <sys/types.h>
+    #endif
+    #if HAVE_SYS_SOCKET_H
+    # include <sys/socket.h>
+    #endif
+    #if HAVE_SYS_UIO_H
+    # include <sys/uio.h>
+    #endif
+
+
+int
+main ()
+{
+static struct sockpeercred ac_aggr;
+if (ac_aggr.uid)
+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 "echo \"\$as_me:$LINENO: $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
+  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_member_struct_sockpeercred_uid=yes
+else
+  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.  */
+
+    #if HAVE_SYS_TYPES_H
+    # include <sys/types.h>
+    #endif
+    #if HAVE_SYS_SOCKET_H
+    # include <sys/socket.h>
+    #endif
+    #if HAVE_SYS_UIO_H
+    # include <sys/uio.h>
+    #endif
+
+
+int
+main ()
+{
+static struct sockpeercred ac_aggr;
+if (sizeof ac_aggr.uid)
+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 "echo \"\$as_me:$LINENO: $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
+  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_member_struct_sockpeercred_uid=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_member_struct_sockpeercred_uid=no
+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
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockpeercred_uid" >&5
+echo "${ECHO_T}$ac_cv_member_struct_sockpeercred_uid" >&6; }
+if test $ac_cv_member_struct_sockpeercred_uid = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_SOCKPEERCRED 1
+_ACEOF
+
+fi
+
+
 { echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5
 echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then
diff --git a/configure.in b/configure.in
index 4987f37..be7e6ca 100644
--- a/configure.in
+++ b/configure.in
@@ -1828,6 +1828,22 @@ AC_CHECK_MEMBER(struct sockcred.sc_uid,
     #endif
   ])
 
+# See:
+#   https://github.com/proftpd/proftpd/issues/75
+AC_CHECK_MEMBER(struct sockpeercred.uid,
+  [AC_DEFINE(HAVE_STRUCT_SOCKPEERCRED, 1, [Define if you have struct sockpeercred])],,
+  [
+    #if HAVE_SYS_TYPES_H
+    # include <sys/types.h>
+    #endif
+    #if HAVE_SYS_SOCKET_H
+    # include <sys/socket.h>
+    #endif
+    #if HAVE_SYS_UIO_H
+    # include <sys/uio.h>
+    #endif
+  ])
+
 dnl IPv4/IPv6-related checks
 AC_CHECK_MEMBER(struct sockaddr_in.sin_len,
   [AC_DEFINE(SIN_LEN, 1, [Define if you have sockaddr_in.sin_len])],,
diff --git a/contrib/INSTALL.mod_wrap b/contrib/INSTALL.mod_wrap
new file mode 100644
index 0000000..787907d
--- /dev/null
+++ b/contrib/INSTALL.mod_wrap
@@ -0,0 +1,31 @@
+-----------------------------------------------------------------------------
+TJ Saunders <tj at castaglia.org>
+2002-01-03
+-----------------------------------------------------------------------------
+
+To install mod_wrap, copy the mod_wrap.c file into
+
+  <proftpd-dir>/contrib
+
+after unpacking the proftpd-1.2.5rc1 (or later) source code.  Then run:
+
+  ./configure --with-modules=mod_wrap
+  make
+  make install
+
+Solaris system users will need to obtain and build the tcpwrappers library, as
+it does not come installed by default with Solaris.
+
+mod_wrap-1.2.2 and later will not build properly on FreeBSD-4.4, as they, in
+their wisdom, decided to put the NIS/YP functions in a library other than
+libnsl.a (which is where Solaris and Linux have those functions).  This means
+that, when building proftpd with mod_wrap-1.2.2 (or later) on FreeBSD-4.4
+(possibly earlier?) platforms will need to change this line in mod_wrap.c:
+
+ * $Libraries: -lwrap -lnsl$
+
+to be:
+
+ * $Libraries: -lwrap$
+
+----------------------------------------------------------------------------
diff --git a/contrib/README.mod_wrap b/contrib/README.mod_wrap
new file mode 100644
index 0000000..5cf42e6
--- /dev/null
+++ b/contrib/README.mod_wrap
@@ -0,0 +1,242 @@
+  ------------------------------------------------------------------------
+
+                           ProFTPD module mod_wrap
+
+  ------------------------------------------------------------------------
+
+This module is contained in the contrib/mod_wrap.c file for ProFTPD 1.2.x,
+and is not compiled by default. It enables the daemon to use the common
+tcpwrappers access control library while in standalone mode, and in a very
+configurable manner.
+
+If not installed on your system, the TCP wrappers library, required by this
+module, can be found here, on Wietse Venema's site. Once installed, it
+highly recommended that the hosts_access(3) and hosts_access(5) man pages be
+read and understood. The installation of mod_wrap is fairly straightforward,
+with some caveats for Solaris and FreeBSD users.
+
+Many programs will automatically add entries in the common allow/deny files,
+and use of this module will allow a ProFTPD daemon running in standalone
+mode to adapt as these entries are added. The portsentry program does this,
+for example: when illegal access is attempted, it will add hosts to the
+/etc/hosts.deny file.
+
+tcpdmatch
+
+The most current version of mod_wrap can be found at:
+
+  http://www.castaglia.org/proftpd/
+
+Author
+
+Please contact TJ Saunders <tj at castaglia.org> with any questions,
+concerns, or suggestions regarding this module.
+
+Thanks
+
+2000-05-29: Thanks to David Douthitt <ssrat at mailbag.com> for pointing out
+the usefulness of using mod_wrap in conjunction with portsentry
+
+2001-03-01: Updated the configuration directives, as per lung at theuw.net's
+helpful suggestions.
+
+2001-09-24: Thanks to Zenon Mousmoulas <cajoline at chaosengine.de > for
+helping determine that adding -lnsl would help in compiling mod_wrap with
+the stock RedHat libwrap.a, so that recompiling tcpwrappers without NIS/YP
+support should no longer be necessary.
+
+2001-09-27: Thanks to Gabe Frost <gfrost at gostnet.com> for helping track
+down several mergedown bugs.
+
+2001-12-19: Thanks to Mark Castillo <markc at webFreak.com> for pointing out
+the issue with passwords not being properly hidden
+
+Directives
+
+   * TCPAccessFiles
+   * TCPAccessSyslogLevels
+   * TCPGroupAccessFiles
+   * TCPServiceName
+   * TCPUserAccessFiles
+
+  ------------------------------------------------------------------------
+
+TCPAccessFiles
+
+Syntax: TCPAccessFiles allow-filename deny-filename
+Default: None
+Context: server config, <VirtualHost, <Global>, <Anonymous>
+Module: mod_wrap
+Compatibility: 1.2.1 and later
+
+TCPAccessFiles specifies two files, an allow and a deny file, each of which
+contain the IP addresses, networks or name-based masks to be allowed or
+denied connections to the server. The files have the same format as the
+standard tcpwrappers hosts.allow/deny files.
+
+Both file names are required. Also, the paths to both files must be the full
+path, with two exceptions: if the path starts with ~/, the check of that
+path will be delayed until a user requests a connection, at which time the
+path will be resolved to that user's home directory; or if the path starts
+with ~user/, where user is some system user. In this latter case, mod_wrap
+will attempt to resolve and verify the given user's home directory on
+start-up.
+
+The service name for which mod_wrap will look in the indicated access files
+is proftpd by default; this can be configured via the TCPServiceName
+directive.
+
+There is a built-in precedence to the TCPAccessFiles, TCPGroupAccessFiles,
+and TCPUserAccessFiles directives, if all are used. mod_wrap will look for
+applicable TCPUserAccessFiles for the connecting user first. If no
+applicable TCPUserAccessFiles is found, mod_wrap will search for
+TCPGroupAccessFiles which pertain to the connecting user. If not found,
+mod_wrap will then look for the server-wide TCPAccessFiles directive. This
+allows for access control to be set on a per-server basis, and allow for
+per-user or per-group access control to be handled without interfering with
+the server access rules.
+
+Example:
+
+  # server-wide access files
+  TCPAccessFiles /etc/ftpd.allow /etc/ftpd.deny
+
+  # per-user access files, which are to be found in the user's home directory
+  TCPAccessFiles ~/my.allow ~/my.deny
+
+See also: TCPGroupAccessFiles, TCPServiceName, TCPUserAccessFiles
+
+  ------------------------------------------------------------------------
+
+TCPAccessSyslogLevels
+
+Syntax: TCPAccessSyslogLevels allow-level deny-level
+Default: TCPAccessSyslogLevels info warn
+Context: server config, <VirtualHost>, <Global>, <Anonymous>
+Module: mod_wrap
+Compatibility: 1.2.1 and later
+
+ProFTPD can log when a connection is allowed, or denied, as the result of
+rules in the files specified in TCPAccessFiles, to the Unix syslog
+mechanism. A discussion on the syslog levels which can be used is given in
+the SyslogLevel directive.
+
+The allow-level parameter sets the syslog level at which allowed connections
+are logged; the deny-level parameter sets the syslog level for denied
+connections.
+
+Example:
+
+  TCPAccessSyslogLevels debug warn
+
+  ------------------------------------------------------------------------
+
+TCPGroupAccessFiles
+
+Syntax: TCPGroupAccessFiles group-expression allow-filename deny-filename
+Default: None
+Context: server config, <VirtualHost>, <Global>
+Module: mod_wrap
+Compatibility: 1.2.1 and later
+
+TCPGroupAccessFiles allows for access control files, the same types of files
+required by TCPAccessFiles, to be applied to select groups. The given
+group-expression is a logical AND expression, which means that the
+connecting user must be a member of all the groups listed for this directive
+to apply. Group names may be negated with a ! prefix.
+
+The rules for the filename paths are the same as for TCPAccessFiles
+settings.
+
+Example:
+
+  # every member of group wheel must connect from restricted locations
+  TCPGroupAccessFiles wheel /etc/ftpd-strict.allow /etc/ftpd-strict.deny
+
+  # everyone else gets the standard access rules
+  TCPGroupAccessFiles !wheel /etc/hosts.allow /etc/hosts.deny
+
+See Also: TCPAccessFiles
+
+  ------------------------------------------------------------------------
+
+TCPServiceName
+
+Syntax: TCPServiceName name
+Default: TCPServiceName proftpd
+Context: server config, <VirtualHost>, <Global>
+Module: mod_wrap
+Compatibility: 1.2.1 and later
+
+TCPServiceName is used to configure the name of the service under which
+mod_wrap will check the allow/deny files. By default, this is the name of
+the program started, i.e. "proftpd". However, some administrators may want
+to use a different, more generic service name, such as "ftpd"; use this
+directive for such needs.
+
+  ------------------------------------------------------------------------
+
+TCPUserAccessFiles
+
+Syntax: TCPUserAccessFiles user-expression allow-filename deny-filename
+Default: None
+Context: server config, virtual host
+Module: mod_wrap
+Compatibility: 1.2.1 and later
+
+TCPUserAccessFiles allows for access control files, the same types of files
+required by TCPAccessFiles, to be applied to select users. The given
+user-expression is a logical AND expression. Listing multiple users in a
+user-expression does not make much sense; however, this type of AND
+evaluation allows for expressions such as "everyone except this user" with
+the use of the ! negation prefix.
+
+The rules for the filename paths are the same as for TCPAccessFiles
+settings.
+
+Example:
+
+  # user admin might be allowed to connect from anywhere
+  TCPUserAccessFiles admin /etc/ftpd-anywhere.allow /etc/ftpd-anywhere.deny
+
+  # while every other user has to connect from LAN addresses
+  TCPUserAccessFiles !admin /etc/ftpd-lan.allow /etc/ftpd-lan.deny
+
+See also: TCPAccessFiles
+
+  ------------------------------------------------------------------------
+
+Installation
+
+Use of mod_wrap is straightforward, with some minor caveats. If you're using
+Solaris, you'll need to obtain and build the tcpwrappers library, as this
+library does not come installed on stock Solaris systems. If you're using
+FreeBSD-4.4-STABLE (and possibly other versions), you'll need to change the
+following line in the header of mod_wrap.c:
+
+ * $Libraries: -lwrap -lnsl$
+
+to be:
+
+ * $Libraries: -lwrap$
+
+This line is needed on Linux and Solaris machines, to properly link against
+the libnsl.a library, which implements the NIS/YP functions. In FreeBSD,
+these functions are implemented in libc.
+
+Then, you need simply follow the normal steps for using third-party modules
+in proftpd:
+
+  ./configure --with-modules=mod_wrap
+  make
+  make install
+
+  ------------------------------------------------------------------------
+
+Author: $Author: castaglia $
+Last Updated: $Date: 2002-05-12 23:22:16 $
+
+  ------------------------------------------------------------------------
+� Copyright 2000-2002 TJ Saunders
+All Rights Reserved
+  ------------------------------------------------------------------------
diff --git a/proftpd.spec b/contrib/dist/rpm/proftpd.spec
similarity index 99%
rename from proftpd.spec
rename to contrib/dist/rpm/proftpd.spec
index 156d73c..98c5f25 100644
--- a/proftpd.spec
+++ b/contrib/dist/rpm/proftpd.spec
@@ -1,4 +1,4 @@
-# $Id: proftpd.spec,v 1.90 2014/05/15 15:53:13 castaglia Exp $
+# $Id: proftpd.spec,v 1.90 2014-05-15 15:53:13 castaglia Exp $
 
 # Module List:
 #
@@ -43,19 +43,19 @@
 # RHEL5 and clones don't have suitably recent versions of pcre/libmemcached
 # so use --with rhel5 to inhibit those features when using --with everything
 
-%global proftpd_version	1.3.5
+%global proftpd_version           1.3.5
 
 # When doing a stable or maint release, this line is to be commented out.
 # When doing an RC, define it to be e.g. 'rc2'.
 #
 # NOTE: rpmbuild is really bloody stupid, and CANNOT handle a leading '#'
 # character followed by a '%' character.  
-#global release_cand_version	
+%global release_cand_version      a
 
 %global usecvsversion             0%{?_with_cvs:1}
 
-%global proftpd_cvs_version_main	1.3.5
-%global proftpd_cvs_version_date  20140515
+%global proftpd_cvs_version_main  1.3.5
+%global proftpd_cvs_version_date  20150527
 
 # Spec default assumes that a gzipped tarball is used, since nightly CVS builds,
 # release candidates and stable/maint releases are all available in that form;
diff --git a/contrib/ftpasswd b/contrib/ftpasswd
index 9d4a39c..c42c789 100755
--- a/contrib/ftpasswd
+++ b/contrib/ftpasswd
@@ -21,7 +21,7 @@
 # format, or AuthGroupFile, in group(5) format.  The idea is somewhat similar
 # to Apache's htpasswd program.
 #
-#  $Id: ftpasswd,v 1.22 2013/12/10 17:26:30 castaglia Exp $
+#  $Id: ftpasswd,v 1.22 2013-12-10 17:26:30 castaglia Exp $
 # ---------------------------------------------------------------------------
 
 use strict;
diff --git a/contrib/ftpmail b/contrib/ftpmail
index a31b3fe..a28a96f 100755
--- a/contrib/ftpmail
+++ b/contrib/ftpmail
@@ -16,7 +16,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
 #
-#  $Id: ftpmail,v 1.8 2013/10/13 22:34:14 castaglia Exp $
+#  $Id: ftpmail,v 1.8 2013-10-13 22:34:14 castaglia Exp $
 # ---------------------------------------------------------------------------
 
 use strict;
diff --git a/contrib/ftpquota b/contrib/ftpquota
index 0681f34..add5be0 100755
--- a/contrib/ftpquota
+++ b/contrib/ftpquota
@@ -16,7 +16,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
 #
-#  $Id: ftpquota,v 1.6 2013/04/23 23:25:20 castaglia Exp $
+#  $Id: ftpquota,v 1.6 2013-04-23 23:25:20 castaglia Exp $
 # -------------------------------------------------------------------------
 
 use strict;
diff --git a/contrib/mod_ban.c b/contrib/mod_ban.c
index c3dccbe..aab9278 100644
--- a/contrib/mod_ban.c
+++ b/contrib/mod_ban.c
@@ -25,7 +25,7 @@
  * This is mod_ban, contrib software for proftpd 1.2.x/1.3.x.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_ban.c,v 1.75 2014/04/30 17:33:33 castaglia Exp $
+ * $Id: mod_ban.c,v 1.75 2014-04-30 17:33:33 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_copy.c b/contrib/mod_copy.c
index 246cd88..1a48666 100644
--- a/contrib/mod_copy.c
+++ b/contrib/mod_copy.c
@@ -2,7 +2,7 @@
  * ProFTPD: mod_copy -- a module supporting copying of files on the server
  *                      without transferring the data to the client and back
  *
- * Copyright (c) 2009-2012 TJ Saunders
+ * Copyright (c) 2009-2015 TJ Saunders
  *
  * 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
@@ -25,13 +25,11 @@
  *
  * This is mod_copy, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
- *
- * $Id: mod_copy.c,v 1.8 2012/12/27 22:31:29 castaglia Exp $
  */
 
 #include "conf.h"
 
-#define MOD_COPY_VERSION	"mod_copy/0.4"
+#define MOD_COPY_VERSION	"mod_copy/0.5"
 
 /* Make sure the version of proftpd is as necessary. */
 #if PROFTPD_VERSION_NUMBER < 0x0001030401
@@ -40,6 +38,8 @@
 
 extern pr_response_t *resp_list, *resp_err_list;
 
+static int copy_engine = TRUE;
+
 static const char *trace_channel = "copy";
 
 /* These are copied largely from src/mkhome.c */
@@ -471,10 +471,37 @@ static int copy_paths(pool *p, const char *from, const char *to) {
   return 0;
 }
 
+/* Configuration handlers
+ */
+
+/* usage: CopyEngine on|off */
+MODRET set_copyengine(cmd_rec *cmd) {
+  int engine = -1;
+  config_rec *c;
+
+  CHECK_ARGS(cmd, 1);
+  CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
+
+  engine = get_boolean(cmd, 1);
+  if (engine == -1) {
+    CONF_ERROR(cmd, "expected Boolean parameter");
+  }
+
+  c = add_config_param(cmd->argv[0], 1, NULL);
+  c->argv[0] = palloc(c->pool, sizeof(int));
+  *((int *) c->argv[0]) = engine;
+
+  return PR_HANDLED(cmd);
+}
+
 /* Command handlers
  */
 
 MODRET copy_copy(cmd_rec *cmd) {
+  if (copy_engine == FALSE) {
+    return PR_DECLINED(cmd);
+  }
+
   if (cmd->argc < 2) {
     return PR_DECLINED(cmd);
   }
@@ -539,12 +566,26 @@ MODRET copy_cpfr(cmd_rec *cmd) {
   register unsigned int i;
   int res;
   char *path = "";
+  unsigned char *authenticated = NULL;
+
+  if (copy_engine == FALSE) {
+    return PR_DECLINED(cmd);
+  }
 
   if (cmd->argc < 3 ||
       strncasecmp(cmd->argv[1], "CPFR", 5) != 0) {
     return PR_DECLINED(cmd);
   }
 
+  authenticated = get_param_ptr(cmd->server->conf, "authenticated", FALSE);
+  if (authenticated == NULL ||
+      *authenticated == FALSE) {
+    pr_response_add_err(R_530, _("Please login with USER and PASS"));
+  
+    errno = EPERM;
+    return PR_ERROR(cmd);
+  }
+
   CHECK_CMD_MIN_ARGS(cmd, 3);
 
   /* Construct the target file name by concatenating all the parameters after
@@ -594,12 +635,26 @@ MODRET copy_cpfr(cmd_rec *cmd) {
 MODRET copy_cpto(cmd_rec *cmd) {
   register unsigned int i;
   char *from, *to = "";
+  unsigned char *authenticated = NULL;
+
+  if (copy_engine == FALSE) {
+    return PR_DECLINED(cmd);
+  }
 
   if (cmd->argc < 3 ||
       strncasecmp(cmd->argv[1], "CPTO", 5) != 0) {
     return PR_DECLINED(cmd);
   }
 
+  authenticated = get_param_ptr(cmd->server->conf, "authenticated", FALSE);
+  if (authenticated == NULL ||
+      *authenticated == FALSE) {
+    pr_response_add_err(R_530, _("Please login with USER and PASS"));
+
+    errno = EPERM;
+    return PR_ERROR(cmd);
+  }
+
   CHECK_CMD_MIN_ARGS(cmd, 3);
 
   from = pr_table_get(session.notes, "mod_copy.cpfr-path", NULL);
@@ -632,6 +687,10 @@ MODRET copy_cpto(cmd_rec *cmd) {
 }
 
 MODRET copy_log_site(cmd_rec *cmd) {
+  if (copy_engine == FALSE) {
+    return PR_DECLINED(cmd);
+  }
+
   if (cmd->argc < 3 ||
       strncasecmp(cmd->argv[1], "CPTO", 5) != 0) {
     return PR_DECLINED(cmd);
@@ -643,23 +702,58 @@ MODRET copy_log_site(cmd_rec *cmd) {
   return PR_DECLINED(cmd);
 }
 
+MODRET copy_post_pass(cmd_rec *cmd) {
+  config_rec *c;
+
+  if (copy_engine == FALSE) {
+    return PR_DECLINED(cmd);
+  }
+
+  /* The CopyEngine directive may have been changed for this user by
+   * e.g. mod_ifsession, thus we check again.
+   */
+  c = find_config(main_server->conf, CONF_PARAM, "CopyEngine", FALSE);
+  if (c != NULL) {
+    copy_engine = *((int *) c->argv[0]);
+  }
+
+  return PR_DECLINED(cmd);
+}
+
 /* Initialization functions
  */
 
 static int copy_sess_init(void) {
+  config_rec *c;
+
+  c = find_config(main_server->conf, CONF_PARAM, "CopyEngine", FALSE);
+  if (c != NULL) {
+    copy_engine = *((int *) c->argv[0]);
+  }
+
+  if (copy_engine == FALSE) {
+    return 0;
+  }
+
   /* Advertise support for the SITE command */
   pr_feat_add("SITE COPY");
-
   return 0;
 }
 
 /* Module API tables
  */
 
+static conftable copy_conftab[] = {
+  { "CopyEngine",	set_copyengine,		NULL },
+
+  { NULL }
+};
+
 static cmdtable copy_cmdtab[] = {
   { CMD, 	C_SITE, G_WRITE,	copy_copy,	FALSE,	FALSE, CL_MISC },
   { CMD, 	C_SITE, G_DIRS,		copy_cpfr,	FALSE,	FALSE, CL_MISC },
   { CMD, 	C_SITE, G_WRITE,	copy_cpto,	FALSE,	FALSE, CL_MISC },
+  { POST_CMD,	C_PASS,	G_NONE,		copy_post_pass, FALSE,	FALSE },
   { LOG_CMD, 	C_SITE, G_NONE,		copy_log_site,	FALSE,	FALSE },
   { LOG_CMD_ERR, C_SITE, G_NONE,	copy_log_site,	FALSE,	FALSE },
 
@@ -676,7 +770,7 @@ module copy_module = {
   "copy",
 
   /* Module configuration handler table */
-  NULL,
+  copy_conftab,
 
   /* Module command handler table */
   copy_cmdtab,
diff --git a/contrib/mod_ctrls_admin.c b/contrib/mod_ctrls_admin.c
index 0987491..c77e39e 100644
--- a/contrib/mod_ctrls_admin.c
+++ b/contrib/mod_ctrls_admin.c
@@ -25,7 +25,7 @@
  * This is mod_controls, contrib software for proftpd 1.2 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_ctrls_admin.c,v 1.47 2013/10/13 22:51:36 castaglia Exp $
+ * $Id: mod_ctrls_admin.c,v 1.47 2013-10-13 22:51:36 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_deflate.c b/contrib/mod_deflate.c
index 8c86a5c..f1e098d 100644
--- a/contrib/mod_deflate.c
+++ b/contrib/mod_deflate.c
@@ -25,7 +25,7 @@
  * This is mod_deflate, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_deflate.c,v 1.14 2014/01/03 07:19:01 castaglia Exp $
+ * $Id: mod_deflate.c,v 1.14 2014-01-03 07:19:01 castaglia Exp $
  * $Libraries: -lz $
  */
 
diff --git a/contrib/mod_dnsbl/mod_dnsbl.c b/contrib/mod_dnsbl/mod_dnsbl.c
index 1955c6e..e92d8de 100644
--- a/contrib/mod_dnsbl/mod_dnsbl.c
+++ b/contrib/mod_dnsbl/mod_dnsbl.c
@@ -26,7 +26,7 @@
  * This is mod_dnsbl, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_dnsbl.c,v 1.2 2013/10/13 16:48:08 castaglia Exp $
+ * $Id: mod_dnsbl.c,v 1.2 2013-10-13 16:48:08 castaglia Exp $
  */
 
 #include "mod_dnsbl.h"
diff --git a/contrib/mod_dnsbl/mod_dnsbl.h.in b/contrib/mod_dnsbl/mod_dnsbl.h.in
index fda16f1..f1e41c3 100644
--- a/contrib/mod_dnsbl/mod_dnsbl.h.in
+++ b/contrib/mod_dnsbl/mod_dnsbl.h.in
@@ -23,7 +23,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_dnsbl.h.in,v 1.2 2013/09/18 21:47:19 castaglia Exp $
+ * $Id: mod_dnsbl.h.in,v 1.2 2013-09-18 21:47:19 castaglia Exp $
  */
 
 #ifndef MOD_DNSBL_H
diff --git a/contrib/mod_dynmasq.c b/contrib/mod_dynmasq.c
index e3667d5..dc1cdad 100644
--- a/contrib/mod_dynmasq.c
+++ b/contrib/mod_dynmasq.c
@@ -26,7 +26,7 @@
  * This is mod_dynmasq, contrib software for proftpd 1.2.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_dynmasq.c,v 1.11 2013/10/13 22:51:36 castaglia Exp $
+ * $Id: mod_dynmasq.c,v 1.11 2013-10-13 22:51:36 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_exec.c b/contrib/mod_exec.c
index f8f9153..936655a 100644
--- a/contrib/mod_exec.c
+++ b/contrib/mod_exec.c
@@ -24,7 +24,7 @@
  * This is mod_exec, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_exec.c,v 1.40 2014/05/02 21:13:33 castaglia Exp $
+ * $Id: mod_exec.c,v 1.40 2014-05-02 21:13:33 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_geoip.c b/contrib/mod_geoip.c
index 0d525c5..9936dce 100644
--- a/contrib/mod_geoip.c
+++ b/contrib/mod_geoip.c
@@ -1,7 +1,7 @@
 /*
  * ProFTPD: mod_geoip -- a module for looking up country/city/etc for clients
  *
- * Copyright (c) 2010-2013 TJ Saunders
+ * Copyright (c) 2010-2014 TJ Saunders
  *
  * 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
@@ -26,7 +26,6 @@
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
  * --- DO NOT DELETE BELOW THIS LINE ----
- * $Id: mod_geoip.c,v 1.10 2013/10/13 22:51:36 castaglia Exp $
  * $Libraries: -lGeoIP$
  */
 
@@ -37,7 +36,7 @@
  * module for Apache.
  */
 
-#define MOD_GEOIP_VERSION		"mod_geoip/0.5"
+#define MOD_GEOIP_VERSION		"mod_geoip/0.6"
 
 /* Make sure the version of proftpd is as necessary. */
 #if PROFTPD_VERSION_NUMBER < 0x0001030402
@@ -135,12 +134,12 @@ static const char *get_geoip_filter_name(int);
 static const char *get_geoip_filter_value(int);
 
 static int check_geoip_filters(geoip_policy_e policy) {
-  int matched_allow_filter = -1, allow_conn = 0;
+  int allow_conn = 0, matched_allow_filter = -1, matched_deny_filter = -1;
 #if PR_USE_REGEX
   config_rec *c;
 
   c = find_config(main_server->conf, CONF_PARAM, "GeoIPAllowFilter", FALSE);
-  while (c) {
+  while (c != NULL) {
     int filter_id, res;
     pr_regex_t *filter_re;
     const char *filter_name, *filter_pattern, *filter_value;
@@ -170,6 +169,9 @@ static int check_geoip_filters(geoip_policy_e policy) {
       filter_pattern);
 
     if (res == 0) {
+      (void) pr_log_writefile(geoip_logfd, MOD_GEOIP_VERSION,
+        "%s filter value '%s' matched GeoIPAllowFilter pattern '%s'",
+        filter_name, filter_value, filter_pattern);
       matched_allow_filter = TRUE;
       break;
     }
@@ -182,13 +184,17 @@ static int check_geoip_filters(geoip_policy_e policy) {
   }
 
   c = find_config(main_server->conf, CONF_PARAM, "GeoIPDenyFilter", FALSE);
-  while (c) {
+  while (c != NULL) {
     int filter_id, res;
     pr_regex_t *filter_re;
     const char *filter_name, *filter_pattern, *filter_value;
 
     pr_signals_handle();
 
+    if (matched_deny_filter == -1) {
+      matched_deny_filter = FALSE;
+    }
+
     filter_id = *((int *) c->argv[0]);
     filter_pattern = c->argv[1];
     filter_re = c->argv[2];
@@ -211,16 +217,34 @@ static int check_geoip_filters(geoip_policy_e policy) {
       (void) pr_log_writefile(geoip_logfd, MOD_GEOIP_VERSION,
         "%s filter value '%s' matched GeoIPDenyFilter pattern '%s'",
         filter_name, filter_value, filter_pattern);
-      return -1;
+      matched_deny_filter = TRUE;
+      break;
     }
 
+    (void) pr_log_writefile(geoip_logfd, MOD_GEOIP_VERSION,
+      "%s filter value '%s' did not match GeoIPDenyFilter pattern '%s'",
+      filter_name, filter_value, filter_pattern);
+
     c = find_config_next(c, c->next, CONF_PARAM, "GeoIPDenyFilter", FALSE);
   }
 #endif /* !HAVE_REGEX_H or !HAVE_REGCOMP */
 
   switch (policy) {
     case GEOIP_POLICY_ALLOW_DENY:
-      allow_conn = 0;
+      if (matched_deny_filter == TRUE &&
+          matched_allow_filter != TRUE) {
+        /* If we explicitly matched any deny filters AND have NOT explicitly
+         * matched any allow filters, the connection is rejected, otherwise,
+         * it is allowed.
+         */
+        (void) pr_log_writefile(geoip_logfd, MOD_GEOIP_VERSION,
+          "client matched GeoIPDenyFilter, rejecting connection");
+        allow_conn = -1;
+
+      } else {
+        pr_trace_msg(trace_channel, 9,
+          "allowing client connection (policy 'allow,deny')");
+      }
       break;
 
     case GEOIP_POLICY_DENY_ALLOW:
@@ -228,7 +252,13 @@ static int check_geoip_filters(geoip_policy_e policy) {
         /* If we have not explicitly matched any allow filters, then
          * reject the connection.
          */
+        (void) pr_log_writefile(geoip_logfd, MOD_GEOIP_VERSION,
+          "client did not match any GeoIPAllowFilters, rejecting connection");
         allow_conn = -1;
+
+      } else {
+        pr_trace_msg(trace_channel, 9,
+          "allowing client connection (policy 'deny,allow')");
       }
       break;
   }
diff --git a/contrib/mod_ifsession.c b/contrib/mod_ifsession.c
index 23b488d..06ef869 100644
--- a/contrib/mod_ifsession.c
+++ b/contrib/mod_ifsession.c
@@ -26,7 +26,7 @@
  * This is mod_ifsession, contrib software for proftpd 1.2 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_ifsession.c,v 1.56 2014/02/15 18:54:00 castaglia Exp $
+ * $Id: mod_ifsession.c,v 1.56 2014-02-15 18:54:00 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_ifversion.c b/contrib/mod_ifversion.c
index 9a70d6b..b73f51c 100644
--- a/contrib/mod_ifversion.c
+++ b/contrib/mod_ifversion.c
@@ -26,7 +26,7 @@
  * This is mod_ifversion, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_ifversion.c,v 1.5 2013/02/15 22:46:42 castaglia Exp $
+ * $Id: mod_ifversion.c,v 1.5 2013-02-15 22:46:42 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_ldap.c b/contrib/mod_ldap.c
index 1091703..915c743 100644
--- a/contrib/mod_ldap.c
+++ b/contrib/mod_ldap.c
@@ -22,7 +22,7 @@
  * source code for OpenSSL in the source distribution.
  *
  * -----DO NOT EDIT BELOW THIS LINE-----
- * $Id: mod_ldap.c,v 1.107 2013/11/24 00:45:28 castaglia Exp $
+ * $Id: mod_ldap.c,v 1.107 2013-11-24 00:45:28 castaglia Exp $
  * $Libraries: -lldap -llber$
  */
 
@@ -1842,7 +1842,8 @@ MODRET set_ldapattr(cmd_rec *cmd) {
   return PR_HANDLED(cmd);
 }
 
-MODRET set_ldapuserlookups(cmd_rec *cmd) {
+/* usage: LDAPUsers base-dn [name-filter-template [uid-filter-template]] */
+MODRET set_ldapusers(cmd_rec *cmd) {
   config_rec *c;
 
   CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
@@ -1856,6 +1857,9 @@ MODRET set_ldapuserlookups(cmd_rec *cmd) {
   if (cmd->argc > 2) {
     c->argv[1] = pstrdup(c->pool, cmd->argv[2]);
   }
+  if (cmd->argc > 3) {
+    c->argv[2] = pstrdup(c->pool, cmd->argv[3]);
+  }
 
   return PR_HANDLED(cmd);
 }
@@ -2307,7 +2311,7 @@ static conftable ldap_conftab[] = {
   { "LDAPQueryTimeout",		set_ldapquerytimeout,		NULL },
   { "LDAPSearchScope",		set_ldapsearchscope,		NULL },
   { "LDAPServer",		set_ldapserver,			NULL },
-  { "LDAPUsers",		set_ldapuserlookups,		NULL },
+  { "LDAPUsers",		set_ldapusers,			NULL },
   { "LDAPUseTLS",		set_ldapusetls,			NULL },
 
   { NULL, NULL, NULL },
diff --git a/contrib/mod_load/mod_load.c b/contrib/mod_load/mod_load.c
index 1602955..4c206b2 100644
--- a/contrib/mod_load/mod_load.c
+++ b/contrib/mod_load/mod_load.c
@@ -31,7 +31,7 @@
  *   Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
  *     Free Software Foundation, Inc.
  * 
- * $Id: mod_load.c,v 1.8 2013/10/13 22:51:36 castaglia Exp $
+ * $Id: mod_load.c,v 1.8 2013-10-13 22:51:36 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_load/mod_load.c b/contrib/mod_load/mod_load.c.in
similarity index 99%
copy from contrib/mod_load/mod_load.c
copy to contrib/mod_load/mod_load.c.in
index 1602955..73746cd 100644
--- a/contrib/mod_load/mod_load.c
+++ b/contrib/mod_load/mod_load.c.in
@@ -1,7 +1,7 @@
 /*
  * ProFTPD: mod_load -- a module for refusing connections based on system load
  *
- * Copyright (c) 2001-2013 TJ Saunders
+ * Copyright (c) 2001-2011 TJ Saunders
  *
  * 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
@@ -31,7 +31,8 @@
  *   Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
  *     Free Software Foundation, Inc.
  * 
- * $Id: mod_load.c,v 1.8 2013/10/13 22:51:36 castaglia Exp $
+ * $Id: mod_load.c.in,v 1.10 2011-05-23 20:58:46 castaglia Exp $
+ * $Libraries: @MODULE_LIBS@ $
  */
 
 #include "conf.h"
@@ -1024,8 +1025,8 @@ static int load_sess_init(void) {
     curr_load);
 
   if (curr_load >= max_load) {
-    pr_log_pri(PR_LOG_NOTICE, MOD_LOAD_VERSION
-      ": MaxLoad (%.2f) reached: connection denied", max_load);
+    pr_log_pri(PR_LOG_INFO, "MaxLoad (%.2f) reached: connection denied",
+      max_load);
 
     if (c->argc == 2) {
       pr_response_send(R_421, "%s", (const char *) c->argv[1]);
diff --git a/contrib/mod_qos.c b/contrib/mod_qos.c
index e8ac4ee..02a664e 100644
--- a/contrib/mod_qos.c
+++ b/contrib/mod_qos.c
@@ -25,7 +25,7 @@
  *
  * This is mod_qos, contrib software for proftpd 1.3.x and above.
  *
- * $Id: mod_qos.c,v 1.4 2011/05/23 20:56:40 castaglia Exp $
+ * $Id: mod_qos.c,v 1.4 2011-05-23 20:56:40 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_quotatab.c b/contrib/mod_quotatab.c
index 7e9c741..f2cad8a 100644
--- a/contrib/mod_quotatab.c
+++ b/contrib/mod_quotatab.c
@@ -2,7 +2,7 @@
  * ProFTPD: mod_quotatab -- a module for managing FTP byte/file quotas via
  *                          centralized tables
  *
- * Copyright (c) 2001-2013 TJ Saunders
+ * Copyright (c) 2001-2014 TJ Saunders
  *
  * 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
@@ -28,7 +28,7 @@
  * ftp://pooh.urbanrage.com/pub/c/.  This module, however, has been written
  * from scratch to implement quotas in a different way.
  *
- * $Id: mod_quotatab.c,v 1.87 2013/12/09 19:16:13 castaglia Exp $
+ * $Id: mod_quotatab.c,v 1.87 2013-12-09 19:16:13 castaglia Exp $
  */
 
 #include "mod_quotatab.h"
@@ -1706,25 +1706,28 @@ MODRET set_quotatable(cmd_rec *cmd) {
    * given as one string to enhance its similarity to URL syntax.
    */
   tmp = strchr(cmd->argv[1], ':');
-  if (tmp == NULL)
+  if (tmp == NULL) {
     CONF_ERROR(cmd, "badly formatted parameter");
+  }
 
   *tmp++ = '\0';
 
   /* Verify that the requested source type has been registered, and supports
    * the table type (limit or tally).
    */
-  if (strcasecmp(cmd->argv[0], "QuotaLimitTable") == 0)
+  if (strcasecmp(cmd->argv[0], "QuotaLimitTable") == 0) {
     tabflag = QUOTATAB_LIMIT_SRC;
 
-  else if (strcasecmp(cmd->argv[0], "QuotaTallyTable") == 0)
+  } else if (strcasecmp(cmd->argv[0], "QuotaTallyTable") == 0) {
     tabflag = QUOTATAB_TALLY_SRC;
+  }
 
 #if !defined(PR_SHARED_MODULE)
   regtab = quotatab_get_backend(cmd->argv[1], tabflag);
-  if (!regtab)
+  if (!regtab) {
     CONF_ERROR(cmd, pstrcat(cmd->tmp_pool, "unsupported table source type: '",
       cmd->argv[1], "'", NULL));
+  }
 #endif /* PR_SHARED_MODULE */
 
   add_config_param_str(cmd->argv[0], 2, cmd->argv[1], tmp);
@@ -1741,16 +1744,15 @@ static const char *quota_get_bytes_str(void *data, size_t datasz) {
   switch (byte_units) {
     case BYTE:
       /* no calculation needed */
-
       if (bytes > 0.0) {
         char buf[PR_TUNABLE_BUFFER_SIZE];
         memset(buf, '\0', sizeof(buf));
         snprintf(buf, sizeof(buf), "%.2f", bytes);
         res = pstrdup(session.pool, buf);
 
-      } else
+      } else {
         res = pstrdup(session.pool, "(unlimited)");
-
+      }
       break;
 
     case KILO:
@@ -1763,9 +1765,9 @@ static const char *quota_get_bytes_str(void *data, size_t datasz) {
         snprintf(buf, sizeof(buf), "%.2f KB", adj);
         res = pstrdup(session.pool, buf);
 
-      } else
+      } else {
         res = pstrdup(session.pool, "(unlimited)");
-
+      }
       break;
 
     case MEGA:
@@ -1778,9 +1780,9 @@ static const char *quota_get_bytes_str(void *data, size_t datasz) {
         snprintf(buf, sizeof(buf), "%.2f MB", adj);
         res = pstrdup(session.pool, buf);
 
-      } else
+      } else {
         res = pstrdup(session.pool, "(unlimited)");
-
+      }
       break;
 
     case GIGA:
@@ -1793,9 +1795,9 @@ static const char *quota_get_bytes_str(void *data, size_t datasz) {
         snprintf(buf, sizeof(buf), "%.2f GB", adj);
         res = pstrdup(session.pool, buf);
 
-      } else
+      } else {
         res = pstrdup(session.pool, "(unlimited)");
-
+      }
       break;
 
     default:
@@ -1816,8 +1818,9 @@ static const char *quota_get_files_str(void *data, size_t datasz) {
     snprintf(buf, sizeof(buf), "%u", files);
     res = pstrdup(session.pool, buf);
 
-  } else
+  } else {
     res = pstrdup(session.pool, "(unlimited)");
+  }
 
   return res;
 }
diff --git a/contrib/mod_quotatab.h b/contrib/mod_quotatab.h
index 661aa88..d196930 100644
--- a/contrib/mod_quotatab.h
+++ b/contrib/mod_quotatab.h
@@ -29,7 +29,7 @@
  * ftp://pooh.urbanrage.com/pub/c/.  This module, however, has been written
  * from scratch to implement quotas in a different way.
  *
- * $Id: mod_quotatab.h,v 1.13 2012/03/31 00:35:43 castaglia Exp $
+ * $Id: mod_quotatab.h,v 1.13 2012-03-31 00:35:43 castaglia Exp $
  */
 
 #ifndef MOD_QUOTATAB_H
diff --git a/contrib/mod_quotatab_file.c b/contrib/mod_quotatab_file.c
index d78bf3e..76e213f 100644
--- a/contrib/mod_quotatab_file.c
+++ b/contrib/mod_quotatab_file.c
@@ -22,7 +22,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: mod_quotatab_file.c,v 1.8 2011/05/23 20:56:40 castaglia Exp $
+ * $Id: mod_quotatab_file.c,v 1.8 2011-05-23 20:56:40 castaglia Exp $
  */
 
 #include "mod_quotatab.h"
diff --git a/contrib/mod_quotatab_sql.c b/contrib/mod_quotatab_sql.c
index 1ae96e4..54cbeb2 100644
--- a/contrib/mod_quotatab_sql.c
+++ b/contrib/mod_quotatab_sql.c
@@ -22,7 +22,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: mod_quotatab_sql.c,v 1.17 2013/01/21 19:59:59 castaglia Exp $
+ * $Id: mod_quotatab_sql.c,v 1.17 2013-01-21 19:59:59 castaglia Exp $
  */
 
 #include "mod_quotatab.h"
diff --git a/contrib/mod_radius.c b/contrib/mod_radius.c
index f2a4c68..a714327 100644
--- a/contrib/mod_radius.c
+++ b/contrib/mod_radius.c
@@ -27,7 +27,7 @@
  * This module is based in part on code in Alan DeKok's (aland at freeradius.org)
  * mod_auth_radius for Apache, in part on the FreeRADIUS project's code.
  *
- * $Id: mod_radius.c,v 1.72 2014/01/06 18:37:44 castaglia Exp $
+ * $Id: mod_radius.c,v 1.72 2014-01-06 18:37:44 castaglia Exp $
  */
 
 #define MOD_RADIUS_VERSION "mod_radius/0.9.2"
diff --git a/contrib/mod_rewrite.c b/contrib/mod_rewrite.c
index 71aa3a2..99e7cb5 100644
--- a/contrib/mod_rewrite.c
+++ b/contrib/mod_rewrite.c
@@ -24,7 +24,7 @@
  * This is mod_rewrite, contrib software for proftpd 1.2 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_rewrite.c,v 1.75 2013/10/13 23:43:44 castaglia Exp $
+ * $Id: mod_rewrite.c,v 1.75 2013-10-13 23:43:44 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_sftp/agent.c b/contrib/mod_sftp/agent.c
index 49afd6d..4f94c6d 100644
--- a/contrib/mod_sftp/agent.c
+++ b/contrib/mod_sftp/agent.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: agent.c,v 1.5 2012/04/06 16:53:52 castaglia Exp $
+ * $Id: agent.c,v 1.5 2012-04-06 16:53:52 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/agent.h b/contrib/mod_sftp/agent.h
index 4f4702a..4540dd4 100644
--- a/contrib/mod_sftp/agent.h
+++ b/contrib/mod_sftp/agent.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: agent.h,v 1.2 2012/03/06 07:01:32 castaglia Exp $
+ * $Id: agent.h,v 1.2 2012-03-06 07:01:32 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/auth-hostbased.c b/contrib/mod_sftp/auth-hostbased.c
index 049acda..c2cbaa7 100644
--- a/contrib/mod_sftp/auth-hostbased.c
+++ b/contrib/mod_sftp/auth-hostbased.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: auth-hostbased.c,v 1.10 2012/03/13 18:58:48 castaglia Exp $
+ * $Id: auth-hostbased.c,v 1.10 2012-03-13 18:58:48 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -171,7 +171,7 @@ int sftp_auth_hostbased(struct ssh2_packet *pkt, cmd_rec *pass_cmd,
 
   if (sftp_blacklist_reject_key(pkt->pool, hostkey_data, hostkey_datalen)) {
     *send_userauth_fail = TRUE;
-    errno = EPERM;
+    errno = EACCES;
     return 0;
   }
 
@@ -183,7 +183,7 @@ int sftp_auth_hostbased(struct ssh2_packet *pkt, cmd_rec *pass_cmd,
   if (sftp_keystore_verify_host_key(pkt->pool, user, host_fqdn, host_user,
       hostkey_data, hostkey_datalen) < 0) {
     *send_userauth_fail = TRUE;
-    errno = EPERM;
+    errno = EACCES;
     return 0;
   }
 
diff --git a/contrib/mod_sftp/auth-kbdint.c b/contrib/mod_sftp/auth-kbdint.c
index c3ef3e6..de0f0e1 100644
--- a/contrib/mod_sftp/auth-kbdint.c
+++ b/contrib/mod_sftp/auth-kbdint.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: auth-kbdint.c,v 1.10 2014/03/02 22:05:43 castaglia Exp $
+ * $Id: auth-kbdint.c,v 1.10 2014-03-02 22:05:43 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/auth-password.c b/contrib/mod_sftp/auth-password.c
index 17e8a94..a92df6f 100644
--- a/contrib/mod_sftp/auth-password.c
+++ b/contrib/mod_sftp/auth-password.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: auth-password.c,v 1.10 2014/03/02 22:05:43 castaglia Exp $
+ * $Id: auth-password.c,v 1.10 2014-03-02 22:05:43 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/auth-publickey.c b/contrib/mod_sftp/auth-publickey.c
index 1613e50..1caec4d 100644
--- a/contrib/mod_sftp/auth-publickey.c
+++ b/contrib/mod_sftp/auth-publickey.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: auth-publickey.c,v 1.13 2012/07/10 00:52:20 castaglia Exp $
+ * $Id: auth-publickey.c,v 1.13 2012-07-10 00:52:20 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -262,7 +262,7 @@ int sftp_auth_publickey(struct ssh2_packet *pkt, cmd_rec *pass_cmd,
     if (sftp_keystore_verify_user_key(pkt->pool, user, pubkey_data,
         pubkey_len) < 0) {
       *send_userauth_fail = TRUE;
-      errno = EPERM;
+      errno = EACCES;
       return 0;
     }
 
@@ -305,7 +305,7 @@ int sftp_auth_publickey(struct ssh2_packet *pkt, cmd_rec *pass_cmd,
         "failed to verify '%s' signature on public key auth request for "
         "user '%s'", pubkey_algo, orig_user);
       *send_userauth_fail = TRUE;
-      errno = EPERM;
+      errno = EACCES;
       return 0;
     }
   }
diff --git a/contrib/mod_sftp/auth.c b/contrib/mod_sftp/auth.c
index a24336a..cb70698 100644
--- a/contrib/mod_sftp/auth.c
+++ b/contrib/mod_sftp/auth.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: auth.c,v 1.53 2014/03/04 07:54:12 castaglia Exp $
+ * $Id: auth.c,v 1.53 2014-03-04 07:54:12 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -863,7 +863,8 @@ static int send_userauth_methods(void) {
 static void incr_auth_attempts(const char *user) {
   auth_attempts++;
 
-  if (auth_attempts >= auth_attempts_max) {
+  if (auth_attempts_max > 0 &&
+      auth_attempts >= auth_attempts_max) {
     pr_log_auth(PR_LOG_NOTICE,
       "Maximum login attempts (%u) exceeded, connection refused",
       auth_attempts_max);
@@ -1014,7 +1015,8 @@ static int handle_userauth_req(struct ssh2_packet *pkt, char **service) {
   cmd->arg = pstrcat(pkt->pool, user, " ", method, NULL);
   cmd->cmd_class = CL_AUTH;
 
-  if (auth_attempts > auth_attempts_max) {
+  if (auth_attempts_max > 0 &&
+      auth_attempts > auth_attempts_max) {
     pr_log_auth(PR_LOG_NOTICE,
       "Maximum login attempts (%u) exceeded, connection refused",
       auth_attempts_max);
@@ -1458,7 +1460,7 @@ int sftp_auth_init(void) {
     pr_pool_tag(auth_pool, "SSH2 Auth Pool");
 
     max_logins = get_param_ptr(main_server->conf, "MaxLoginAttempts", FALSE);
-    if (max_logins) {
+    if (max_logins != NULL) {
       auth_attempts_max = *max_logins;
     }
   }
diff --git a/contrib/mod_sftp/auth.h b/contrib/mod_sftp/auth.h
index f659e85..00e307e 100644
--- a/contrib/mod_sftp/auth.h
+++ b/contrib/mod_sftp/auth.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: auth.h,v 1.8 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: auth.h,v 1.8 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/blacklist.c b/contrib/mod_sftp/blacklist.c
index eee44d8..1c8a990 100644
--- a/contrib/mod_sftp/blacklist.c
+++ b/contrib/mod_sftp/blacklist.c
@@ -24,7 +24,7 @@
  * The file size to encode 294,903 of 48-bit fingerprints is just 1.3 MB,
  * which corresponds to less than 4.5 bytes per fingerprint.
  *
- * $Id: blacklist.c,v 1.6 2012/03/13 20:15:25 castaglia Exp $
+ * $Id: blacklist.c,v 1.6 2012-03-13 20:15:25 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/blacklist.h b/contrib/mod_sftp/blacklist.h
index e8d5bc0..fe86bea 100644
--- a/contrib/mod_sftp/blacklist.h
+++ b/contrib/mod_sftp/blacklist.h
@@ -24,7 +24,7 @@
  * The file size to encode 294,903 of 48-bit fingerprints is just 1.3 MB,
  * which corresponds to less than 4.5 bytes per fingerprint.
  *
- * $Id: blacklist.h,v 1.3 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: blacklist.h,v 1.3 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/channel.c b/contrib/mod_sftp/channel.c
index 0185412..d009671 100644
--- a/contrib/mod_sftp/channel.c
+++ b/contrib/mod_sftp/channel.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: channel.c,v 1.47 2012/02/18 22:12:20 castaglia Exp $
+ * $Id: channel.c,v 1.47 2012-02-18 22:12:20 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/channel.h b/contrib/mod_sftp/channel.h
index 2675fe6..0cb0ec2 100644
--- a/contrib/mod_sftp/channel.h
+++ b/contrib/mod_sftp/channel.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: channel.h,v 1.14 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: channel.h,v 1.14 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/cipher.c b/contrib/mod_sftp/cipher.c
index 28f65a1..9ed4ed7 100644
--- a/contrib/mod_sftp/cipher.c
+++ b/contrib/mod_sftp/cipher.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: cipher.c,v 1.18 2014/03/02 06:07:43 castaglia Exp $
+ * $Id: cipher.c,v 1.18 2014-03-02 06:07:43 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -71,7 +71,7 @@ static size_t cipher_blockszs[2] = {
 };
 
 /* Buffer size for reading/writing keys */
-#define SFTP_CIPHER_BUFSZ			1536
+#define SFTP_CIPHER_BUFSZ			4096
 
 static unsigned int read_cipher_idx = 0;
 static unsigned int write_cipher_idx = 0;
diff --git a/contrib/mod_sftp/cipher.h b/contrib/mod_sftp/cipher.h
index 7b92336..4067386 100644
--- a/contrib/mod_sftp/cipher.h
+++ b/contrib/mod_sftp/cipher.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: cipher.h,v 1.4 2013/01/29 07:29:22 castaglia Exp $
+ * $Id: cipher.h,v 1.4 2013-01-29 07:29:22 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/compress.c b/contrib/mod_sftp/compress.c
index 469ac1d..572a0bc 100644
--- a/contrib/mod_sftp/compress.c
+++ b/contrib/mod_sftp/compress.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: compress.c,v 1.8 2012/12/13 23:05:15 castaglia Exp $
+ * $Id: compress.c,v 1.8 2012-12-13 23:05:15 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/compress.h b/contrib/mod_sftp/compress.h
index 92a606e..58a4c22 100644
--- a/contrib/mod_sftp/compress.h
+++ b/contrib/mod_sftp/compress.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: compress.h,v 1.3 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: compress.h,v 1.3 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/configure b/contrib/mod_sftp/configure
index 4d6a8ee..89d830d 100755
--- a/contrib/mod_sftp/configure
+++ b/contrib/mod_sftp/configure
@@ -4166,6 +4166,9 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
+LIBS=`echo "$LIBS" | sed -e 's/-lsupp//g'`;
+LIBS="-lcrypto -lz $LIBS"
+
 { echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5
 echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
@@ -4212,6 +4215,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 
     { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
+    LIBS="$saved_libs"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -4225,6 +4229,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_AES_CRIPPLED_OPENSSL 1
 _ACEOF
 
+    LIBS="$saved_libs"
 
 
 fi
@@ -4232,6 +4237,9 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
+LIBS=`echo "$LIBS" | sed -e 's/-lsupp//g'`;
+LIBS="-lcrypto -lz $LIBS"
+
 { echo "$as_me:$LINENO: checking whether OpenSSL supports SHA256" >&5
 echo $ECHO_N "checking whether OpenSSL supports SHA256... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
@@ -4280,6 +4288,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_SHA256_OPENSSL 1
 _ACEOF
 
+    LIBS="$saved_libs"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -4288,6 +4297,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
+    LIBS="$saved_libs"
 
 
 fi
@@ -4295,6 +4305,9 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
+LIBS=`echo "$LIBS" | sed -e 's/-lsupp//g'`;
+LIBS="-lcrypto -lz $LIBS"
+
 { echo "$as_me:$LINENO: checking whether OpenSSL supports SHA512" >&5
 echo $ECHO_N "checking whether OpenSSL supports SHA512... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
@@ -4343,6 +4356,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_SHA512_OPENSSL 1
 _ACEOF
 
+    LIBS="$saved_libs"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -4351,6 +4365,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
+    LIBS="$saved_libs"
 
 
 fi
diff --git a/contrib/mod_sftp/configure.in b/contrib/mod_sftp/configure.in
index 8d57bcf..931b78f 100644
--- a/contrib/mod_sftp/configure.in
+++ b/contrib/mod_sftp/configure.in
@@ -107,6 +107,10 @@ AC_TRY_LINK(
   ]
 )
 
+dnl Splice out -lsupp, since that library hasn't been built yet
+LIBS=`echo "$LIBS" | sed -e 's/-lsupp//g'`;
+LIBS="-lcrypto -lz $LIBS"
+
 AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
 AC_TRY_LINK(
   [ #ifdef HAVE_STRING_H
@@ -121,13 +125,19 @@ AC_TRY_LINK(
   ],
   [
     AC_MSG_RESULT(no)
+    LIBS="$saved_libs"
   ],
   [
     AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_AES_CRIPPLED_OPENSSL, 1, [OpenSSL is missing AES192 and AES256 support])
+    LIBS="$saved_libs"
   ]
 )
 
+dnl Splice out -lsupp, since that library hasn't been built yet
+LIBS=`echo "$LIBS" | sed -e 's/-lsupp//g'`;
+LIBS="-lcrypto -lz $LIBS"
+
 AC_MSG_CHECKING([whether OpenSSL supports SHA256])
 AC_TRY_LINK(
   [
@@ -140,12 +150,18 @@ AC_TRY_LINK(
   [
     AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_SHA256_OPENSSL, 1, [OpenSSL supports SHA224/SHA256])
+    LIBS="$saved_libs"
   ],
   [
     AC_MSG_RESULT(no)
+    LIBS="$saved_libs"
   ]
 )
 
+dnl Splice out -lsupp, since that library hasn't been built yet
+LIBS=`echo "$LIBS" | sed -e 's/-lsupp//g'`;
+LIBS="-lcrypto -lz $LIBS"
+
 AC_MSG_CHECKING([whether OpenSSL supports SHA512])
 AC_TRY_LINK(
   [
@@ -158,9 +174,11 @@ AC_TRY_LINK(
   [
     AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_SHA512_OPENSSL, 1, [OpenSSL supports SHA384/SHA512])
+    LIBS="$saved_libs"
   ],
   [
     AC_MSG_RESULT(no)
+    LIBS="$saved_libs"
   ]
 )
 
diff --git a/contrib/mod_sftp/crypto.c b/contrib/mod_sftp/crypto.c
index d947898..0c8ea31 100644
--- a/contrib/mod_sftp/crypto.c
+++ b/contrib/mod_sftp/crypto.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: crypto.c,v 1.33 2014/01/28 17:26:17 castaglia Exp $
+ * $Id: crypto.c,v 1.33 2014-01-28 17:26:17 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/crypto.h b/contrib/mod_sftp/crypto.h
index cbc25f2..829b110 100644
--- a/contrib/mod_sftp/crypto.h
+++ b/contrib/mod_sftp/crypto.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: crypto.h,v 1.4 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: crypto.h,v 1.4 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/date.c b/contrib/mod_sftp/date.c
index 3256940..4cde7b4 100644
--- a/contrib/mod_sftp/date.c
+++ b/contrib/mod_sftp/date.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: date.c,v 1.3 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: date.c,v 1.3 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/date.h b/contrib/mod_sftp/date.h
index ae44e1e..02c534e 100644
--- a/contrib/mod_sftp/date.h
+++ b/contrib/mod_sftp/date.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: date.h,v 1.2 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: date.h,v 1.2 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/disconnect.c b/contrib/mod_sftp/disconnect.c
index 1df91e3..6f0c36b 100644
--- a/contrib/mod_sftp/disconnect.c
+++ b/contrib/mod_sftp/disconnect.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: disconnect.c,v 1.10 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: disconnect.c,v 1.10 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/disconnect.h b/contrib/mod_sftp/disconnect.h
index 26acbc9..d7aef31 100644
--- a/contrib/mod_sftp/disconnect.h
+++ b/contrib/mod_sftp/disconnect.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: disconnect.h,v 1.8 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: disconnect.h,v 1.8 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/display.c b/contrib/mod_sftp/display.c
index 93b9944..a5fb70d 100644
--- a/contrib/mod_sftp/display.c
+++ b/contrib/mod_sftp/display.c
@@ -23,7 +23,7 @@
  */
 
 /* Display of files
- * $Id: display.c,v 1.12 2013/09/25 16:08:50 castaglia Exp $
+ * $Id: display.c,v 1.12 2013-09-25 16:08:50 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/display.h b/contrib/mod_sftp/display.h
index 5a2b563..f8ab836 100644
--- a/contrib/mod_sftp/display.h
+++ b/contrib/mod_sftp/display.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: display.h,v 1.3 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: display.h,v 1.3 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/fxp.c b/contrib/mod_sftp/fxp.c
index 71b1ec7..5d9ae17 100644
--- a/contrib/mod_sftp/fxp.c
+++ b/contrib/mod_sftp/fxp.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_sftp sftp
- * Copyright (c) 2008-2014 TJ Saunders
+ * Copyright (c) 2008-2015 TJ Saunders
  *
  * 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
@@ -20,8 +20,6 @@
  * give permission to link this program with OpenSSL, and distribute the
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
- *
- * $Id: fxp.c,v 1.203 2014/01/17 06:11:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -4856,7 +4854,7 @@ static int fxp_handle_ext_space_avail(struct fxp_packet *fxp, char *path) {
   /* Unused bytes available to user. */
   sftp_msg_write_long(&buf, &buflen, (uint64_t) get_user_bytes_unused(&fs));
 
-  fxp_msg_write_short(&buf, &buflen, (uint32_t) fs.f_frsize);
+  sftp_msg_write_int(&buf, &buflen, (uint32_t) fs.f_frsize);
 
   resp = fxp_packet_create(fxp->pool, fxp->channel_id);
   resp->payload = ptr;
@@ -8808,7 +8806,7 @@ static int fxp_handle_readdir(struct fxp_packet *fxp) {
 static int fxp_handle_readlink(struct fxp_packet *fxp) {
   char data[PR_TUNABLE_PATH_MAX + 1];
   unsigned char *buf, *ptr;
-  char *path;
+  char *path, *resolved_path;
   int res;
   uint32_t buflen, bufsz;
   struct fxp_packet *resp;
@@ -8866,8 +8864,8 @@ static int fxp_handle_readlink(struct fxp_packet *fxp) {
   }
 
   /* The path may have been changed by any PRE_CMD handlers. */
-  path = dir_best_path(fxp->pool, cmd->arg);
-  if (path == NULL) {
+  resolved_path = dir_best_path(fxp->pool, cmd->arg);
+  if (resolved_path == NULL) {
     int xerrno = EACCES;
     const char *reason;
     uint32_t status_code;
@@ -8893,12 +8891,12 @@ static int fxp_handle_readlink(struct fxp_packet *fxp) {
     return fxp_packet_write(resp);
   }
 
-  if (!dir_check(fxp->pool, cmd, G_READ, path, NULL)) {
+  if (!dir_check(fxp->pool, cmd, G_READ, resolved_path, NULL)) {
     uint32_t status_code = SSH2_FX_PERMISSION_DENIED;
 
     (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
-      "READLINK of '%s' blocked by <Limit %s> configuration", path,
-      cmd->argv[0]);
+      "READLINK of '%s' (resolved to '%s') blocked by <Limit %s> configuration",
+      path, resolved_path, cmd->argv[0]);
 
     pr_trace_msg(trace_channel, 8, "sending response: STATUS %lu '%s'",
       (unsigned long) status_code, fxp_strerror(status_code));
@@ -9063,7 +9061,6 @@ static int fxp_handle_realpath(struct fxp_packet *fxp) {
       if (fxp->payload_sz > 0) {
         composite_path = sftp_msg_read_string(fxp->pool, &fxp->payload,
           &fxp->payload_sz);
-(void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION, "handle_realpath: have composite-path = '%s'", composite_path);
 
         /* XXX One problem with the most recent SFTP Draft is that it does NOT
          * include a count of the number of composite-paths that the client
@@ -9103,6 +9100,10 @@ static int fxp_handle_realpath(struct fxp_packet *fxp) {
   
       pr_trace_msg(trace_channel, 8, "sending response: NAME 1 %s %s",
         path, fxp_strattrs(fxp->pool, &st, &attr_flags));
+
+      sftp_msg_write_byte(&buf, &buflen, SFTP_SSH2_FXP_NAME);
+      sftp_msg_write_int(&buf, &buflen, fxp->request_id);
+      sftp_msg_write_int(&buf, &buflen, 1);
       fxp_name_write(fxp->pool, &buf, &buflen, path, &st, "nobody",
         "nobody");
     }
@@ -9157,6 +9158,10 @@ static int fxp_handle_realpath(struct fxp_packet *fxp) {
 
         pr_trace_msg(trace_channel, 8, "sending response: NAME 1 %s %s",
           path, fxp_strattrs(fxp->pool, &st, &attr_flags));
+
+        sftp_msg_write_byte(&buf, &buflen, SFTP_SSH2_FXP_NAME);
+        sftp_msg_write_int(&buf, &buflen, fxp->request_id);
+        sftp_msg_write_int(&buf, &buflen, 1);
         fxp_name_write(fxp->pool, &buf, &buflen, path, &st, "nobody",
           "nobody");
       }
@@ -9212,6 +9217,10 @@ static int fxp_handle_realpath(struct fxp_packet *fxp) {
 
       pr_trace_msg(trace_channel, 8, "sending response: NAME 1 %s %s",
         path, fxp_strattrs(fxp->pool, &st, &attr_flags));
+
+      sftp_msg_write_byte(&buf, &buflen, SFTP_SSH2_FXP_NAME);
+      sftp_msg_write_int(&buf, &buflen, fxp->request_id);
+      sftp_msg_write_int(&buf, &buflen, 1);
       fxp_name_write(fxp->pool, &buf, &buflen, path, &st, "nobody",
         "nobody");
     }
@@ -9253,6 +9262,10 @@ static int fxp_handle_realpath(struct fxp_packet *fxp) {
 
         pr_trace_msg(trace_channel, 8, "sending response: NAME 1 %s %s",
           path, fxp_strattrs(fxp->pool, &st, &attr_flags));
+
+        sftp_msg_write_byte(&buf, &buflen, SFTP_SSH2_FXP_NAME);
+        sftp_msg_write_int(&buf, &buflen, fxp->request_id);
+        sftp_msg_write_int(&buf, &buflen, 1);
         fxp_name_write(fxp->pool, &buf, &buflen, path, &st, "nobody",
           "nobody");
       }
@@ -9362,7 +9375,7 @@ static int fxp_handle_remove(struct fxp_packet *fxp) {
 
   path = cmd->arg;
 
-  cmd2 = fxp_cmd_alloc(fxp_pool, C_DELE, path);
+  cmd2 = fxp_cmd_alloc(fxp->pool, C_DELE, path);
   if (pr_cmd_dispatch_phase(cmd2, PRE_CMD, 0) < 0) {
     status_code = SSH2_FX_PERMISSION_DENIED;
 
diff --git a/contrib/mod_sftp/fxp.h b/contrib/mod_sftp/fxp.h
index ea56267..69e89ed 100644
--- a/contrib/mod_sftp/fxp.h
+++ b/contrib/mod_sftp/fxp.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: fxp.h,v 1.12 2013/04/15 16:14:25 castaglia Exp $
+ * $Id: fxp.h,v 1.12 2013-04-15 16:14:25 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/interop.c b/contrib/mod_sftp/interop.c
index 2a8dc9a..fbb736c 100644
--- a/contrib/mod_sftp/interop.c
+++ b/contrib/mod_sftp/interop.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: interop.c,v 1.16 2013/03/14 21:49:19 castaglia Exp $
+ * $Id: interop.c,v 1.16 2013-03-14 21:49:19 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/interop.h b/contrib/mod_sftp/interop.h
index 9d0daeb..5bfbad3 100644
--- a/contrib/mod_sftp/interop.h
+++ b/contrib/mod_sftp/interop.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: interop.h,v 1.6 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: interop.h,v 1.6 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/kbdint.c b/contrib/mod_sftp/kbdint.c
index bc900da..8cbd2a5 100644
--- a/contrib/mod_sftp/kbdint.c
+++ b/contrib/mod_sftp/kbdint.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_sftp keyboard-interactive driver mgmt
- * Copyright (c) 2008-2013 TJ Saunders
+ * Copyright (c) 2008-2015 TJ Saunders
  *
  * 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
@@ -20,8 +20,6 @@
  * give permission to link this program with OpenSSL, and distribute the
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
- *
- * $Id: kbdint.c,v 1.6 2013/09/14 06:53:47 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -334,5 +332,7 @@ int sftp_kbdint_recv_response(pool *p, unsigned int expected_count,
 
   *rcvd_count = (unsigned int) resp_count;
   *responses = ((const char **) list->elts);
+  destroy_pool(pkt->pool);
+
   return 0;
 }
diff --git a/contrib/mod_sftp/kbdint.h b/contrib/mod_sftp/kbdint.h
index 188962e..1d8a1b0 100644
--- a/contrib/mod_sftp/kbdint.h
+++ b/contrib/mod_sftp/kbdint.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: kbdint.h,v 1.3 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: kbdint.h,v 1.3 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/kex.c b/contrib/mod_sftp/kex.c
index 359667c..c57191c 100644
--- a/contrib/mod_sftp/kex.c
+++ b/contrib/mod_sftp/kex.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: kex.c,v 1.39 2013/10/02 06:18:53 castaglia Exp $
+ * $Id: kex.c,v 1.39 2013-10-02 06:18:53 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -193,7 +193,7 @@ static const unsigned char *calculate_h(struct sftp_kex *kex,
   unsigned char *buf, *ptr;
   uint32_t buflen, bufsz;
 
-  bufsz = buflen = 3072;
+  bufsz = buflen = 4096;
 
   /* XXX Is this buffer large enough? Too large? */
   ptr = buf = sftp_msg_getbuf(kex_pool, bufsz);
@@ -394,7 +394,7 @@ static const unsigned char *calculate_kexrsa_h(struct sftp_kex *kex,
   unsigned char *buf, *ptr;
   uint32_t buflen, bufsz;
 
-  bufsz = buflen = 3072;
+  bufsz = buflen = 4096;
 
   /* XXX Is this buffer large enough? Too large? */
   ptr = buf = sftp_msg_getbuf(kex_pool, bufsz);
@@ -2622,7 +2622,7 @@ static int write_dh_gex_group(struct ssh2_packet *pkt, struct sftp_kex *kex,
   }
 
   /* XXX Is this large enough?  Too large? */
-  buflen = bufsz = 2048;
+  buflen = bufsz = 4096;
   ptr = buf = palloc(pkt->pool, bufsz);
 
   sftp_msg_write_byte(&buf, &buflen, SFTP_SSH2_MSG_KEX_DH_GEX_GROUP);
@@ -2916,7 +2916,7 @@ static int write_kexrsa_pubkey(struct ssh2_packet *pkt, struct sftp_kex *kex) {
   }
 
   /* XXX Is this buffer large enough?  Too large? */
-  bufsz = buflen = 512;
+  bufsz = buflen = 2048;
   ptr = buf = palloc(kex_pool, bufsz);
 
   /* Write the transient RSA public key into its own buffer, to then be
@@ -2927,7 +2927,7 @@ static int write_kexrsa_pubkey(struct ssh2_packet *pkt, struct sftp_kex *kex) {
   sftp_msg_write_mpint(&buf, &buflen, kex->rsa->n);
 
   /* XXX Is this buffer large enough?  Too large? */
-  bufsz2 = buflen2 = 1024;
+  bufsz2 = buflen2 = 4096;
   ptr2 = buf2 = palloc(pkt->pool, bufsz2);
 
   sftp_msg_write_byte(&buf2, &buflen2, SFTP_SSH2_MSG_KEXRSA_PUBKEY);
@@ -2966,7 +2966,7 @@ static int write_kexrsa_done(struct ssh2_packet *pkt, struct sftp_kex *kex) {
   }
 
   /* XXX Is this buffer large enough?  Too large? */
-  bufsz2 = buflen2 = 512;
+  bufsz2 = buflen2 = 4096;
   ptr2 = buf2 = palloc(kex_pool, bufsz2);
 
   /* Write the transient RSA public key into its own buffer, to then be
@@ -3018,7 +3018,7 @@ static int write_kexrsa_done(struct ssh2_packet *pkt, struct sftp_kex *kex) {
   }
 
   /* XXX Is this buffer large enough?  Too large? */
-  bufsz = buflen = 2048;
+  bufsz = buflen = 4096;
   ptr = buf = palloc(pkt->pool, bufsz);
 
   sftp_msg_write_byte(&buf, &buflen, SFTP_SSH2_MSG_KEXRSA_DONE);
diff --git a/contrib/mod_sftp/kex.h b/contrib/mod_sftp/kex.h
index 6713598..1e8306d 100644
--- a/contrib/mod_sftp/kex.h
+++ b/contrib/mod_sftp/kex.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: kex.h,v 1.4 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: kex.h,v 1.4 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/keys.c b/contrib/mod_sftp/keys.c
index 7ed239a..1247ea6 100644
--- a/contrib/mod_sftp/keys.c
+++ b/contrib/mod_sftp/keys.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: keys.c,v 1.39 2014/01/28 17:26:17 castaglia Exp $
+ * $Id: keys.c,v 1.39 2014-01-28 17:26:17 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/keys.h b/contrib/mod_sftp/keys.h
index 89abf4e..dfda248 100644
--- a/contrib/mod_sftp/keys.h
+++ b/contrib/mod_sftp/keys.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: keys.h,v 1.9 2012/03/13 18:58:48 castaglia Exp $
+ * $Id: keys.h,v 1.9 2012-03-13 18:58:48 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/keystore.c b/contrib/mod_sftp/keystore.c
index 0b04de1..f26c7b7 100644
--- a/contrib/mod_sftp/keystore.c
+++ b/contrib/mod_sftp/keystore.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: keystore.c,v 1.7 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: keystore.c,v 1.7 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/keystore.h b/contrib/mod_sftp/keystore.h
index da880ec..9d5e03d 100644
--- a/contrib/mod_sftp/keystore.h
+++ b/contrib/mod_sftp/keystore.h
@@ -22,7 +22,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: keystore.h,v 1.5 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: keystore.h,v 1.5 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/mac.c b/contrib/mod_sftp/mac.c
index 81ba5fb..8660b93 100644
--- a/contrib/mod_sftp/mac.c
+++ b/contrib/mod_sftp/mac.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_sftp MACs
- * Copyright (c) 2008-2013 TJ Saunders
+ * Copyright (c) 2008-2015 TJ Saunders
  *
  * 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
@@ -20,8 +20,6 @@
  * give permission to link this program with OpenSSL, and distribute the
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
- *
- * $Id: mac.c,v 1.20 2013/12/19 16:32:32 castaglia Exp $
  */
 
 #include "mod_sftp.h"
@@ -81,7 +79,7 @@ static struct umac_ctx *umac_write_ctxs[2];
 static size_t mac_blockszs[2] = { 0, 0 };
 
 /* Buffer size for reading/writing keys */
-#define SFTP_MAC_BUFSZ				1536
+#define SFTP_MAC_BUFSZ				4096
 
 static unsigned int read_mac_idx = 0;
 static unsigned int write_mac_idx = 0;
@@ -568,7 +566,7 @@ const char *sftp_mac_get_read_algo(void) {
 
 int sftp_mac_set_read_algo(const char *algo) {
   uint32_t mac_len;
-  unsigned int idx = write_mac_idx;
+  unsigned int idx = read_mac_idx;
 
   if (read_macs[idx].key) {
     /* If we have an existing key, it means that we are currently rekeying. */
diff --git a/contrib/mod_sftp/mac.h b/contrib/mod_sftp/mac.h
index e04542c..32d371b 100644
--- a/contrib/mod_sftp/mac.h
+++ b/contrib/mod_sftp/mac.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mac.h,v 1.4 2013/03/28 18:48:31 castaglia Exp $
+ * $Id: mac.h,v 1.4 2013-03-28 18:48:31 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/misc.c b/contrib/mod_sftp/misc.c
index 741f22c..06285c3 100644
--- a/contrib/mod_sftp/misc.c
+++ b/contrib/mod_sftp/misc.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: misc.c,v 1.4 2012/12/26 23:18:58 castaglia Exp $
+ * $Id: misc.c,v 1.4 2012-12-26 23:18:58 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/misc.h b/contrib/mod_sftp/misc.h
index 32a4939..82aa127 100644
--- a/contrib/mod_sftp/misc.h
+++ b/contrib/mod_sftp/misc.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: misc.h,v 1.3 2012/03/23 05:35:48 castaglia Exp $
+ * $Id: misc.h,v 1.3 2012-03-23 05:35:48 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/mod_sftp.c b/contrib/mod_sftp/mod_sftp.c
index 16914ba..bc733ee 100644
--- a/contrib/mod_sftp/mod_sftp.c
+++ b/contrib/mod_sftp/mod_sftp.c
@@ -24,7 +24,7 @@
  * DO NOT EDIT BELOW THIS LINE
  * $Archive: mod_sftp.a $
  * $Libraries: -lcrypto -lz $
- * $Id: mod_sftp.c,v 1.86 2014/03/02 22:05:43 castaglia Exp $
+ * $Id: mod_sftp.c,v 1.86 2014-03-02 22:05:43 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/mod_sftp.h.in b/contrib/mod_sftp/mod_sftp.h.in
index bc076dd..a020a29 100644
--- a/contrib/mod_sftp/mod_sftp.h.in
+++ b/contrib/mod_sftp/mod_sftp.h.in
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_sftp.h.in,v 1.30 2014/03/02 22:05:43 castaglia Exp $
+ * $Id: mod_sftp.h.in,v 1.30 2014-03-02 22:05:43 castaglia Exp $
  */
 
 #ifndef MOD_SFTP_H
diff --git a/contrib/mod_sftp/msg.c b/contrib/mod_sftp/msg.c
index f8216d8..1ec0e91 100644
--- a/contrib/mod_sftp/msg.c
+++ b/contrib/mod_sftp/msg.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: msg.c,v 1.16 2013/10/07 01:29:05 castaglia Exp $
+ * $Id: msg.c,v 1.16 2013-10-07 01:29:05 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/msg.h b/contrib/mod_sftp/msg.h
index 12be6f7..b74d618 100644
--- a/contrib/mod_sftp/msg.h
+++ b/contrib/mod_sftp/msg.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: msg.h,v 1.7 2013/03/28 19:56:13 castaglia Exp $
+ * $Id: msg.h,v 1.7 2013-03-28 19:56:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/packet.c b/contrib/mod_sftp/packet.c
index 7acc295..01f509d 100644
--- a/contrib/mod_sftp/packet.c
+++ b/contrib/mod_sftp/packet.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: packet.c,v 1.46 2013/03/08 16:22:18 castaglia Exp $
+ * $Id: packet.c,v 1.46 2013-03-08 16:22:18 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/packet.h b/contrib/mod_sftp/packet.h
index 71b95b3..f76bd19 100644
--- a/contrib/mod_sftp/packet.h
+++ b/contrib/mod_sftp/packet.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: packet.h,v 1.10 2012/03/11 18:44:03 castaglia Exp $
+ * $Id: packet.h,v 1.10 2012-03-11 18:44:03 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/rfc4716.c b/contrib/mod_sftp/rfc4716.c
index 9cc5838..4bedd30 100644
--- a/contrib/mod_sftp/rfc4716.c
+++ b/contrib/mod_sftp/rfc4716.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: rfc4716.c,v 1.19 2013/06/06 16:45:55 castaglia Exp $
+ * $Id: rfc4716.c,v 1.19 2013-06-06 16:45:55 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/rfc4716.h b/contrib/mod_sftp/rfc4716.h
index 0d41bc2..ecc2a3e 100644
--- a/contrib/mod_sftp/rfc4716.h
+++ b/contrib/mod_sftp/rfc4716.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: rfc4716.h,v 1.4 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: rfc4716.h,v 1.4 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/scp.c b/contrib/mod_sftp/scp.c
index 4dea12f..03b83da 100644
--- a/contrib/mod_sftp/scp.c
+++ b/contrib/mod_sftp/scp.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: scp.c,v 1.87 2014/01/20 20:49:04 castaglia Exp $
+ * $Id: scp.c,v 1.87 2014-01-20 20:49:04 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/scp.h b/contrib/mod_sftp/scp.h
index fad7a14..11ec668 100644
--- a/contrib/mod_sftp/scp.h
+++ b/contrib/mod_sftp/scp.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: scp.h,v 1.5 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: scp.h,v 1.5 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/service.c b/contrib/mod_sftp/service.c
index 8fc064b..437992c 100644
--- a/contrib/mod_sftp/service.c
+++ b/contrib/mod_sftp/service.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: service.c,v 1.8 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: service.c,v 1.8 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/service.h b/contrib/mod_sftp/service.h
index ee9fe55..0be2b36 100644
--- a/contrib/mod_sftp/service.h
+++ b/contrib/mod_sftp/service.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: service.h,v 1.3 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: service.h,v 1.3 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/session.c b/contrib/mod_sftp/session.c
index 70dfbff..c345a67 100644
--- a/contrib/mod_sftp/session.c
+++ b/contrib/mod_sftp/session.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: session.c,v 1.3 2011/05/23 21:03:12 castaglia Exp $
+ * $Id: session.c,v 1.3 2011-05-23 21:03:12 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/session.h b/contrib/mod_sftp/session.h
index 34bfc05..3bdb1f1 100644
--- a/contrib/mod_sftp/session.h
+++ b/contrib/mod_sftp/session.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: session.h,v 1.3 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: session.h,v 1.3 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/ssh2.h b/contrib/mod_sftp/ssh2.h
index 44089b6..0ff61a5 100644
--- a/contrib/mod_sftp/ssh2.h
+++ b/contrib/mod_sftp/ssh2.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: ssh2.h,v 1.7 2013/01/29 07:08:05 castaglia Exp $
+ * $Id: ssh2.h,v 1.7 2013-01-29 07:08:05 castaglia Exp $
  */
 
 #ifndef MOD_SFTP_SSH2_H
diff --git a/contrib/mod_sftp/tap.c b/contrib/mod_sftp/tap.c
index eda0685..bcb64b5 100644
--- a/contrib/mod_sftp/tap.c
+++ b/contrib/mod_sftp/tap.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: tap.c,v 1.12 2012/02/15 23:50:51 castaglia Exp $
+ * $Id: tap.c,v 1.12 2012-02-15 23:50:51 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/tap.h b/contrib/mod_sftp/tap.h
index a5eea73..9ea3ae8 100644
--- a/contrib/mod_sftp/tap.h
+++ b/contrib/mod_sftp/tap.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: tap.h,v 1.6 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: tap.h,v 1.6 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/utf8.c b/contrib/mod_sftp/utf8.c
index 25e1616..549b3d5 100644
--- a/contrib/mod_sftp/utf8.c
+++ b/contrib/mod_sftp/utf8.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: utf8.c,v 1.18 2013/01/29 06:51:11 castaglia Exp $
+ * $Id: utf8.c,v 1.18 2013-01-29 06:51:11 castaglia Exp $
  */
 
 #include "mod_sftp.h"
diff --git a/contrib/mod_sftp/utf8.h b/contrib/mod_sftp/utf8.h
index fbf4760..6c6e9e5 100644
--- a/contrib/mod_sftp/utf8.h
+++ b/contrib/mod_sftp/utf8.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: utf8.h,v 1.4 2011/05/23 20:40:13 castaglia Exp $
+ * $Id: utf8.h,v 1.4 2011-05-23 20:40:13 castaglia Exp $
  */
 
 #ifndef MOD_SFTP_UTF8_H
diff --git a/contrib/mod_sftp_pam.c b/contrib/mod_sftp_pam.c
index 6b1a2c6..1b757fa 100644
--- a/contrib/mod_sftp_pam.c
+++ b/contrib/mod_sftp_pam.c
@@ -26,7 +26,7 @@
  * This is mod_sftp_pam, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_sftp_pam.c,v 1.20 2013/10/07 01:29:04 castaglia Exp $
+ * $Id: mod_sftp_pam.c,v 1.20 2013-10-07 01:29:04 castaglia Exp $
  * $Libraries: -lpam $
  */
 
diff --git a/contrib/mod_sftp_sql.c b/contrib/mod_sftp_sql.c
index 0f36873..b39e5c8 100644
--- a/contrib/mod_sftp_sql.c
+++ b/contrib/mod_sftp_sql.c
@@ -1,7 +1,7 @@
 /*
  * ProFTPD: mod_sftp_sql -- SQL backend module for retrieving authorized keys
  *
- * Copyright (c) 2008-2013 TJ Saunders
+ * Copyright (c) 2008-2015 TJ Saunders
  *
  * 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
@@ -24,8 +24,6 @@
  *
  * This is mod_sftp_sql, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
- *
- * $Id: mod_sftp_sql.c,v 1.8 2013/06/06 23:55:59 castaglia Exp $
  */
 
 #include "conf.h"
@@ -33,10 +31,12 @@
 #include "mod_sftp.h"
 #include "mod_sql.h"
 
-#define MOD_SFTP_SQL_VERSION		"mod_sftp_sql/0.3"
+#define MOD_SFTP_SQL_VERSION		"mod_sftp_sql/0.4"
 
 module sftp_sql_module;
 
+#define SFTP_SQL_BUFSZ		1024
+
 struct sqlstore_key {
   const char *subject;
 
@@ -79,7 +79,7 @@ static cmd_rec *sqlstore_cmd_create(pool *parent_pool, int argc, ...) {
  * it were text, line by line.
  */
 static char *sqlstore_getline(pool *p, char **blob, size_t *bloblen) {
-  char linebuf[75], *line = "", *data;
+  char linebuf[SFTP_SQL_BUFSZ], *line = "", *data;
   size_t datalen;
 
   data = *blob;
@@ -140,6 +140,14 @@ static char *sqlstore_getline(pool *p, char **blob, size_t *bloblen) {
       continue;
     }
 
+    /* Watch out for lines larger than our buffer. */
+    if (linelen > sizeof(linebuf)) {
+      (void) pr_log_writefile(sftp_logfd, MOD_SFTP_SQL_VERSION,
+        "line of key data (%lu bytes) exceeds buffer size, truncating; "
+        "this WILL cause authentication failures", (unsigned long) linelen);
+      linelen = sizeof(linebuf);
+    }
+
     memcpy(linebuf, data, linelen);
     linebuf[linelen-1] = '\0';
 
@@ -198,7 +206,7 @@ static char *sqlstore_getline(pool *p, char **blob, size_t *bloblen) {
 
 static struct sqlstore_key *sqlstore_get_key_raw(pool *p, char **blob,
     size_t *bloblen) {
-  char chunk[1024], *data = NULL;
+  char chunk[SFTP_SQL_BUFSZ], *data = NULL;
   BIO *bio = NULL, *b64 = NULL, *bmem = NULL;
   int chunklen;
   long datalen = 0;
@@ -298,16 +306,14 @@ static struct sqlstore_key *sqlstore_get_key_rfc4716(pool *p, char **blob,
     pr_signals_handle();
 
     if (key == NULL &&
-        strncmp(line, SFTP_SSH2_PUBKEY_BEGIN_MARKER,
-          begin_markerlen + 1) == 0) {
+        strncmp(line, SFTP_SSH2_PUBKEY_BEGIN_MARKER, begin_markerlen) == 0) {
       key = pcalloc(p, sizeof(struct sqlstore_key));
       bio = BIO_new(BIO_s_mem());
 
     } else if (key != NULL &&
-               strncmp(line, SFTP_SSH2_PUBKEY_END_MARKER,
-                 end_markerlen + 1) == 0) {
+               strncmp(line, SFTP_SSH2_PUBKEY_END_MARKER, end_markerlen) == 0) {
       if (bio != NULL) {
-        char chunk[1024], *data = NULL;
+        char chunk[SFTP_SQL_BUFSZ], *data = NULL;
         BIO *b64 = NULL, *bmem = NULL;
         int chunklen;
         long datalen = 0;
diff --git a/contrib/mod_shaper.c b/contrib/mod_shaper.c
index c37adc9..23d5c6d 100644
--- a/contrib/mod_shaper.c
+++ b/contrib/mod_shaper.c
@@ -2,7 +2,7 @@
  * ProFTPD: mod_shaper -- a module implementing daemon-wide rate throttling
  *                        via IPC
  *
- * Copyright (c) 2004-2013 TJ Saunders
+ * Copyright (c) 2004-2014 TJ Saunders
  *
  * 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
@@ -26,7 +26,7 @@
  * This is mod_shaper, contrib software for proftpd 1.2 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_shaper.c,v 1.18 2013/10/13 22:51:36 castaglia Exp $
+ * $Id: mod_shaper.c,v 1.18 2013-10-13 22:51:36 castaglia Exp $
  */
 
 #include "conf.h"
@@ -2293,6 +2293,10 @@ static void shaper_postparse_ev(const void *event_data, void *user_data) {
 static void shaper_restart_ev(const void *event_data, void *user_data) {
   register unsigned int i;
 
+  (void) close(shaper_logfd);
+  shaper_logfd = -1;
+  shaper_log_path = NULL;
+
   if (shaper_pool) {
     destroy_pool(shaper_pool);
 
diff --git a/contrib/mod_site_misc.c b/contrib/mod_site_misc.c
index 44a046e..50b0628 100644
--- a/contrib/mod_site_misc.c
+++ b/contrib/mod_site_misc.c
@@ -22,7 +22,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: mod_site_misc.c,v 1.21 2011/12/11 02:33:14 castaglia Exp $
+ * $Id: mod_site_misc.c,v 1.21 2011-12-11 02:33:14 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_snmp/PROFTPD-MIB.txt b/contrib/mod_snmp/PROFTPD-MIB.txt
index 6761589..6565949 100644
--- a/contrib/mod_snmp/PROFTPD-MIB.txt
+++ b/contrib/mod_snmp/PROFTPD-MIB.txt
@@ -2,7 +2,7 @@
 
 PROFTPD-MIB DEFINITIONS ::= BEGIN
 --
--- $Id: PROFTPD-MIB.txt,v 1.1 2013/05/15 15:20:25 castaglia Exp $
+-- $Id: PROFTPD-MIB.txt,v 1.1 2013-05-15 15:20:25 castaglia Exp $
 --
 
 IMPORTS
diff --git a/contrib/mod_snmp/agentx.h b/contrib/mod_snmp/agentx.h
index 3fc8431..702579d 100644
--- a/contrib/mod_snmp/agentx.h
+++ b/contrib/mod_snmp/agentx.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: agentx.h,v 1.1 2013/05/15 15:20:25 castaglia Exp $
+ * $Id: agentx.h,v 1.1 2013-05-15 15:20:25 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/asn1.c b/contrib/mod_snmp/asn1.c
index b9d845f..da66841 100644
--- a/contrib/mod_snmp/asn1.c
+++ b/contrib/mod_snmp/asn1.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_snmp ASN.1 support
- * Copyright (c) 2008-2012 TJ Saunders
+ * Copyright (c) 2008-2014 TJ Saunders
  *
  * 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
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: asn1.c,v 1.1 2013/05/15 15:20:25 castaglia Exp $
+ * $Id: asn1.c,v 1.1 2013-05-15 15:20:25 castaglia Exp $
  */
 
 #include "mod_snmp.h"
@@ -242,7 +242,6 @@ static int asn1_read_len(pool *p, unsigned char **buf, size_t *buflen,
 
 int snmp_asn1_read_header(pool *p, unsigned char **buf, size_t *buflen,
     unsigned char *asn1_type, unsigned int *asn1_len, int flags) {
-  size_t orig_buflen;
   unsigned int objlen;
   int res;
 
@@ -258,8 +257,6 @@ int snmp_asn1_read_header(pool *p, unsigned char **buf, size_t *buflen,
     return -1;
   }
 
-  orig_buflen = *buflen;
-
   /* Type */
   res = asn1_read_type(p, buf, buflen, asn1_type, flags);
   if (res < 0) {
diff --git a/contrib/mod_snmp/asn1.h b/contrib/mod_snmp/asn1.h
index 28a1cd2..5e155fe 100644
--- a/contrib/mod_snmp/asn1.h
+++ b/contrib/mod_snmp/asn1.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: asn1.h,v 1.1 2013/05/15 15:20:26 castaglia Exp $
+ * $Id: asn1.h,v 1.1 2013-05-15 15:20:26 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/mod_snmp.h.in b/contrib/mod_snmp/mod_snmp.h.in
index bef58c7..c9b76d1 100644
--- a/contrib/mod_snmp/mod_snmp.h.in
+++ b/contrib/mod_snmp/mod_snmp.h.in
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_snmp.h.in,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: mod_snmp.h.in,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #ifndef MOD_SNMP_H
diff --git a/contrib/mod_snmp/msg.c b/contrib/mod_snmp/msg.c
index cbc5408..9441902 100644
--- a/contrib/mod_snmp/msg.c
+++ b/contrib/mod_snmp/msg.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: msg.c,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: msg.c,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/msg.h b/contrib/mod_snmp/msg.h
index bfcd46f..93522eb 100644
--- a/contrib/mod_snmp/msg.h
+++ b/contrib/mod_snmp/msg.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: msg.h,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: msg.h,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/notify.c b/contrib/mod_snmp/notify.c
index 774937c..3a4e03a 100644
--- a/contrib/mod_snmp/notify.c
+++ b/contrib/mod_snmp/notify.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_snmp notification routines
- * Copyright (c) 2008-2012 TJ Saunders
+ * Copyright (c) 2008-2014 TJ Saunders
  *
  * 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
@@ -339,7 +339,7 @@ int snmp_notify_generate(pool *p, int sockfd, const char *community,
   struct snmp_var *notify_varlist = NULL, *head_var = NULL, *tail_var = NULL,
     *iter_var;
   int fd = -1, res;
-  unsigned int var_count;
+  unsigned int var_count = 0;
 
   notify_str = get_notify_str(notify_id);
 
diff --git a/contrib/mod_snmp/packet.c b/contrib/mod_snmp/packet.c
index 7551c2c..b128dc6 100644
--- a/contrib/mod_snmp/packet.c
+++ b/contrib/mod_snmp/packet.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: packet.c,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: packet.c,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/packet.h b/contrib/mod_snmp/packet.h
index 535b1ad..4d5be58 100644
--- a/contrib/mod_snmp/packet.h
+++ b/contrib/mod_snmp/packet.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: packet.h,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: packet.h,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/pdu.c b/contrib/mod_snmp/pdu.c
index 2468145..4728b2d 100644
--- a/contrib/mod_snmp/pdu.c
+++ b/contrib/mod_snmp/pdu.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: pdu.c,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: pdu.c,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/pdu.h b/contrib/mod_snmp/pdu.h
index 5de1168..dbddbe4 100644
--- a/contrib/mod_snmp/pdu.h
+++ b/contrib/mod_snmp/pdu.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: pdu.h,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: pdu.h,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/smi.c b/contrib/mod_snmp/smi.c
index e480d54..42ffebc 100644
--- a/contrib/mod_snmp/smi.c
+++ b/contrib/mod_snmp/smi.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_snmp SMI routines
- * Copyright (c) 2008-2012 TJ Saunders
+ * Copyright (c) 2008-2014 TJ Saunders
  *
  * 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
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: smi.c,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: smi.c,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
@@ -346,24 +346,16 @@ int snmp_smi_read_vars(pool *p, unsigned char **buf, size_t *buflen,
 
   while (*buflen > 0) {
     unsigned int varlen;
-    unsigned char *hdr_start = NULL, *hdr_end = NULL, *obj_start = NULL;
+    unsigned char *obj_start = NULL;
     size_t obj_startlen = 0;
 
     pr_signals_handle();
 
-    /* Keep track of the buffer, so that we know where the start/end of the
-     * header is.  Which then lets us know how many bytes the header is,
-     * and how that relates to the total varlist length.
-     */
-    hdr_start = *buf;
-
     res = snmp_asn1_read_header(p, buf, buflen, &asn1_type, &varlen, 0);
     if (res < 0) {
       return -1;
     }
 
-    hdr_end = *buf;
-
     /* If this isn't a constructed sequence, error out. */
     if (asn1_type != (SNMP_ASN1_TYPE_SEQUENCE|SNMP_ASN1_CONSTRUCT)) {
       pr_trace_msg(trace_channel, 1,
diff --git a/contrib/mod_snmp/smi.h b/contrib/mod_snmp/smi.h
index 3b4e724..572b5ee 100644
--- a/contrib/mod_snmp/smi.h
+++ b/contrib/mod_snmp/smi.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: smi.h,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: smi.h,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/stacktrace.c b/contrib/mod_snmp/stacktrace.c
index 7cf3c16..a0098e3 100644
--- a/contrib/mod_snmp/stacktrace.c
+++ b/contrib/mod_snmp/stacktrace.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: stacktrace.c,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: stacktrace.c,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/stacktrace.h b/contrib/mod_snmp/stacktrace.h
index ae28f21..f4d7962 100644
--- a/contrib/mod_snmp/stacktrace.h
+++ b/contrib/mod_snmp/stacktrace.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: stacktrace.h,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: stacktrace.h,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/uptime.c b/contrib/mod_snmp/uptime.c
index d22210b..753695d 100644
--- a/contrib/mod_snmp/uptime.c
+++ b/contrib/mod_snmp/uptime.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: uptime.c,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: uptime.c,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_snmp/uptime.h b/contrib/mod_snmp/uptime.h
index 0992c7d..9262ae9 100644
--- a/contrib/mod_snmp/uptime.h
+++ b/contrib/mod_snmp/uptime.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: uptime.h,v 1.1 2013/05/15 15:20:27 castaglia Exp $
+ * $Id: uptime.h,v 1.1 2013-05-15 15:20:27 castaglia Exp $
  */
 
 #include "mod_snmp.h"
diff --git a/contrib/mod_sql.c b/contrib/mod_sql.c
index e0f9a4c..605dbfd 100644
--- a/contrib/mod_sql.c
+++ b/contrib/mod_sql.c
@@ -23,7 +23,7 @@
  * the resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: mod_sql.c,v 1.247 2014/02/15 08:31:25 castaglia Exp $
+ * $Id: mod_sql.c,v 1.247 2014-02-15 08:31:25 castaglia Exp $
  */
 
 #include "conf.h"
@@ -1535,11 +1535,6 @@ static struct passwd *sql_getpasswd(cmd_rec *cmd, struct passwd *p) {
     return NULL;
   }
 
-  if (cmap.homedirfield == NULL &&
-      cmap.defaulthomedir) {
-    return NULL;
-  }
-
   /* Check to see if the passwd already exists in one of the passwd caches.
    * Give preference to name-based lookups, as opposed to UID-based lookups.
    */
@@ -5187,7 +5182,8 @@ MODRET cmd_uid2name(cmd_rec *cmd) {
     uid_name = pw->pw_name;
 
   } else {
-    snprintf(uidstr, MOD_SQL_BUFSIZE, "%lu", (unsigned long) cmd->argv[0]);
+    snprintf(uidstr, MOD_SQL_BUFSIZE, "%lu",
+      (unsigned long) *((uid_t *) cmd->argv[0]));
     uid_name = uidstr;
   }
 
@@ -5224,7 +5220,8 @@ MODRET cmd_gid2name(cmd_rec *cmd) {
 
   } else {
     memset(gidstr, '\0', sizeof(gidstr));
-    snprintf(gidstr, sizeof(gidstr)-1, "%lu", (unsigned long) cmd->argv[0]);
+    snprintf(gidstr, sizeof(gidstr)-1, "%lu",
+      (unsigned long) *((gid_t *) cmd->argv[0]));
     gid_name = gidstr;
   }
 
@@ -6596,11 +6593,17 @@ static int sql_sess_init(void) {
     return -1;
   }
 
+  /* Construct our internal cache structure for this session. */
+  memset(&cmap, 0, sizeof(cmap));
+
   c = find_config(main_server->conf, CONF_PARAM, "SQLEngine", FALSE);
   if (c != NULL) {
-    engine = *((int *) c->argv[0]);
+    cmap.engine = engine = *((int *) c->argv[0]);
+
+  } else {
+    cmap.engine = engine = (SQL_ENGINE_FL_AUTH|SQL_ENGINE_FL_LOG);
   }
- 
+
   /* Get our backend info and toss it up */
   cmd = _sql_make_cmd(tmp_pool, 1, "foo");
   mr = _sql_dispatch(cmd, "sql_identify");
@@ -6634,9 +6637,6 @@ static int sql_sess_init(void) {
   cmap.curr_group = NULL;
   cmap.curr_passwd = NULL;
 
-  /* Construct our internal cache structure for this session. */
-  memset(&cmap, 0, sizeof(cmap));
-
   ptr = get_param_ptr(main_server->conf, "SQLAuthenticate", FALSE);
   if (ptr != NULL) {
     cmap.authmask = *((int *) ptr);
@@ -7047,8 +7047,6 @@ static int sql_sess_init(void) {
       c = find_config_next(c, c->next, CONF_PARAM, "SQLNamedConnectInfo",
         FALSE);
     }
-
-    cmap.engine = SQL_ENGINE_FL_AUTH|SQL_ENGINE_FL_LOG;
   }
 
   c = find_config(main_server->conf, CONF_PARAM, "SQLLogOnEvent", FALSE);
@@ -7063,7 +7061,19 @@ static int sql_sess_init(void) {
     c = find_config_next(c, c->next, CONF_PARAM, "SQLLogOnEvent", FALSE);
   }
 
-  sql_log(DEBUG_INFO, "mod_sql engine     : %s", cmap.engine ? "on" : "off");
+  if (cmap.engine == 0) {
+    sql_log(DEBUG_INFO, "mod_sql engine     : off");
+
+  } else if (cmap.engine == (SQL_ENGINE_FL_AUTH|SQL_ENGINE_FL_LOG)) {
+    sql_log(DEBUG_INFO, "mod_sql engine     : on");
+
+  } else if (cmap.engine == SQL_ENGINE_FL_AUTH) {
+    sql_log(DEBUG_INFO, "mod_sql engine     : auth");
+
+  } else if (cmap.engine == SQL_ENGINE_FL_LOG) {
+    sql_log(DEBUG_INFO, "mod_sql engine     : log");
+  }
+
   sql_log(DEBUG_INFO, "negative_cache     : %s", cmap.negative_cache ? "on" : "off");
 
   authstr = "";
diff --git a/contrib/mod_sql.h b/contrib/mod_sql.h
index 8a98a64..7a2534a 100644
--- a/contrib/mod_sql.h
+++ b/contrib/mod_sql.h
@@ -24,7 +24,7 @@
  * the resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: mod_sql.h,v 1.12 2013/09/04 20:32:25 castaglia Exp $
+ * $Id: mod_sql.h,v 1.12 2013-09-04 20:32:25 castaglia Exp $
  */
 
 #ifndef MOD_SQL_H
diff --git a/contrib/mod_sql_mysql.c b/contrib/mod_sql_mysql.c
index 0198366..b50847d 100644
--- a/contrib/mod_sql_mysql.c
+++ b/contrib/mod_sql_mysql.c
@@ -22,7 +22,7 @@
  * the resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: mod_sql_mysql.c,v 1.72 2013/10/07 05:51:29 castaglia Exp $
+ * $Id: mod_sql_mysql.c,v 1.72 2013-10-07 05:51:29 castaglia Exp $
  */
 
 /*
diff --git a/contrib/mod_sql_odbc.c b/contrib/mod_sql_odbc.c
index d7edc16..396d31b 100644
--- a/contrib/mod_sql_odbc.c
+++ b/contrib/mod_sql_odbc.c
@@ -21,7 +21,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: mod_sql_odbc.c,v 1.15 2013/09/25 04:25:54 castaglia Exp $
+ * $Id: mod_sql_odbc.c,v 1.15 2013-09-25 04:25:54 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_sql_passwd.c b/contrib/mod_sql_passwd.c
index ac7bfd8..d6afd65 100644
--- a/contrib/mod_sql_passwd.c
+++ b/contrib/mod_sql_passwd.c
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: mod_sql_passwd.c,v 1.22 2014/05/05 16:15:02 castaglia Exp $
+ * $Id: mod_sql_passwd.c,v 1.22 2014-05-05 16:15:02 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_sql_postgres.c b/contrib/mod_sql_postgres.c
index 74314ac..129a076 100644
--- a/contrib/mod_sql_postgres.c
+++ b/contrib/mod_sql_postgres.c
@@ -2,7 +2,7 @@
  * ProFTPD: mod_sql_postgres -- Support for connecting to Postgres databases.
  * Time-stamp: <1999-10-04 03:21:21 root>
  * Copyright (c) 2001 Andrew Houghton
- * Copyright (c) 2004-2013 TJ Saunders
+ * Copyright (c) 2004-2014 TJ Saunders
  *  
  * 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
@@ -23,7 +23,7 @@
  * the resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: mod_sql_postgres.c,v 1.56 2013/10/09 04:57:13 castaglia Exp $
+ * $Id: mod_sql_postgres.c,v 1.56 2013-10-09 04:57:13 castaglia Exp $
  * $Libraries: -lm -lpq $
  */
 
@@ -1387,7 +1387,6 @@ MODRET cmd_escapestring(cmd_rec * cmd) {
  */
 MODRET cmd_checkauth(cmd_rec * cmd) {
   conn_entry_t *entry = NULL;
-  db_conn_t *conn = NULL;
 
   sql_log(DEBUG_FUNC, "%s", "entering \tpostgres cmd_checkauth");
 
@@ -1406,8 +1405,6 @@ MODRET cmd_checkauth(cmd_rec * cmd) {
       "unknown named connection");
   }
 
-  conn = (db_conn_t *) entry->data;
-
   sql_log(DEBUG_WARN, MOD_SQL_POSTGRES_VERSION
     ": Postgres does not support the 'Backend' SQLAuthType");
 
diff --git a/contrib/mod_sql_sqlite.c b/contrib/mod_sql_sqlite.c
index 592957a..24f6e06 100644
--- a/contrib/mod_sql_sqlite.c
+++ b/contrib/mod_sql_sqlite.c
@@ -1,7 +1,7 @@
 /*
  * ProFTPD: mod_sql_sqlite -- Support for connecting to SQLite databases
  *
- * Copyright (c) 2004-2013 TJ Saunders
+ * Copyright (c) 2004-2014 TJ Saunders
  *  
  * 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
@@ -21,7 +21,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: mod_sql_sqlite.c,v 1.24 2013/10/07 05:51:29 castaglia Exp $
+ * $Id: mod_sql_sqlite.c,v 1.24 2013-10-07 05:51:29 castaglia Exp $
  * $Libraries: -lsqlite3 $
  */
 
@@ -919,7 +919,6 @@ MODRET sql_sqlite_query(cmd_rec *cmd) {
 
 MODRET sql_sqlite_quote(cmd_rec *cmd) {
   conn_entry_t *entry = NULL;
-  db_conn_t *conn = NULL;
   modret_t *mr = NULL;
   char *unescaped = NULL;
   char *escaped = NULL;
@@ -948,8 +947,6 @@ MODRET sql_sqlite_quote(cmd_rec *cmd) {
     return mr;
   }
 
-  conn = (db_conn_t *) entry->data;
-
   unescaped = cmd->argv[1];
   tmp = sqlite3_mprintf("%q", unescaped);
   escaped = pstrdup(cmd->pool, tmp);
diff --git a/contrib/mod_tls.c b/contrib/mod_tls.c
index 3803e18..df92658 100644
--- a/contrib/mod_tls.c
+++ b/contrib/mod_tls.c
@@ -390,7 +390,12 @@ static char *tls_passphrase_provider = NULL;
 #define TLS_PROTO_TLS_V1		0x0002
 #define TLS_PROTO_TLS_V1_1		0x0004
 #define TLS_PROTO_TLS_V1_2		0x0008
-#define TLS_PROTO_DEFAULT		(TLS_PROTO_SSL_V3|TLS_PROTO_TLS_V1)
+
+#if OPENSSL_VERSION_NUMBER >= 0x10001000L
+# define TLS_PROTO_DEFAULT		(TLS_PROTO_TLS_V1|TLS_PROTO_TLS_V1_1|TLS_PROTO_TLS_V1_2)
+#else
+# define TLS_PROTO_DEFAULT		(TLS_PROTO_TLS_V1)
+#endif /* OpenSSL 1.0.1 or later */
 
 #ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
 static int tls_ssl_opts = (SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_SINGLE_DH_USE)^SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
@@ -668,7 +673,7 @@ static void tls_diags_cb(const SSL *ssl, int where, int ret) {
 
         reused = SSL_session_reused((SSL *) ssl);
         tls_log("%s renegotiation accepted, using cipher %s (%d bits%s)",
-          SSL_get_cipher_version(ssl), SSL_get_cipher_name(ssl),
+          SSL_get_version(ssl), SSL_get_cipher_name(ssl),
           SSL_get_cipher_bits(ssl, NULL),
           reused > 0 ? ", resumed session" : "");
       }
@@ -681,7 +686,7 @@ static void tls_diags_cb(const SSL *ssl, int where, int ret) {
          * ciphersuite et al.
          */
         tls_log("%s renegotiation accepted, using cipher %s (%d bits)",
-          SSL_get_cipher_version(ssl), SSL_get_cipher_name(ssl),
+          SSL_get_version(ssl), SSL_get_cipher_name(ssl),
           SSL_get_cipher_bits(ssl, NULL));
       }
 
@@ -2750,120 +2755,106 @@ static int tls_init_ctx(void) {
   return 0;
 }
 
-static const char *tls_get_proto_str(pool *p, unsigned int protos) {
+static const char *tls_get_proto_str(pool *p, unsigned int protos,
+    unsigned int *count) {
   char *proto_str = "";
+  unsigned int nproto = 0;
 
   if (protos & TLS_PROTO_SSL_V3) {
     proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
       "SSLv3", NULL);
+    nproto++;
   }
 
   if (protos & TLS_PROTO_TLS_V1) {
     proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
       "TLSv1", NULL);
+    nproto++;
   }
 
   if (protos & TLS_PROTO_TLS_V1_1) {
     proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
       "TLSv1.1", NULL);
+    nproto++;
   }
 
   if (protos & TLS_PROTO_TLS_V1_2) {
     proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
       "TLSv1.2", NULL);
+    nproto++;
   }
 
+  *count = nproto;
   return proto_str;
 }
 
-static int tls_init_server(void) {
-  config_rec *c = NULL;
-  char *tls_ca_cert = NULL, *tls_ca_path = NULL, *tls_ca_chain = NULL;
-  X509 *server_ec_cert = NULL, *server_dsa_cert = NULL, *server_rsa_cert = NULL;
-  int verify_mode = SSL_VERIFY_PEER;
-  unsigned int tls_protocol = TLS_PROTO_DEFAULT;
-
-  c = find_config(main_server->conf, CONF_PARAM, "TLSProtocol", FALSE);
-  if (c != NULL) {
-    tls_protocol = *((unsigned int *) c->argv[0]);
-  }
-
-  if (tls_protocol == TLS_PROTO_DEFAULT) {
-    /* This is the default, so there is no need to do anything. */
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting SSLv3, TLSv1, TLSv1.1, TLSv1.2 protocols");
-#else
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting SSLv3, TLSv1 protocols");
-#endif /* OpenSSL-1.0.1 or later */
-
-  } else if (tls_protocol == TLS_PROTO_SSL_V3) {
-    SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_server_method());
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting SSLv3 protocol only");
-
-  } else if (tls_protocol == TLS_PROTO_TLS_V1) {
-    SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_server_method());
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting TLSv1 protocol only");
-
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
-  } else if (tls_protocol == TLS_PROTO_TLS_V1_1) {
-    SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_1_server_method());
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting TLSv1.1 protocol only");
-
-  } else if (tls_protocol == TLS_PROTO_TLS_V1_2) {
-    SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_server_method());
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting TLSv1.2 protocol only");
-
-#endif /* OpenSSL-1.0.1 or later */
+/* Construct the options value that disables all unsupported protocols.  
+ */
+static int get_disabled_protocols(unsigned int supported_protocols) {
+  int disabled_protocols;
 
-  } else {
-    int disable_proto = (SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
+  /* First, create an options value where ALL protocols are disabled. */
+  disabled_protocols = (SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
 
 #ifdef SSL_OP_NO_TLSv1_1
-    disable_proto |= SSL_OP_NO_TLSv1_1;
+  disabled_protocols |= SSL_OP_NO_TLSv1_1;
 #endif
 #ifdef SSL_OP_NO_TLSv1_2
-    disable_proto |= SSL_OP_NO_TLSv1_2;
+  disabled_protocols |= SSL_OP_NO_TLSv1_2;
 #endif
 
-    /* For any other value of tls_protocol, it will be a combination of
-     * protocol versions.  Thus we MUST use SSLv23_server_method(), and then
-     * try to use SSL_CTX_set_options() to restrict/disable the protocol
-     * versions which are NOT requested.
-     */
+  /* Now, based on the given bitset of supported protocols, clear the
+   * necessary bits.
+   */
 
-    if (tls_protocol & TLS_PROTO_SSL_V3) {
-      /* Clear the "no SSLv3" option. */
-      disable_proto &= ~SSL_OP_NO_SSLv3;
-    }
+  if (supported_protocols & TLS_PROTO_SSL_V3) {
+    disabled_protocols &= ~SSL_OP_NO_SSLv3;
+  }
 
-    if (tls_protocol & TLS_PROTO_TLS_V1) {
-      /* Clear the "no TLSv1" option. */
-      disable_proto &= ~SSL_OP_NO_TLSv1;
-    }
+  if (supported_protocols & TLS_PROTO_TLS_V1) {
+    disabled_protocols &= ~SSL_OP_NO_TLSv1;
+  }
 
-    if (tls_protocol & TLS_PROTO_TLS_V1_1) {
-#ifdef SSL_OP_NO_TLSv1_1
-      /* Clear the "no TLSv1.1" option. */
-      disable_proto &= ~SSL_OP_NO_TLSv1_1;
-#endif
-    }
+#if OPENSSL_VERSION_NUMBER >= 0x10001000L
+  if (supported_protocols & TLS_PROTO_TLS_V1_1) {
+    disabled_protocols &= ~SSL_OP_NO_TLSv1_1;
+  }
 
-    if (tls_protocol & TLS_PROTO_TLS_V1_2) {
-#ifdef SSL_OP_NO_TLSv1_2
-      /* Clear the "no TLSv1.2" option. */
-      disable_proto &= ~SSL_OP_NO_TLSv1_2;
-#endif
-    }
+  if (supported_protocols & TLS_PROTO_TLS_V1_2) {
+    disabled_protocols &= ~SSL_OP_NO_TLSv1_2;
+  }
+#endif /* OpenSSL-1.0.1 or later */
 
-    /* Per the comments in <ssl/ssl.h>, SSL_CTX_set_options() uses |= on
-     * the previous value.  This means we can easily OR in our new option
-     * values with any previously set values.
-     */
-    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting %s protocols only",
-      tls_get_proto_str(main_server->pool, tls_protocol));
-    SSL_CTX_set_options(ssl_ctx, disable_proto);
+  return disabled_protocols;
+}
+
+static int tls_init_server(void) {
+  config_rec *c = NULL;
+  char *tls_ca_cert = NULL, *tls_ca_path = NULL, *tls_ca_chain = NULL;
+  X509 *server_ec_cert = NULL, *server_dsa_cert = NULL, *server_rsa_cert = NULL;
+  int verify_mode = SSL_VERIFY_PEER;
+  unsigned int enabled_proto_count = 0, tls_protocol = TLS_PROTO_DEFAULT;
+  int disabled_proto;
+  const char *enabled_proto_str = NULL;
+
+  c = find_config(main_server->conf, CONF_PARAM, "TLSProtocol", FALSE);
+  if (c != NULL) {
+    tls_protocol = *((unsigned int *) c->argv[0]);
   }
 
+  disabled_proto = get_disabled_protocols(tls_protocol);
+
+  /* Per the comments in <ssl/ssl.h>, SSL_CTX_set_options() uses |= on
+   * the previous value.  This means we can easily OR in our new option
+   * values with any previously set values.
+   */
+  enabled_proto_str = tls_get_proto_str(main_server->pool, tls_protocol,
+    &enabled_proto_count);
+
+  pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting %s %s",
+    enabled_proto_str,
+    enabled_proto_count != 1 ? "protocols" : "protocol only");
+  SSL_CTX_set_options(ssl_ctx, disabled_proto);
 
   tls_ca_cert = get_param_ptr(main_server->conf, "TLSCACertificateFile", FALSE);
   tls_ca_path = get_param_ptr(main_server->conf, "TLSCACertificatePath", FALSE);
@@ -3597,6 +3588,7 @@ static int tls_get_block(conn_t *conn) {
 
 static int tls_accept(conn_t *conn, unsigned char on_data) {
   int blocking, res = 0, xerrno = 0;
+  long cache_mode = 0;
   char *subj = NULL;
   static unsigned char logged_data = FALSE;
   SSL *ssl = NULL;
@@ -3616,7 +3608,7 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
 
   /* This works with either rfd or wfd (I hope). */
   rbio = BIO_new_socket(conn->rfd, FALSE);
-  wbio = BIO_new_socket(conn->rfd, FALSE);
+  wbio = BIO_new_socket(conn->wfd, FALSE);
   SSL_set_bio(ssl, rbio, wbio);
 
   /* If configured, set a timer for the handshake. */
@@ -3626,8 +3618,25 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
   }
 
   if (on_data) {
+
     /* Make sure that TCP_NODELAY is enabled for the handshake. */
     pr_inet_set_proto_nodelay(conn->pool, conn, 1);
+
+    /* Make sure that TCP_CORK (aka TCP_NOPUSH) is DISABLED for the handshake.
+     * This socket option is set via the pr_inet_set_proto_opts() call made
+     * in mod_core, upon handling the PASV/EPSV command.
+     */
+    (void) pr_inet_set_proto_cork(conn->wfd, 0);
+
+    cache_mode = SSL_CTX_get_session_cache_mode(ssl_ctx);
+    if (!(cache_mode & SSL_SESS_CACHE_OFF)) {
+      /* Disable STORING of any new session IDs in the session cache. We DO
+       * want to allow LOOKUP of session IDs in the session cache, however.
+       */
+      long data_cache_mode;
+      data_cache_mode = SSL_SESS_CACHE_SERVER|SSL_SESS_CACHE_NO_INTERNAL_STORE;
+      SSL_CTX_set_session_cache_mode(ssl_ctx, data_cache_mode);
+    }
   }
 
   retry:
@@ -3666,10 +3675,16 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
 
     switch (errcode) {
       case SSL_ERROR_WANT_READ:
+        pr_trace_msg(trace_channel, 17,
+          "SSL_accept() returned WANT_READ, waiting for more to "
+          "read on fd %d", conn->rfd);
         tls_readmore(conn->rfd);
         goto retry;
 
       case SSL_ERROR_WANT_WRITE:
+        pr_trace_msg(trace_channel, 17,
+          "SSL_accept() returned WANT_WRITE, waiting for more to "
+          "write on fd %d", conn->rfd);
         tls_writemore(conn->rfd);
         goto retry;
 
@@ -3726,6 +3741,14 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
   if (on_data) {
     /* Disable TCP_NODELAY, now that the handshake is done. */
     pr_inet_set_proto_nodelay(conn->pool, conn, 0);
+
+    /* Reenable TCP_CORK (aka TCP_NOPUSH), now that the handshake is done. */
+    (void) pr_inet_set_proto_cork(conn->wfd, 1);
+
+    if (!(cache_mode & SSL_SESS_CACHE_OFF)) {
+      /* Restore the previous session cache mode. */
+      SSL_CTX_set_session_cache_mode(ssl_ctx, cache_mode);
+    }
   }
  
   /* Disable the handshake timer. */
@@ -3833,7 +3856,7 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
     reused = SSL_session_reused(ssl);
 
     tls_log("%s connection accepted, using cipher %s (%d bits%s)",
-      SSL_get_cipher_version(ssl), SSL_get_cipher_name(ssl),
+      SSL_get_version(ssl), SSL_get_cipher_name(ssl),
       SSL_get_cipher_bits(ssl, NULL),
       reused > 0 ? ", resumed session" : "");
 
@@ -3889,11 +3912,14 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
 
         data_sess = SSL_get_session(ssl);
         if (data_sess != NULL) {
+          int matching_sess_id = -1;
+
 #if OPENSSL_VERSION_NUMBER < 0x000907000L
           /* In the OpenSSL source code, SSL_SESSION_cmp() ultimately uses
            * memcmp(3) to check, and thus returns memcmp(3)'s return value.
            */
-          if (SSL_SESSION_cmp(ctrl_sess, data_sess) != 0) {
+          matching_sess_id = SSL_SESSION_cmp(ctrl_sess, data_sess);
+          if (matching_sess_id != 0) {
 #else
           unsigned char *sess_id;
           unsigned int sess_id_len;
@@ -3907,8 +3933,9 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
           sess_id_len = data_sess->session_id_length;
 # endif
  
-          if (SSL_has_matching_session_id(ctrl_ssl, sess_id,
-              sess_id_len) == 0) {
+          matching_sess_id = SSL_has_matching_session_id(ctrl_ssl, sess_id,
+            sess_id_len);
+          if (matching_sess_id == 0) {
 #endif
             tls_log("Client did not reuse SSL session from control channel, "
               "rejecting data connection (see the NoSessionReuseRequired "
@@ -3979,7 +4006,7 @@ static int tls_accept(conn_t *conn, unsigned char on_data) {
      */
     if (!logged_data) {
       tls_log("%s data connection accepted, using cipher %s (%d bits)",
-        SSL_get_cipher_version(ssl), SSL_get_cipher_name(ssl),
+        SSL_get_version(ssl), SSL_get_cipher_name(ssl),
         SSL_get_cipher_bits(ssl, NULL));
       logged_data = TRUE;
     }
@@ -4061,10 +4088,16 @@ static int tls_connect(conn_t *conn) {
 
     switch (errcode) {
       case SSL_ERROR_WANT_READ:
+        pr_trace_msg(trace_channel, 17,
+          "SSL_connect() returned WANT_READ, waiting for more to "
+          "read on fd %d", conn->rfd);
         tls_readmore(conn->rfd);
         goto retry;
 
       case SSL_ERROR_WANT_WRITE:
+        pr_trace_msg(trace_channel, 17,
+          "SSL_connect() returned WANT_READ, waiting for more to "
+          "read on fd %d", conn->rfd);
         tls_writemore(conn->rfd);
         goto retry;
 
@@ -4170,7 +4203,7 @@ static int tls_connect(conn_t *conn) {
   }
 
   tls_log("%s connection created, using cipher %s (%d bits)",
-    SSL_get_cipher_version(ssl), SSL_get_cipher_name(ssl),
+    SSL_get_version(ssl), SSL_get_cipher_name(ssl),
     SSL_get_cipher_bits(ssl, NULL));
 
   return 0;
@@ -4838,7 +4871,11 @@ static ssize_t tls_read(SSL *ssl, void *buf, size_t len) {
   pr_signals_handle();
   count = SSL_read(ssl, buf, len);
   if (count < 0) {
-    long err = SSL_get_error(ssl, count);
+    long err;
+    int fd;
+
+    err = SSL_get_error(ssl, count);
+    fd = SSL_get_fd(ssl);
 
     /* read(2) returns only the generic error number -1 */
     count = -1;
@@ -4848,7 +4885,10 @@ static ssize_t tls_read(SSL *ssl, void *buf, size_t len) {
         /* OpenSSL needs more data from the wire to finish the current block,
          * so we wait a little while for it.
          */
-        err = tls_readmore(SSL_get_fd(ssl));
+        pr_trace_msg(trace_channel, 17,
+          "SSL_read() returned WANT_READ, waiting for more to "
+          "read on fd %d", fd);
+        err = tls_readmore(fd);
         if (err > 0) {
           goto retry;
 
@@ -4868,7 +4908,10 @@ static ssize_t tls_read(SSL *ssl, void *buf, size_t len) {
         /* OpenSSL needs to write more data to the wire to finish the current
          * block, so we wait a little while for it.
          */
-        err = tls_writemore(SSL_get_fd(ssl));
+        pr_trace_msg(trace_channel, 17,
+          "SSL_read() returned WANT_WRITE, waiting for more to "
+          "write on fd %d", fd);
+        err = tls_writemore(fd);
         if (err > 0) {
           goto retry;
 
@@ -5307,7 +5350,7 @@ static void tls_setup_environ(SSL *ssl) {
     pr_env_set(main_server->pool, k, v);
 
     k = pstrdup(main_server->pool, "TLS_PROTOCOL");
-    v = pstrdup(main_server->pool, SSL_get_cipher_version(ssl));
+    v = pstrdup(main_server->pool, SSL_get_version(ssl));
     pr_env_set(main_server->pool, k, v);
 
     /* Process the SSL session-related environ variable. */
@@ -6296,6 +6339,7 @@ static ssize_t tls_write(SSL *ssl, const void *buf, size_t len) {
     count = -1;
 
     switch (err) {
+      case SSL_ERROR_WANT_READ:
       case SSL_ERROR_WANT_WRITE:
         /* Simulate an EINTR in case OpenSSL wants to write more. */
         errno = EINTR;
@@ -9941,6 +9985,10 @@ static int tls_sess_init(void) {
 
     tls_flags |= TLS_SESS_ON_CTRL;
 
+    if (tls_required_on_data != -1) {
+      tls_flags |= TLS_SESS_NEED_DATA_PROT;
+    }
+
     pr_session_set_protocol("ftps");
     session.rfc2228_mech = "TLS";
   }
diff --git a/contrib/mod_tls.h b/contrib/mod_tls.h
index 4fbbde5..b8cb001 100644
--- a/contrib/mod_tls.h
+++ b/contrib/mod_tls.h
@@ -21,7 +21,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_tls.h,v 1.2 2011/05/23 20:44:41 castaglia Exp $
+ * $Id: mod_tls.h,v 1.2 2011-05-23 20:44:41 castaglia Exp $
  */
 
 #ifndef MOD_TLS_H
diff --git a/contrib/mod_tls_memcache.c b/contrib/mod_tls_memcache.c
index fc16503..f667a1d 100644
--- a/contrib/mod_tls_memcache.c
+++ b/contrib/mod_tls_memcache.c
@@ -27,7 +27,7 @@
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
  *  --- DO NOT DELETE BELOW THIS LINE ----
- *  $Id: mod_tls_memcache.c,v 1.6 2013/11/05 21:37:16 castaglia Exp $
+ *  $Id: mod_tls_memcache.c,v 1.6 2013-11-05 21:37:16 castaglia Exp $
  *  $Libraries: -lssl -lcrypto$
  */
 
diff --git a/contrib/mod_tls_shmcache.c b/contrib/mod_tls_shmcache.c
index 71f2b70..b558349 100644
--- a/contrib/mod_tls_shmcache.c
+++ b/contrib/mod_tls_shmcache.c
@@ -27,7 +27,7 @@
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
  *  --- DO NOT DELETE BELOW THIS LINE ----
- *  $Id: mod_tls_shmcache.c,v 1.15 2013/11/05 21:37:16 castaglia Exp $
+ *  $Id: mod_tls_shmcache.c,v 1.15 2013-11-05 21:37:16 castaglia Exp $
  *  $Libraries: -lssl -lcrypto$
  */
 
diff --git a/contrib/mod_unique_id.c b/contrib/mod_unique_id.c
index bf924fa..904c68a 100644
--- a/contrib/mod_unique_id.c
+++ b/contrib/mod_unique_id.c
@@ -26,7 +26,7 @@
  * This is mod_unique_id, contrib software for proftpd 1.2.x/1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_unique_id.c,v 1.6 2011/05/23 20:56:40 castaglia Exp $
+ * $Id: mod_unique_id.c,v 1.6 2011-05-23 20:56:40 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/contrib/mod_wrap.c b/contrib/mod_wrap.c
index 2df4b4b..46f7b42 100644
--- a/contrib/mod_wrap.c
+++ b/contrib/mod_wrap.c
@@ -24,7 +24,7 @@
  *
  * -- DO NOT MODIFY THE TWO LINES BELOW --
  * $Libraries: -lwrap -lnsl$
- * $Id: mod_wrap.c,v 1.28 2013/10/13 22:51:36 castaglia Exp $
+ * $Id: mod_wrap.c,v 1.28 2013-10-13 22:51:36 castaglia Exp $
  */
 
 #define MOD_WRAP_VERSION "mod_wrap/1.2.4"
diff --git a/contrib/mod_wrap2/mod_wrap2.c b/contrib/mod_wrap2/mod_wrap2.c
index e801106..bc97e37 100644
--- a/contrib/mod_wrap2/mod_wrap2.c
+++ b/contrib/mod_wrap2/mod_wrap2.c
@@ -599,9 +599,8 @@ static unsigned char wrap2_match_host(char *tok, wrap2_host_t *host) {
 #ifdef PR_USE_IPV6 
   } else if (pr_netaddr_use_ipv6() &&
              *tok == '[') {
-    char *cp, *tmp;
+    char *cp;
     pr_netaddr_t *acl_addr;
-    unsigned int nmaskbits;
 
     /* IPv6 address */
 
@@ -621,24 +620,34 @@ static unsigned char wrap2_match_host(char *tok, wrap2_host_t *host) {
 
     /* Lookup a netaddr for the IPv6 address. */
     acl_addr = pr_netaddr_get_addr(wrap2_pool, tok + 1, NULL);
-    if (!acl_addr) {
+    if (acl_addr == NULL) {
       wrap2_log("unable to resolve IPv6 address '%s'", tok + 1);
       return FALSE;
     }
 
     if (*(cp + 1) != '/') {
-      wrap2_log("bad mask syntax: '%s'", cp + 1);
-      return FALSE;
-    }
+      if (pr_netaddr_cmp(session.c->remote_addr, acl_addr) == 0) {
+        return TRUE;
+      }
 
-    /* Determine the number of mask bits. */
-    nmaskbits = strtol(cp + 2, &tmp, 10);
-    if (tmp && *tmp) {
-      wrap2_log("bad mask syntax: '%s'", tmp);
       return FALSE;
-    }
 
-    return (pr_netaddr_ncmp(session.c->remote_addr, acl_addr, nmaskbits) == 0);
+    } else {
+      unsigned int nmaskbits;
+      char *tmp;
+
+      /* Netmask */
+
+      /* Determine the number of mask bits. */
+      nmaskbits = strtol(cp + 2, &tmp, 10);
+      if (tmp && *tmp) {
+        wrap2_log("bad mask syntax: '%s'", tmp);
+        return FALSE;
+      }
+
+      return (pr_netaddr_ncmp(session.c->remote_addr, acl_addr,
+        nmaskbits) == 0);
+    }
 #endif /* PR_USE_IPV6 */
 
   } else if ((mask = wrap2_strsplit(tok, '/')) != 0) {
diff --git a/contrib/mod_wrap2/mod_wrap2.h.in b/contrib/mod_wrap2/mod_wrap2.h.in
index 57e6ecc..c311b80 100644
--- a/contrib/mod_wrap2/mod_wrap2.h.in
+++ b/contrib/mod_wrap2/mod_wrap2.h.in
@@ -22,7 +22,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_wrap2.h.in,v 1.10 2011/11/06 21:56:12 castaglia Exp $
+ * $Id: mod_wrap2.h.in,v 1.10 2011-11-06 21:56:12 castaglia Exp $
  */
 
 #ifndef MOD_WRAP2_H
diff --git a/contrib/mod_wrap2_file.c b/contrib/mod_wrap2_file.c
index 60bfbfc..63dc302 100644
--- a/contrib/mod_wrap2_file.c
+++ b/contrib/mod_wrap2_file.c
@@ -2,7 +2,7 @@
  * ProFTPD: mod_wrap2_file -- a mod_wrap2 sub-module for supplying IP-based
  *                            access control data via file-based tables
  *
- * Copyright (c) 2002-2013 TJ Saunders
+ * Copyright (c) 2002-2014 TJ Saunders
  *
  * 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
@@ -22,7 +22,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: mod_wrap2_file.c,v 1.14 2013/12/19 23:19:50 castaglia Exp $
+ * $Id: mod_wrap2_file.c,v 1.14 2013-12-19 23:19:50 castaglia Exp $
  */
 
 #include "mod_wrap2.h"
@@ -47,7 +47,7 @@ static void filetab_parse_table(wrap2_table_t *filetab) {
 
   while (pr_fsio_getline(buf, sizeof(buf), (pr_fh_t *) filetab->tab_handle,
       &lineno) != NULL) {
-    char *res = NULL, *service = NULL;
+    char *ptr, *res = NULL, *service = NULL;
     size_t buflen = strlen(buf);
 
     if (buf[buflen-1] != '\n') {
@@ -56,8 +56,9 @@ static void filetab_parse_table(wrap2_table_t *filetab) {
       continue;
     } 
 
-    if (buf[0] == '#' || buf[strspn(buf, " \t\r\n")] == 0)
+    if (buf[0] == '#' || buf[strspn(buf, " \t\r\n")] == 0) {
       continue;
+    }
 
     buf[buflen-1] = '\0';
 
@@ -66,20 +67,18 @@ static void filetab_parse_table(wrap2_table_t *filetab) {
      * syntax will result in lack of desired results when doing the access
      * checks.
      */
-    res = strchr(buf, ':');
-    if (res == NULL) {
+    ptr = strchr(buf, ':');
+    if (ptr == NULL) {
       wrap2_log("file '%s': badly formatted list of daemon/service names at "
         "line %u", filetab->tab_name, lineno);
       continue;
     }
 
-    service = pstrndup(filetab->tab_pool, buf, (res - buf));
+    service = pstrndup(filetab->tab_pool, buf, (ptr - buf));
 
     if (filetab_service_name &&
         (strcasecmp(filetab_service_name, service) == 0 ||
          strncasecmp("ALL", service, 4) == 0)) {
-      char *ptr = NULL;
-
       if (filetab_daemons_list == NULL) {
         filetab_daemons_list = make_array(filetab->tab_pool, 0, sizeof(char *));
       }
@@ -93,8 +92,9 @@ static void filetab_parse_table(wrap2_table_t *filetab) {
         continue;
       }
 
-      if (filetab_clients_list == NULL)
+      if (filetab_clients_list == NULL) {
         filetab_clients_list = make_array(filetab->tab_pool, 0, sizeof(char *));
+      }
 
       /* Check for another ':' delimiter.  If present, anything following that
        * delimiter is an option/shell command (as per the hosts_access(5) man
@@ -104,23 +104,43 @@ static void filetab_parse_table(wrap2_table_t *filetab) {
        * client names.  Otherwise, a comma- or space-delimited list of names
        * will be treated as a single name, and violate the principle of least
        * surprise for the site admin.
+       *
+       * NOTE: Disable support for options in the file syntax if IPv6 addresses
+       * are present, since the parsing code below is not sufficient for
+       * handling both IPv6 addresses AND options, e.g.:
+       *
+       *  proftpd: [::1] [::2]: <options>
        */
 
-      ptr = wrap2_strsplit(res, ':');    
+      ptr = strchr(res, ':');
       if (ptr != NULL) {
-        if (filetab_options_list == NULL)
-          filetab_options_list = make_array(filetab->tab_pool, 0, 
-            sizeof(char *));
+        char *clients;
+        size_t clients_len;
 
-        /* Skip redundant whitespaces */
-        while (*ptr == ' ' ||
-               *ptr == '\t') {
-          pr_signals_handle();
-          ptr++;
-        }
+        clients_len = (ptr - res);
+        clients = pstrndup(filetab->tab_pool, res, clients_len);
+
+        if (strcspn(clients, "[]") == clients_len) {
+          ptr = wrap2_strsplit(res, ':');
 
-        *((char **) push_array(filetab_options_list)) =
-          pstrdup(filetab->tab_pool, ptr);
+          if (filetab_options_list == NULL) {
+            filetab_options_list = make_array(filetab->tab_pool, 0, 
+              sizeof(char *));
+          }
+
+          /* Skip redundant whitespaces */
+          while (*ptr == ' ' ||
+                 *ptr == '\t') {
+            pr_signals_handle();
+            ptr++;
+          }
+
+          *((char **) push_array(filetab_options_list)) =
+            pstrdup(filetab->tab_pool, ptr);
+
+        } else {
+          /* Ignoring options and IPv6 addresses (Bug#4090) for now. */
+        }
 
       } else {
         /* No options present. */
diff --git a/contrib/mod_wrap2_sql.c b/contrib/mod_wrap2_sql.c
index 052c2ea..61fd149 100644
--- a/contrib/mod_wrap2_sql.c
+++ b/contrib/mod_wrap2_sql.c
@@ -22,7 +22,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: mod_wrap2_sql.c,v 1.12 2012/05/01 21:31:48 castaglia Exp $
+ * $Id: mod_wrap2_sql.c,v 1.12 2012-05-01 21:31:48 castaglia Exp $
  */
 
 #include "mod_wrap2.h"
diff --git a/doc/Configuration.pdf b/doc/Configuration.pdf
new file mode 100644
index 0000000..17de469
Binary files /dev/null and b/doc/Configuration.pdf differ
diff --git a/doc/Configuration.sgml b/doc/Configuration.sgml
new file mode 100644
index 0000000..5c19cd3
--- /dev/null
+++ b/doc/Configuration.sgml
@@ -0,0 +1,35 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+<!ENTITY byname SYSTEM "by_name_source.sgml">
+<!ENTITY bymodule SYSTEM "by_module_source.sgml"> 
+<!ENTITY bycontext SYSTEM "by_context_source.sgml"> 
+]>
+
+
+<book ID="PROFTPD-CONFIG">
+<?dbhtml filename="configuration.html">
+
+<bookinfo>
+<title>Configuration Directive List</title>
+</bookinfo>
+
+<chapter>
+<?dbhtml filename="by-name.html">
+<title>List of Directives</title>
+
+&byname;
+
+</chapter>
+
+<chapter>
+<?dbhtml filename="by-modules.html">
+<title>List of modules</title>
+&bymodule;
+</chapter>
+
+<chapter>
+<?dbhtml filename="by-context.html">
+<title>List of configuration contexts</title>
+&bycontext;
+</chapter>
+
+</book>
diff --git a/doc/contrib/ftpasswd.html b/doc/contrib/ftpasswd.html
index 55d3fbd..3e4fe88 100644
--- a/doc/contrib/ftpasswd.html
+++ b/doc/contrib/ftpasswd.html
@@ -1,5 +1,5 @@
-<!-- $Id: ftpasswd.html,v 1.3 2013/12/08 17:06:12 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/ftpasswd.html,v $ -->
+<!-- $Id: ftpasswd.html,v 1.3 2013-12-08 17:06:12 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/ftpasswd.html,v $ -->
 
 <html>
 <head>
@@ -356,7 +356,7 @@ usage: ftpasswd [--help] [--hash|--group|--passwd]
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/12/08 17:06:12 $</i><br>
+Last Updated: <i>$Date: 2013-12-08 17:06:12 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/ftpmail.html b/doc/contrib/ftpmail.html
index 32f8fa2..f7be70d 100644
--- a/doc/contrib/ftpmail.html
+++ b/doc/contrib/ftpmail.html
@@ -1,5 +1,5 @@
-<!-- $Id: ftpmail.html,v 1.4 2013/02/27 05:40:07 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/ftpmail.html,v $ -->
+<!-- $Id: ftpmail.html,v 1.4 2013-02-27 05:40:07 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/ftpmail.html,v $ -->
 
 <html>
 <head>
@@ -209,7 +209,7 @@ Then start instances of <code>ftpmail</code> running, but only for the
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/02/27 05:40:07 $</i><br>
+Last Updated: <i>$Date: 2013-02-27 05:40:07 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/ftpquota.html b/doc/contrib/ftpquota.html
index 3356175..468e5e4 100644
--- a/doc/contrib/ftpquota.html
+++ b/doc/contrib/ftpquota.html
@@ -1,5 +1,5 @@
-<!-- $Id: ftpquota.html,v 1.1 2004/11/03 19:37:44 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/ftpquota.html,v $ -->
+<!-- $Id: ftpquota.html,v 1.1 2004-11-03 19:37:44 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/ftpquota.html,v $ -->
 
 <html>
 <head>
@@ -271,7 +271,7 @@ usage: ftpquota [options]
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2004/11/03 19:37:44 $</i><br>
+Last Updated: <i>$Date: 2004-11-03 19:37:44 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/index.html b/doc/contrib/index.html
index cc15655..301d6cd 100644
--- a/doc/contrib/index.html
+++ b/doc/contrib/index.html
@@ -1,5 +1,5 @@
-<!-- $Id: index.html,v 1.15 2013/09/18 21:51:36 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/index.html,v $ -->
+<!-- $Id: index.html,v 1.15 2013-09-18 21:51:36 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/index.html,v $ -->
 
 <html>
 <head>
@@ -255,7 +255,7 @@ all of the directives to see everything that ProFTPD is capable of supporting.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/09/18 21:51:36 $</i><br>
+Last Updated: <i>$Date: 2013-09-18 21:51:36 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/contrib/mod_ban.html b/doc/contrib/mod_ban.html
index e0e4f32..a9df1df 100644
--- a/doc/contrib/mod_ban.html
+++ b/doc/contrib/mod_ban.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ban.html,v 1.21 2014/02/23 17:11:36 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_ban.html,v $ -->
+<!-- $Id: mod_ban.html,v 1.21 2014-02-23 17:11:36 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_ban.html,v $ -->
 
 <html>
 <head>
@@ -628,7 +628,7 @@ login as root.  How would I do this?<br>
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/02/23 17:11:36 $</i><br>
+Last Updated: <i>$Date: 2014-02-23 17:11:36 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_copy.html b/doc/contrib/mod_copy.html
index 20cb1a4..ce6f151 100644
--- a/doc/contrib/mod_copy.html
+++ b/doc/contrib/mod_copy.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_copy.html,v 1.1 2010/03/10 19:20:43 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_copy.html,v $ -->
+<!-- $Id: mod_copy.html,v 1.1 2010-03-10 19:20:43 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_copy.html,v $ -->
 
 <html>
 <head>
@@ -27,22 +27,40 @@ ProFTPD 1.3.<i>x</i>, and is not compiled by default.  Installation
 instructions are discussed <a href="#Installation">here</a>.
 
 <p>
-The most current version of <code>mod_copy</code> can be found at:
-<pre>
-  <a href="http://www.castaglia.org/proftpd/">http://www.castaglia.org/proftpd/</a>
-</pre>
+The most current version of <code>mod_copy</code> is distributed with the
+ProFTPD source code.
 
 <h2>Author</h2>
 <p>
 Please contact TJ Saunders <tj <i>at</i> castaglia.org> with any
 questions, concerns, or suggestions regarding this module.
 
+<h2>Directives</h2>
+<ul>
+  <li><a href="#CopyEngine">CopyEngine</a>
+</ul>
+
 <h2><code>SITE</code> Commands</h2>
 <ul>
   <li><a href="#SITE_CPFR">SITE CPFR</a>
   <li><a href="#SITE_CPTO">SITE CPTO</a>
 </ul>
 
+<p>
+<hr>
+<h2><a name="CopyEngine">CopyEngine</a></h2>
+<strong>Syntax:</strong> CopyEngine <em>on|off</em><br>
+<strong>Default:</strong> CopyEngine on<br>
+<strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br>
+<strong>Module:</strong> mod_radius<br>
+<strong>Compatibility:</strong> 1.3.6rc1 and later
+
+<p>
+The <code>CopyEngine</code> directive enables or disables the module's
+handling of <code>SITE COPY</code> <i>et al</i> commands.  If it is set to
+<em>off</em> this module ignores these commands.
+
+<p>
 <hr>
 <h2><a name="SITE_CPFR">SITE CPFR</a></h2>
 This <code>SITE</code> command specifies the source file/directory to use
@@ -118,13 +136,8 @@ your existing server:
 <p>
 <hr><br>
 
-Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2010/03/10 19:20:43 $</i><br>
-
-<br><hr>
-
 <font size=2><b><i>
-© Copyright 2009-2010 TJ Saunders<br>
+© Copyright 2009-2015 TJ Saunders<br>
  All Rights Reserved<br>
 </i></b></font>
 
diff --git a/doc/contrib/mod_ctrls_admin.html b/doc/contrib/mod_ctrls_admin.html
index d2e0a1a..d3abd40 100644
--- a/doc/contrib/mod_ctrls_admin.html
+++ b/doc/contrib/mod_ctrls_admin.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ctrls_admin.html,v 1.12 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_ctrls_admin.html,v $ -->
+<!-- $Id: mod_ctrls_admin.html,v 1.12 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_ctrls_admin.html,v $ -->
 
 <html>
 <head>
@@ -426,7 +426,7 @@ your existing server:
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_deflate.html b/doc/contrib/mod_deflate.html
index c9090e3..61e407b 100644
--- a/doc/contrib/mod_deflate.html
+++ b/doc/contrib/mod_deflate.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_deflate.html,v 1.3 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_deflate.html,v $ -->
+<!-- $Id: mod_deflate.html,v 1.3 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_deflate.html,v $ -->
 
 <html>
 <head>
@@ -190,7 +190,7 @@ files as binary files, not as ASCII files.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_dnsbl.html b/doc/contrib/mod_dnsbl.html
index 047b6e6..11cfef1 100644
--- a/doc/contrib/mod_dnsbl.html
+++ b/doc/contrib/mod_dnsbl.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_dnsbl.html,v 1.1 2013/09/18 21:18:51 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_dnsbl.html,v $ -->
+<!-- $Id: mod_dnsbl.html,v 1.1 2013-09-18 21:18:51 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_dnsbl.html,v $ -->
 
 <html>
 <head>
@@ -172,7 +172,7 @@ Then follow the normal steps for using third-party modules in proftpd:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/09/18 21:18:51 $</i><br>
+Last Updated: <i>$Date: 2013-09-18 21:18:51 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_dynmasq.html b/doc/contrib/mod_dynmasq.html
index 80d936a..c8cc7b1 100644
--- a/doc/contrib/mod_dynmasq.html
+++ b/doc/contrib/mod_dynmasq.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_dynmasq.html,v 1.3 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_dynmasq.html,v $ -->
+<!-- $Id: mod_dynmasq.html,v 1.3 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_dynmasq.html,v $ -->
 
 <html>
 <head>
@@ -108,7 +108,7 @@ your existing server:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_exec.html b/doc/contrib/mod_exec.html
index 77a2b72..a56e5c9 100644
--- a/doc/contrib/mod_exec.html
+++ b/doc/contrib/mod_exec.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_exec.html,v 1.10 2014/01/21 22:39:11 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_exec.html,v $ -->
+<!-- $Id: mod_exec.html,v 1.10 2014-01-21 22:39:11 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_exec.html,v $ -->
 
 <html>
 <head>
@@ -622,7 +622,7 @@ the <code>%U/%u</code> variables.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/21 22:39:11 $</i><br>
+Last Updated: <i>$Date: 2014-01-21 22:39:11 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_geoip.html b/doc/contrib/mod_geoip.html
index cacd91e..857b1bf 100644
--- a/doc/contrib/mod_geoip.html
+++ b/doc/contrib/mod_geoip.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_geoip.html,v 1.6 2013/12/12 16:52:28 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_geoip.html,v $ -->
+<!-- $Id: mod_geoip.html,v 1.6 2013-12-12 16:52:28 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_geoip.html,v $ -->
 
 <html>
 <head>
@@ -439,7 +439,7 @@ according to need, demand, inclination, and time:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/12/12 16:52:28 $</i><br>
+Last Updated: <i>$Date: 2013-12-12 16:52:28 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_ifsession.html b/doc/contrib/mod_ifsession.html
index 20c1e8a..76f4999 100644
--- a/doc/contrib/mod_ifsession.html
+++ b/doc/contrib/mod_ifsession.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ifsession.html,v 1.7 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_ifsession.html,v $ -->
+<!-- $Id: mod_ifsession.html,v 1.7 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_ifsession.html,v $ -->
 
 <html>
 <head>
@@ -316,7 +316,7 @@ module:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_ifversion.html b/doc/contrib/mod_ifversion.html
index 6add28a..6518b12 100644
--- a/doc/contrib/mod_ifversion.html
+++ b/doc/contrib/mod_ifversion.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ifversion.html,v 1.1 2010/06/29 14:52:30 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_ifversion.html,v $ -->
+<!-- $Id: mod_ifversion.html,v 1.1 2010-06-29 14:52:30 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_ifversion.html,v $ -->
 
 <html>
 <head>
@@ -197,7 +197,7 @@ Using a reversed regular expression (<i>i.e.</i> in this case, meaning
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2010/06/29 14:52:30 $</i><br>
+Last Updated: <i>$Date: 2010-06-29 14:52:30 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_ldap.html b/doc/contrib/mod_ldap.html
index 34e5492..4efb0f7 100644
--- a/doc/contrib/mod_ldap.html
+++ b/doc/contrib/mod_ldap.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ldap.html,v 1.2 2014/01/21 22:11:45 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_ldap.html,v $ -->
+<!-- $Id: mod_ldap.html,v 1.2 2014-01-21 22:11:45 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_ldap.html,v $ -->
 
 <html>
 <head>
@@ -639,7 +639,7 @@ you (or not), please let us know:
 <p>
 <hr><br>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/21 22:11:45 $</i><br>
+Last Updated: <i>$Date: 2014-01-21 22:11:45 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_load.html b/doc/contrib/mod_load.html
index 549af00..5590522 100644
--- a/doc/contrib/mod_load.html
+++ b/doc/contrib/mod_load.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_load.html,v 1.3 2005/01/01 20:15:55 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_load.html,v $ -->
+<!-- $Id: mod_load.html,v 1.3 2005-01-01 20:15:55 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_load.html,v $ -->
 
 <html>
 <head>
@@ -102,7 +102,7 @@ modules in proftpd:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2005/01/01 20:15:55 $</i><br>
+Last Updated: <i>$Date: 2005-01-01 20:15:55 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_log_forensic.html b/doc/contrib/mod_log_forensic.html
index b6f493f..d15a230 100644
--- a/doc/contrib/mod_log_forensic.html
+++ b/doc/contrib/mod_log_forensic.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_log_forensic.html,v 1.3 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_log_forensic.html,v $ -->
+<!-- $Id: mod_log_forensic.html,v 1.3 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_log_forensic.html,v $ -->
 
 <html>
 <head>
@@ -304,7 +304,7 @@ the verbose logging enabled all of the time.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_qos.html b/doc/contrib/mod_qos.html
index ae099a5..144ed1c 100644
--- a/doc/contrib/mod_qos.html
+++ b/doc/contrib/mod_qos.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_qos.html,v 1.2 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_qos.html,v $ -->
+<!-- $Id: mod_qos.html,v 1.2 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_qos.html,v $ -->
 
 <html>
 <head>
@@ -113,7 +113,7 @@ module:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_quotatab.html b/doc/contrib/mod_quotatab.html
index bbc1363..88d6292 100644
--- a/doc/contrib/mod_quotatab.html
+++ b/doc/contrib/mod_quotatab.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_quotatab.html,v 1.20 2014/01/27 22:08:41 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_quotatab.html,v $ -->
+<!-- $Id: mod_quotatab.html,v 1.20 2014-01-27 22:08:41 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_quotatab.html,v $ -->
 
 <html>
 <head>
@@ -633,7 +633,7 @@ for that module.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/27 22:08:41 $</i><br>
+Last Updated: <i>$Date: 2014-01-27 22:08:41 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_quotatab_file.html b/doc/contrib/mod_quotatab_file.html
index bda678f..836bab0 100644
--- a/doc/contrib/mod_quotatab_file.html
+++ b/doc/contrib/mod_quotatab_file.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_quotatab_file.html,v 1.3 2013/08/14 21:40:17 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_quotatab_file.html,v $ -->
+<!-- $Id: mod_quotatab_file.html,v 1.3 2013-08-14 21:40:17 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_quotatab_file.html,v $ -->
 
 <html>
 <head>
@@ -67,7 +67,7 @@ Examples:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:17 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:17 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_quotatab_ldap.html b/doc/contrib/mod_quotatab_ldap.html
index 1c5dee7..d3c08ed 100644
--- a/doc/contrib/mod_quotatab_ldap.html
+++ b/doc/contrib/mod_quotatab_ldap.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_quotatab_ldap.html,v 1.3 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_quotatab_ldap.html,v $ -->
+<!-- $Id: mod_quotatab_ldap.html,v 1.3 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_quotatab_ldap.html,v $ -->
 
 <html>
 <head>
diff --git a/doc/contrib/mod_quotatab_radius.html b/doc/contrib/mod_quotatab_radius.html
index aa7a3c9..fcb1ad3 100644
--- a/doc/contrib/mod_quotatab_radius.html
+++ b/doc/contrib/mod_quotatab_radius.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_quotatab_radius.html,v 1.3 2007/02/20 22:01:40 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_quotatab_radius.html,v $ -->
+<!-- $Id: mod_quotatab_radius.html,v 1.3 2007-02-20 22:01:40 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_quotatab_radius.html,v $ -->
 
 <html>
 <head>
diff --git a/doc/contrib/mod_quotatab_sql.html b/doc/contrib/mod_quotatab_sql.html
index 055bc30..dd1d5d5 100644
--- a/doc/contrib/mod_quotatab_sql.html
+++ b/doc/contrib/mod_quotatab_sql.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_quotatab_sql.html,v 1.2 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_quotatab_sql.html,v $ -->
+<!-- $Id: mod_quotatab_sql.html,v 1.2 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_quotatab_sql.html,v $ -->
 
 <html>
 <head>
@@ -282,7 +282,7 @@ calculations. NULL values should be avoided whenever possible.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:18 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:18 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_radius.html b/doc/contrib/mod_radius.html
index 04d811c..c063d7a 100644
--- a/doc/contrib/mod_radius.html
+++ b/doc/contrib/mod_radius.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_radius.html,v 1.9 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_radius.html,v $ -->
+<!-- $Id: mod_radius.html,v 1.9 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_radius.html,v $ -->
 
 <html>
 <head>
@@ -497,7 +497,7 @@ module:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:18 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:18 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_ratio.html b/doc/contrib/mod_ratio.html
index 464e9ac..f9415bf 100644
--- a/doc/contrib/mod_ratio.html
+++ b/doc/contrib/mod_ratio.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ratio.html,v 1.1 2013/10/03 06:33:19 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_ratio.html,v $ -->
+<!-- $Id: mod_ratio.html,v 1.1 2013-10-03 06:33:19 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_ratio.html,v $ -->
 
 <html>
 <head>
@@ -230,7 +230,7 @@ To use <code>mod_ratio</code>
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/10/03 06:33:19 $</i><br>
+Last Updated: <i>$Date: 2013-10-03 06:33:19 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_readme.html b/doc/contrib/mod_readme.html
index 31a082e..79e655d 100644
--- a/doc/contrib/mod_readme.html
+++ b/doc/contrib/mod_readme.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_readme.html,v 1.2 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_readme.html,v $ -->
+<!-- $Id: mod_readme.html,v 1.2 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_readme.html,v $ -->
 
 <html>
 <head>
@@ -97,7 +97,7 @@ a shared module:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:18 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:18 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_rewrite.html b/doc/contrib/mod_rewrite.html
index 923730a..dd1c28d 100644
--- a/doc/contrib/mod_rewrite.html
+++ b/doc/contrib/mod_rewrite.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_rewrite.html,v 1.10 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_rewrite.html,v $ -->
+<!-- $Id: mod_rewrite.html,v 1.10 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_rewrite.html,v $ -->
 
 <html>
 <head>
@@ -916,7 +916,7 @@ module:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:18 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:18 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sftp.html b/doc/contrib/mod_sftp.html
index 62ffbc0..d10c350 100644
--- a/doc/contrib/mod_sftp.html
+++ b/doc/contrib/mod_sftp.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sftp.html,v 1.82 2014/03/03 05:40:13 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sftp.html,v $ -->
+<!-- $Id: mod_sftp.html,v 1.82 2014-03-03 05:40:13 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sftp.html,v $ -->
 
 <html>
 <head>
@@ -2145,7 +2145,7 @@ capability).
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/03/03 05:40:13 $</i><br>
+Last Updated: <i>$Date: 2014-03-03 05:40:13 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sftp_pam.html b/doc/contrib/mod_sftp_pam.html
index 71fcb7f..3e70d7c 100644
--- a/doc/contrib/mod_sftp_pam.html
+++ b/doc/contrib/mod_sftp_pam.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sftp_pam.html,v 1.5 2013/10/03 05:21:56 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sftp_pam.html,v $ -->
+<!-- $Id: mod_sftp_pam.html,v 1.5 2013-10-03 05:21:56 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sftp_pam.html,v $ -->
 
 <html>
 <head>
@@ -170,7 +170,7 @@ different PAM configurations for FTP versus SSH2 logins.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/10/03 05:21:56 $</i><br>
+Last Updated: <i>$Date: 2013-10-03 05:21:56 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sftp_sql.html b/doc/contrib/mod_sftp_sql.html
index 62c91e7..3a25d00 100644
--- a/doc/contrib/mod_sftp_sql.html
+++ b/doc/contrib/mod_sftp_sql.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sftp_sql.html,v 1.5 2010/03/02 19:03:55 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sftp_sql.html,v $ -->
+<!-- $Id: mod_sftp_sql.html,v 1.5 2010-03-02 19:03:55 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sftp_sql.html,v $ -->
 
 <html>
 <head>
@@ -165,7 +165,7 @@ keys into your SQL tables, for use via <code>mod_sftp_sql</code>.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2010/03/02 19:03:55 $</i><br>
+Last Updated: <i>$Date: 2010-03-02 19:03:55 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_shaper.html b/doc/contrib/mod_shaper.html
index 86bed3e..33001d6 100644
--- a/doc/contrib/mod_shaper.html
+++ b/doc/contrib/mod_shaper.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_shaper.html,v 1.4 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_shaper.html,v $ -->
+<!-- $Id: mod_shaper.html,v 1.4 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_shaper.html,v $ -->
 
 <html>
 <head>
@@ -610,7 +610,7 @@ while the daemon and sessions are running, to set the desired shaping values.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:18 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:18 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_site_misc.html b/doc/contrib/mod_site_misc.html
index 9f4716f..a3eb3d5 100644
--- a/doc/contrib/mod_site_misc.html
+++ b/doc/contrib/mod_site_misc.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_site_misc.html,v 1.5 2014/05/04 19:49:57 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_site_misc.html,v $ -->
+<!-- $Id: mod_site_misc.html,v 1.5 2014-05-04 19:49:57 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_site_misc.html,v $ -->
 
 <html>
 <head>
@@ -206,7 +206,7 @@ module:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/05/04 19:49:57 $</i><br>
+Last Updated: <i>$Date: 2014-05-04 19:49:57 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_snmp.html b/doc/contrib/mod_snmp.html
index 54b4763..c92a980 100644
--- a/doc/contrib/mod_snmp.html
+++ b/doc/contrib/mod_snmp.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_snmp.html,v 1.1 2013/05/15 15:21:44 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_snmp.html,v $ -->
+<!-- $Id: mod_snmp.html,v 1.1 2013-05-15 15:21:44 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_snmp.html,v $ -->
 
 <html>
 <head>
@@ -1334,7 +1334,7 @@ to get <i>just</i> a directory listing; the protocol only transfers files.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/05/15 15:21:44 $</i><br>
+Last Updated: <i>$Date: 2013-05-15 15:21:44 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sql.html b/doc/contrib/mod_sql.html
index 539f6df..8e2eb91 100644
--- a/doc/contrib/mod_sql.html
+++ b/doc/contrib/mod_sql.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sql.html,v 1.32 2014/01/21 22:32:31 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sql.html,v $ -->
+<!-- $Id: mod_sql.html,v 1.32 2014-01-21 22:32:31 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sql.html,v $ -->
 
 <html>
 <head>
@@ -1472,7 +1472,7 @@ Complete the build with the following standard commands:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/21 22:32:31 $</i><br>
+Last Updated: <i>$Date: 2014-01-21 22:32:31 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sql_odbc.html b/doc/contrib/mod_sql_odbc.html
index e7e4874..219fe88 100644
--- a/doc/contrib/mod_sql_odbc.html
+++ b/doc/contrib/mod_sql_odbc.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sql_odbc.html,v 1.4 2011/04/19 22:23:12 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sql_odbc.html,v $ -->
+<!-- $Id: mod_sql_odbc.html,v 1.4 2011-04-19 22:23:12 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sql_odbc.html,v $ -->
 
 <html>
 <head>
@@ -260,7 +260,7 @@ Please contact the author directly with any questions or comments.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2011/04/19 22:23:12 $</i><br>
+Last Updated: <i>$Date: 2011-04-19 22:23:12 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sql_passwd.html b/doc/contrib/mod_sql_passwd.html
index d2618bb..66dceec 100644
--- a/doc/contrib/mod_sql_passwd.html
+++ b/doc/contrib/mod_sql_passwd.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sql_passwd.html,v 1.14 2014/05/04 23:15:00 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sql_passwd.html,v $ -->
+<!-- $Id: mod_sql_passwd.html,v 1.14 2014-05-04 23:15:00 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sql_passwd.html,v $ -->
 
 <html>
 <head>
@@ -563,7 +563,7 @@ values can be supported by the <code>mod_sql_passwd</code> module.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/05/04 23:15:00 $</i><br>
+Last Updated: <i>$Date: 2014-05-04 23:15:00 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_sql_sqlite.html b/doc/contrib/mod_sql_sqlite.html
index 5c86075..6bf9d6b 100644
--- a/doc/contrib/mod_sql_sqlite.html
+++ b/doc/contrib/mod_sql_sqlite.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_sql_sqlite.html,v 1.4 2009/06/29 17:10:22 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_sql_sqlite.html,v $ -->
+<!-- $Id: mod_sql_sqlite.html,v 1.4 2009-06-29 17:10:22 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_sql_sqlite.html,v $ -->
 
 <html>
 <head>
@@ -97,7 +97,7 @@ process.)
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2009/06/29 17:10:22 $</i><br>
+Last Updated: <i>$Date: 2009-06-29 17:10:22 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_tls.html b/doc/contrib/mod_tls.html
index bde2997..0abfb51 100644
--- a/doc/contrib/mod_tls.html
+++ b/doc/contrib/mod_tls.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_tls.html,v 1.43 2013/12/09 23:15:16 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_tls.html,v $ -->
+<!-- $Id: mod_tls.html,v 1.43 2013-12-09 23:15:16 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_tls.html,v $ -->
 
 <html>
 <head>
@@ -1843,7 +1843,7 @@ in your <code>configure</i> command, <i>e.g.</i>:
 <p>
 <hr><br>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/12/09 23:15:16 $</i><br>
+Last Updated: <i>$Date: 2013-12-09 23:15:16 $</i><br>
 
 <hr>
 <font size=2><b><i>
diff --git a/doc/contrib/mod_tls_memcache.html b/doc/contrib/mod_tls_memcache.html
index 160ff5c..693c7b2 100644
--- a/doc/contrib/mod_tls_memcache.html
+++ b/doc/contrib/mod_tls_memcache.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_tls_memcache.html,v 1.1 2011/02/16 00:27:50 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_tls_memcache.html,v $ -->
+<!-- $Id: mod_tls_memcache.html,v 1.1 2011-02-16 00:27:50 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_tls_memcache.html,v $ -->
 
 <html>
 <head>
@@ -93,7 +93,7 @@ a shared module:
 <p>
 <hr>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2011/02/16 00:27:50 $</i><br>
+Last Updated: <i>$Date: 2011-02-16 00:27:50 $</i><br>
 
 <hr>
 <font size=2><b><i>
diff --git a/doc/contrib/mod_tls_shmcache.html b/doc/contrib/mod_tls_shmcache.html
index 7ca3099..fdd1d14 100644
--- a/doc/contrib/mod_tls_shmcache.html
+++ b/doc/contrib/mod_tls_shmcache.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_tls_shmcache.html,v 1.3 2013/11/05 21:33:21 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_tls_shmcache.html,v $ -->
+<!-- $Id: mod_tls_shmcache.html,v 1.3 2013-11-05 21:33:21 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_tls_shmcache.html,v $ -->
 
 <html>
 <head>
@@ -160,7 +160,7 @@ your config looks something like this:
 <p>
 <hr>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/11/05 21:33:21 $</i><br>
+Last Updated: <i>$Date: 2013-11-05 21:33:21 $</i><br>
 
 <hr>
 <font size=2><b><i>
diff --git a/doc/contrib/mod_unique_id.html b/doc/contrib/mod_unique_id.html
index 6644650..c4392d5 100644
--- a/doc/contrib/mod_unique_id.html
+++ b/doc/contrib/mod_unique_id.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_unique_id.html,v 1.3 2013/08/14 21:40:18 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_unique_id.html,v $ -->
+<!-- $Id: mod_unique_id.html,v 1.3 2013-08-14 21:40:18 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_unique_id.html,v $ -->
 
 <html>
 <head>
@@ -126,7 +126,7 @@ Example configuration:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/14 21:40:18 $</i><br>
+Last Updated: <i>$Date: 2013-08-14 21:40:18 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_wrap.html b/doc/contrib/mod_wrap.html
index 889e881..8434728 100644
--- a/doc/contrib/mod_wrap.html
+++ b/doc/contrib/mod_wrap.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_wrap.html,v 1.4 2009/12/23 23:46:35 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_wrap.html,v $ -->
+<!-- $Id: mod_wrap.html,v 1.4 2009-12-23 23:46:35 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_wrap.html,v $ -->
 
 <html>
 <head>
@@ -321,7 +321,7 @@ proftpd:
 <p>
 <hr>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2009/12/23 23:46:35 $</i><br>
+Last Updated: <i>$Date: 2009-12-23 23:46:35 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_wrap2.html b/doc/contrib/mod_wrap2.html
index bb9cb4d..a2d592d 100644
--- a/doc/contrib/mod_wrap2.html
+++ b/doc/contrib/mod_wrap2.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_wrap2.html,v 1.7 2013/12/19 17:55:10 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_wrap2.html,v $ -->
+<!-- $Id: mod_wrap2.html,v 1.7 2013-12-19 17:55:10 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_wrap2.html,v $ -->
 
 <html>
 <head>
@@ -629,7 +629,7 @@ documentation for installation instructions for that module.
 <p>
 <hr>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/12/19 17:55:10 $</i><br>
+Last Updated: <i>$Date: 2013-12-19 17:55:10 $</i><br>
 <hr>
 
 <font size=2><b><i>
diff --git a/doc/contrib/mod_wrap2_file.html b/doc/contrib/mod_wrap2_file.html
index 8cdcdf8..090f664 100644
--- a/doc/contrib/mod_wrap2_file.html
+++ b/doc/contrib/mod_wrap2_file.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_wrap2_file.html,v 1.2 2008/12/17 00:24:47 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_wrap2_file.html,v $ -->
+<!-- $Id: mod_wrap2_file.html,v 1.2 2008-12-17 00:24:47 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_wrap2_file.html,v $ -->
 
 <html>
 <head>
@@ -132,7 +132,7 @@ still permits finger requests from other hosts and domains.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2008/12/17 00:24:47 $</i><br>
+Last Updated: <i>$Date: 2008-12-17 00:24:47 $</i><br>
 
 <br><hr>
 
diff --git a/doc/contrib/mod_wrap2_sql.html b/doc/contrib/mod_wrap2_sql.html
index 53fc052..8fd0258 100644
--- a/doc/contrib/mod_wrap2_sql.html
+++ b/doc/contrib/mod_wrap2_sql.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_wrap2_sql.html,v 1.3 2013/05/12 23:13:43 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_wrap2_sql.html,v $ -->
+<!-- $Id: mod_wrap2_sql.html,v 1.3 2013-05-12 23:13:43 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_wrap2_sql.html,v $ -->
 
 <html>
 <head>
@@ -176,7 +176,7 @@ options in a single row, in an appropriately formatted string.
 <p>
 <hr>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/05/12 23:13:43 $</i><br>
+Last Updated: <i>$Date: 2013-05-12 23:13:43 $</i><br>
 
 <br><hr>
 
diff --git a/doc/howto/ASCII.html b/doc/howto/ASCII.html
index 9bfc4bb..04507cc 100644
--- a/doc/howto/ASCII.html
+++ b/doc/howto/ASCII.html
@@ -1,5 +1,5 @@
-<!-- $Id: ASCII.html,v 1.2 2009/03/20 16:58:34 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/ASCII.html,v $ -->
+<!-- $Id: ASCII.html,v 1.2 2009-03-20 16:58:34 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/ASCII.html,v $ -->
 
 <html>
 <head>
@@ -81,7 +81,7 @@ a wrong answer.
 
 <p>
 <hr>
-<i>$Date: 2009/03/20 16:58:34 $</i><br>
+<i>$Date: 2009-03-20 16:58:34 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/AuthFiles.html b/doc/howto/AuthFiles.html
index b56dc10..3dec3e9 100644
--- a/doc/howto/AuthFiles.html
+++ b/doc/howto/AuthFiles.html
@@ -1,5 +1,5 @@
-<!-- $Id: AuthFiles.html,v 1.1 2006/01/11 13:55:37 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/AuthFiles.html,v $ -->
+<!-- $Id: AuthFiles.html,v 1.1 2006-01-11 13:55:37 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/AuthFiles.html,v $ -->
 
 <html>
 <head>
diff --git a/doc/howto/Authentication.html b/doc/howto/Authentication.html
index 4b41196..c82923a 100644
--- a/doc/howto/Authentication.html
+++ b/doc/howto/Authentication.html
@@ -1,5 +1,5 @@
-<!-- $Id: Authentication.html,v 1.11 2013/08/19 16:32:23 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Authentication.html,v $ -->
+<!-- $Id: Authentication.html,v 1.11 2013-08-19 16:32:23 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Authentication.html,v $ -->
 
 <html>
 <head>
@@ -296,7 +296,7 @@ code goes out of its way to ensure that the password is never logged.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/08/19 16:32:23 $</i><br>
+Last Updated: <i>$Date: 2013-08-19 16:32:23 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/BCP.html b/doc/howto/BCP.html
index 2f009de..6724f12 100644
--- a/doc/howto/BCP.html
+++ b/doc/howto/BCP.html
@@ -1,5 +1,5 @@
-<!-- $Id: BCP.html,v 1.2 2004/05/25 17:41:34 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/BCP.html,v $ -->
+<!-- $Id: BCP.html,v 1.2 2004-05-25 17:41:34 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/BCP.html,v $ -->
 
 <html>
 <head>
@@ -280,7 +280,7 @@ drop root privileges completely (read the description for details).
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2004/05/25 17:41:34 $</i><br>
+Last Updated: <i>$Date: 2004-05-25 17:41:34 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Chroot.html b/doc/howto/Chroot.html
index ef69a0f..8d0d6ad 100644
--- a/doc/howto/Chroot.html
+++ b/doc/howto/Chroot.html
@@ -1,5 +1,5 @@
-<!-- $Id: Chroot.html,v 1.9 2014/03/13 18:06:26 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Chroot.html,v $ -->
+<!-- $Id: Chroot.html,v 1.9 2014-03-13 18:06:26 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Chroot.html,v $ -->
 
 <html>
 <head>
@@ -325,7 +325,7 @@ edited, or maybe the <code>DefaultRoot</code> directive is not in a
 
 <p>
 <hr>
-Last Updated: $Date: 2014/03/13 18:06:26 $<br>
+Last Updated: $Date: 2014-03-13 18:06:26 $<br>
 <hr>
 
 </body>
diff --git a/doc/howto/Classes.html b/doc/howto/Classes.html
index 586af1d..7e6dff5 100644
--- a/doc/howto/Classes.html
+++ b/doc/howto/Classes.html
@@ -1,5 +1,5 @@
-<!-- $Id: Classes.html,v 1.4 2008/06/10 16:29:07 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Classes.html,v $ -->
+<!-- $Id: Classes.html,v 1.4 2008-06-10 16:29:07 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Classes.html,v $ -->
 
 <html>
 <head>
@@ -172,7 +172,7 @@ This allows clients from class "internal" to see an effective
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2008/06/10 16:29:07 $</i><br>
+Last Updated: <i>$Date: 2008-06-10 16:29:07 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Compiling.html b/doc/howto/Compiling.html
index bd6d3ae..8d285be 100644
--- a/doc/howto/Compiling.html
+++ b/doc/howto/Compiling.html
@@ -1,5 +1,5 @@
-<!-- $Id: Compiling.html,v 1.10 2013/10/06 16:02:23 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Compiling.html,v $ -->
+<!-- $Id: Compiling.html,v 1.10 2013-10-06 16:02:23 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Compiling.html,v $ -->
 
 <html>
 <head>
@@ -820,7 +820,7 @@ and <code>--enable-autoshadow</code>.
 
 <p>
 <hr>
-<i>$Date: 2013/10/06 16:02:23 $</i><br>
+<i>$Date: 2013-10-06 16:02:23 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/ConfigFile.html b/doc/howto/ConfigFile.html
index ab1ea87..7f5837e 100644
--- a/doc/howto/ConfigFile.html
+++ b/doc/howto/ConfigFile.html
@@ -1,5 +1,5 @@
-<!-- $Id: ConfigFile.html,v 1.6 2009/09/04 22:26:49 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/ConfigFile.html,v $ -->
+<!-- $Id: ConfigFile.html,v 1.6 2009-09-04 22:26:49 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/ConfigFile.html,v $ -->
 
 <html>
 <head>
@@ -220,7 +220,7 @@ users</a> mailing list is the best place to post them.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2009/09/04 22:26:49 $</i><br>
+Last Updated: <i>$Date: 2009-09-04 22:26:49 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/ConfigurationTricks.html b/doc/howto/ConfigurationTricks.html
index caf4f2b..dce8c10 100644
--- a/doc/howto/ConfigurationTricks.html
+++ b/doc/howto/ConfigurationTricks.html
@@ -1,5 +1,5 @@
-<!-- $Id: ConfigurationTricks.html,v 1.6 2013/10/06 15:46:36 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/ConfigurationTricks.html,v $ -->
+<!-- $Id: ConfigurationTricks.html,v 1.6 2013-10-06 15:46:36 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/ConfigurationTricks.html,v $ -->
 
 <html>
 <head>
@@ -427,7 +427,7 @@ approaching full LAN network speed for the FTP data transfer.
 
 <p>
 <hr>
-<i>$Date: 2013/10/06 15:46:36 $</i><br>
+<i>$Date: 2013-10-06 15:46:36 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/ConnectionACLs.html b/doc/howto/ConnectionACLs.html
index 83bc02c..161fb05 100644
--- a/doc/howto/ConnectionACLs.html
+++ b/doc/howto/ConnectionACLs.html
@@ -1,5 +1,5 @@
-<!-- $Id: ConnectionACLs.html,v 1.3 2011/01/05 19:26:53 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/ConnectionACLs.html,v $ -->
+<!-- $Id: ConnectionACLs.html,v 1.3 2011-01-05 19:26:53 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/ConnectionACLs.html,v $ -->
 
 <html>
 <head>
@@ -216,7 +216,7 @@ can also appear as:
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2011/01/05 19:26:53 $</i><br>
+Last Updated: <i>$Date: 2011-01-05 19:26:53 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Controls.html b/doc/howto/Controls.html
index df9ef3c..84c5398 100644
--- a/doc/howto/Controls.html
+++ b/doc/howto/Controls.html
@@ -1,5 +1,5 @@
-<!-- $Id: Controls.html,v 1.5 2013/01/09 20:53:43 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Controls.html,v $ -->
+<!-- $Id: Controls.html,v 1.5 2013-01-09 20:53:43 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Controls.html,v $ -->
 
 <html>
 <head>
@@ -309,7 +309,7 @@ If either allows access, the client can use that control action.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/01/09 20:53:43 $</i><br>
+Last Updated: <i>$Date: 2013-01-09 20:53:43 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/CreateHome.html b/doc/howto/CreateHome.html
index c79689e..08776d4 100644
--- a/doc/howto/CreateHome.html
+++ b/doc/howto/CreateHome.html
@@ -1,5 +1,5 @@
-<!-- $Id: CreateHome.html,v 1.7 2012/09/05 17:30:05 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/CreateHome.html,v $ -->
+<!-- $Id: CreateHome.html,v 1.7 2012-09-05 17:30:05 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/CreateHome.html,v $ -->
 
 <html>
 <head>
@@ -175,7 +175,7 @@ For example:
 
 <p>
 <hr>
-<i>$Date: 2012/09/05 17:30:05 $</i><br>
+<i>$Date: 2012-09-05 17:30:05 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/DNS.html b/doc/howto/DNS.html
index 6f2c382..1fb3b7d 100644
--- a/doc/howto/DNS.html
+++ b/doc/howto/DNS.html
@@ -1,5 +1,5 @@
-<!-- $Id: DNS.html,v 1.2 2009/02/12 22:41:32 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/DNS.html,v $ -->
+<!-- $Id: DNS.html,v 1.2 2009-02-12 22:41:32 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/DNS.html,v $ -->
 
 <html>
 <head>
@@ -161,7 +161,7 @@ not DNS names.
 
 <p>
 <hr>
-<i>$Date: 2009/02/12 22:41:32 $</i><br>
+<i>$Date: 2009-02-12 22:41:32 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/DSO.html b/doc/howto/DSO.html
index 7ed57df..7c9947e 100644
--- a/doc/howto/DSO.html
+++ b/doc/howto/DSO.html
@@ -1,5 +1,5 @@
-<!-- $Id: DSO.html,v 1.10 2012/10/12 02:21:19 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/DSO.html,v $ -->
+<!-- $Id: DSO.html,v 1.10 2012-10-12 02:21:19 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/DSO.html,v $ -->
 
 <html>
 <head>
@@ -376,7 +376,7 @@ needing to recompile/reinstall proftpd itself.
 
 <p>
 <hr>
-<i>$Date: 2012/10/12 02:21:19 $</i><br>
+<i>$Date: 2012-10-12 02:21:19 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Debugging.html b/doc/howto/Debugging.html
index 69bfb69..ec38667 100644
--- a/doc/howto/Debugging.html
+++ b/doc/howto/Debugging.html
@@ -1,5 +1,5 @@
-<!-- $Id: Debugging.html,v 1.7 2012/12/02 00:23:36 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Debugging.html,v $ -->
+<!-- $Id: Debugging.html,v 1.7 2012-12-02 00:23:36 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Debugging.html,v $ -->
 
 <html>
 <head>
@@ -272,7 +272,7 @@ be answered:
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2012/12/02 00:23:36 $</i><br>
+Last Updated: <i>$Date: 2012-12-02 00:23:36 $</i><br>
 <hr>
 
 <hr>
diff --git a/doc/howto/Directory.html b/doc/howto/Directory.html
index 3808c39..be59da2 100644
--- a/doc/howto/Directory.html
+++ b/doc/howto/Directory.html
@@ -1,5 +1,5 @@
-<!-- $Id: Directory.html,v 1.12 2008/12/10 22:40:15 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Directory.html,v $ -->
+<!-- $Id: Directory.html,v 1.12 2008-12-10 22:40:15 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Directory.html,v $ -->
 
 <html>
 <head>
@@ -314,7 +314,7 @@ list, we make sure that the <code><i>RNFR</i></code> <i>does</i> match the
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2008/12/10 22:40:15 $</i><br>
+Last Updated: <i>$Date: 2008-12-10 22:40:15 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/DisplayFiles.html b/doc/howto/DisplayFiles.html
index 6ca3b71..c83ff0f 100644
--- a/doc/howto/DisplayFiles.html
+++ b/doc/howto/DisplayFiles.html
@@ -1,5 +1,5 @@
-<!-- $Id: DisplayFiles.html,v 1.8 2012/05/03 18:29:41 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/DisplayFiles.html,v $ -->
+<!-- $Id: DisplayFiles.html,v 1.8 2012-05-03 18:29:41 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/DisplayFiles.html,v $ -->
 
 <html>
 <head>
@@ -97,7 +97,7 @@ as well; please consult their documentation for more information.
 
   <tr>
     <td>%F</td>
-    <td>Available space on file system, in bytes</td>
+    <td>Available space on file system, in KB</td>
   <tr>
 
   <tr>
@@ -257,7 +257,7 @@ the <code>/home</code> filesystem).
 
 <p>
 <hr>
-<i>$Date: 2012/05/03 18:29:41 $</i><br>
+<i>$Date: 2012-05-03 18:29:41 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/ECCN.html b/doc/howto/ECCN.html
index c6b4bbd..151dc24 100644
--- a/doc/howto/ECCN.html
+++ b/doc/howto/ECCN.html
@@ -112,7 +112,7 @@ And the text of EAR Section 740, for those interested:
 
 <p>
 <hr>
-<i>$Date: 2013/07/09 17:41:49 $</i><br>
+<i>$Date: 2013-07-09 17:41:49 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/FTP.html b/doc/howto/FTP.html
index f32ca20..4798159 100644
--- a/doc/howto/FTP.html
+++ b/doc/howto/FTP.html
@@ -1,5 +1,5 @@
-<!-- $Id: FTP.html,v 1.7 2012/12/27 23:01:25 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/FTP.html,v $ -->
+<!-- $Id: FTP.html,v 1.7 2012-12-27 23:01:25 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/FTP.html,v $ -->
 
 <html>
 <head>
@@ -462,7 +462,7 @@ and will, be made more informative.)
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2012/12/27 23:01:25 $</i><br>
+Last Updated: <i>$Date: 2012-12-27 23:01:25 $</i><br>
 </hr>
 
 </body>
diff --git a/doc/howto/FXP.html b/doc/howto/FXP.html
index 0d60157..c4bb90c 100644
--- a/doc/howto/FXP.html
+++ b/doc/howto/FXP.html
@@ -1,5 +1,5 @@
-<!-- $Id: FXP.html,v 1.2 2004/09/12 23:36:35 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/FXP.html,v $ -->
+<!-- $Id: FXP.html,v 1.2 2004-09-12 23:36:35 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/FXP.html,v $ -->
 
 <html>
 <head>
@@ -126,7 +126,7 @@ ISPs performing filtering on the FTP port.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2004/09/12 23:36:35 $</i><br>
+Last Updated: <i>$Date: 2004-09-12 23:36:35 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Filters.html b/doc/howto/Filters.html
index c13a50b..52a252f 100644
--- a/doc/howto/Filters.html
+++ b/doc/howto/Filters.html
@@ -1,5 +1,5 @@
-<!-- $Id: Filters.html,v 1.13 2013/10/06 06:54:43 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Filters.html,v $ -->
+<!-- $Id: Filters.html,v 1.13 2013-10-06 06:54:43 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Filters.html,v $ -->
 
 <html>
 <head>
@@ -195,7 +195,7 @@ should succeed.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/10/06 06:54:43 $</i><br>
+Last Updated: <i>$Date: 2013-10-06 06:54:43 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Globbing.html b/doc/howto/Globbing.html
index 34331e9..6cfa84d 100644
--- a/doc/howto/Globbing.html
+++ b/doc/howto/Globbing.html
@@ -1,5 +1,5 @@
-<!-- $Id: Globbing.html,v 1.3 2011/11/21 22:24:19 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Globbing.html,v $ -->
+<!-- $Id: Globbing.html,v 1.3 2011-11-21 22:24:19 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Globbing.html,v $ -->
 
 <html>
 <head>
@@ -127,7 +127,7 @@ have the number of matches silently truncated to the limit (or just below).
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2011/11/21 22:24:19 $</i><br>
+Last Updated: <i>$Date: 2011-11-21 22:24:19 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/KeepAlives.html b/doc/howto/KeepAlives.html
index b60d8a7..cc32f60 100644
--- a/doc/howto/KeepAlives.html
+++ b/doc/howto/KeepAlives.html
@@ -1,5 +1,5 @@
-<!-- $Id: KeepAlives.html,v 1.2 2013/03/15 00:05:39 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/KeepAlives.html,v $ -->
+<!-- $Id: KeepAlives.html,v 1.2 2013-03-15 00:05:39 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/KeepAlives.html,v $ -->
 
 <html>
 <head>
@@ -382,7 +382,7 @@ and NATs.)
 
 <p>
 <hr>
-<i>$Date: 2013/03/15 00:05:39 $</i><br>
+<i>$Date: 2013-03-15 00:05:39 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Limit.html b/doc/howto/Limit.html
index 0652f59..3f4bbd9 100644
--- a/doc/howto/Limit.html
+++ b/doc/howto/Limit.html
@@ -1,5 +1,5 @@
-<!-- $Id: Limit.html,v 1.23 2013/05/23 15:43:47 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Limit.html,v $ -->
+<!-- $Id: Limit.html,v 1.23 2013-05-23 15:43:47 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Limit.html,v $ -->
 
 <html>
 <head>
@@ -412,7 +412,7 @@ ensuring that it cannot be deleted?  Simply include the <code>RNFR</code> and
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/05/23 15:43:47 $</i><br>
+Last Updated: <i>$Date: 2013-05-23 15:43:47 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/ListOptions.html b/doc/howto/ListOptions.html
index 9214bf9..25667e7 100644
--- a/doc/howto/ListOptions.html
+++ b/doc/howto/ListOptions.html
@@ -1,5 +1,5 @@
-<!-- $Id: ListOptions.html,v 1.6 2012/02/02 00:40:13 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/ListOptions.html,v $ -->
+<!-- $Id: ListOptions.html,v 1.6 2012-02-02 00:40:13 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/ListOptions.html,v $ -->
 
 <html>
 <head>
@@ -148,7 +148,7 @@ used to block the <code>LIST</code> and <code>NLST</code> commands altogether.
 
 <p>
 <hr>
-<i>$Date: 2012/02/02 00:40:13 $</i><br>
+<i>$Date: 2012-02-02 00:40:13 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/LogLevels.html b/doc/howto/LogLevels.html
index 3790dae..843803b 100644
--- a/doc/howto/LogLevels.html
+++ b/doc/howto/LogLevels.html
@@ -133,7 +133,7 @@ to trace logging.
 
 <p>
 <hr>
-Last Updated:<i>$Date: 2013/10/06 20:22:58 $</i><br>
+Last Updated:<i>$Date: 2013-10-06 20:22:58 $</i><br>
 
 <hr>
 <font size=2><b><i>
diff --git a/doc/howto/LogMessages.html b/doc/howto/LogMessages.html
index e73520f..132779d 100644
--- a/doc/howto/LogMessages.html
+++ b/doc/howto/LogMessages.html
@@ -366,7 +366,7 @@ description of what it means.
 
 <p>
 <hr>
-Last Updated:<i>$Date: 2013/11/10 02:34:15 $</i><br>
+Last Updated:<i>$Date: 2013-11-10 02:34:15 $</i><br>
 
 <hr>
 <font size=2><b><i>
diff --git a/doc/howto/Logging.html b/doc/howto/Logging.html
index fd7757e..738a417 100644
--- a/doc/howto/Logging.html
+++ b/doc/howto/Logging.html
@@ -1,5 +1,5 @@
-<!-- $Id: Logging.html,v 1.13 2013/10/09 16:46:37 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Logging.html,v $ -->
+<!-- $Id: Logging.html,v 1.13 2013-10-09 16:46:37 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Logging.html,v $ -->
 
 <html>
 <head>
@@ -389,7 +389,7 @@ in your <code>proftpd.conf</code>.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/10/09 16:46:37 $</i><br>
+Last Updated: <i>$Date: 2013-10-09 16:46:37 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Memcache.html b/doc/howto/Memcache.html
index 2c64c4a..20a2d9b 100644
--- a/doc/howto/Memcache.html
+++ b/doc/howto/Memcache.html
@@ -1,5 +1,5 @@
-<!-- $Id: Memcache.html,v 1.2 2013/05/09 05:28:28 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Memcache.html,v $ -->
+<!-- $Id: Memcache.html,v 1.2 2013-05-09 05:28:28 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Memcache.html,v $ -->
 
 <html>
 <head>
@@ -206,7 +206,7 @@ some of your modules want to use a feature that was not enabled.
 
 <p>
 <hr>
-<i>$Date: 2013/05/09 05:28:28 $</i><br>
+<i>$Date: 2013-05-09 05:28:28 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/NAT.html b/doc/howto/NAT.html
index 61d3aec..17551f8 100644
--- a/doc/howto/NAT.html
+++ b/doc/howto/NAT.html
@@ -272,7 +272,7 @@ For those that need to see a concrete example configuration of this:
 <p>
 <hr>
 Contributor: Tobias Ekbom <tobias <i>at</i> vallcom <i>dot</i>com><br>
-Last Updated: <i>$Date: 2012/05/22 16:31:39 $</i>
+Last Updated: <i>$Date: 2012-05-22 16:31:39 $</i>
 <hr>
 
 <body>
diff --git a/doc/howto/Nonroot.html b/doc/howto/Nonroot.html
index 11148e5..61d2958 100644
--- a/doc/howto/Nonroot.html
+++ b/doc/howto/Nonroot.html
@@ -1,5 +1,5 @@
-<!-- $Id: Nonroot.html,v 1.1 2009/10/26 15:39:34 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Nonroot.html,v $ -->
+<!-- $Id: Nonroot.html,v 1.1 2009-10-26 15:39:34 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Nonroot.html,v $ -->
 
 <html>
 <head>
diff --git a/doc/howto/Quotas.html b/doc/howto/Quotas.html
index aee2395..0b4c78e 100644
--- a/doc/howto/Quotas.html
+++ b/doc/howto/Quotas.html
@@ -1,5 +1,5 @@
-<!-- $Id: Quotas.html,v 1.8 2009/07/23 15:04:05 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Quotas.html,v $ -->
+<!-- $Id: Quotas.html,v 1.8 2009-07-23 15:04:05 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Quotas.html,v $ -->
 
 <html>
 <head>
@@ -322,7 +322,7 @@ can be found in
 
 <p>
 <hr>
-<i>$Date: 2009/07/23 15:04:05 $</i><br>
+<i>$Date: 2009-07-23 15:04:05 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Radius.html b/doc/howto/Radius.html
index 41a3650..82edb85 100644
--- a/doc/howto/Radius.html
+++ b/doc/howto/Radius.html
@@ -1,5 +1,5 @@
-<!-- $Id: Radius.html,v 1.1 2014/01/27 01:28:21 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Radius.html,v $ -->
+<!-- $Id: Radius.html,v 1.1 2014-01-27 01:28:21 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Radius.html,v $ -->
 
 <html>
 <head>
@@ -408,7 +408,7 @@ using <code>mod_radius</code>.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2014/01/27 01:28:21 $</i><br>
+Last Updated: <i>$Date: 2014-01-27 01:28:21 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Rewrite.html b/doc/howto/Rewrite.html
index 113e4c8..ce168c1 100644
--- a/doc/howto/Rewrite.html
+++ b/doc/howto/Rewrite.html
@@ -1,5 +1,5 @@
-<!-- $Id: Rewrite.html,v 1.9 2013/01/08 00:20:44 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Rewrite.html,v $ -->
+<!-- $Id: Rewrite.html,v 1.9 2013-01-08 00:20:44 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Rewrite.html,v $ -->
 
 <html>
 <head>
diff --git a/doc/howto/SQL.html b/doc/howto/SQL.html
index a450aa6..ec83c52 100644
--- a/doc/howto/SQL.html
+++ b/doc/howto/SQL.html
@@ -1,5 +1,5 @@
-<!-- $Id: SQL.html,v 1.18 2014/01/22 17:14:30 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/SQL.html,v $ -->
+<!-- $Id: SQL.html,v 1.18 2014-01-22 17:14:30 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/SQL.html,v $ -->
 
 <html>
 <head>
@@ -749,7 +749,7 @@ compiled with SSL support.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2014/01/22 17:14:30 $</i><br>
+Last Updated: <i>$Date: 2014-01-22 17:14:30 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/SSH.html b/doc/howto/SSH.html
index 20e1ae7..8e4a7a4 100644
--- a/doc/howto/SSH.html
+++ b/doc/howto/SSH.html
@@ -1,5 +1,5 @@
-<!-- $Id: SSH.html,v 1.1 2004/04/10 02:01:38 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/SSH.html,v $ -->
+<!-- $Id: SSH.html,v 1.1 2004-04-10 02:01:38 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/SSH.html,v $ -->
 
 <html>
 <head>
@@ -112,7 +112,7 @@ email.<br>
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2004/04/10 02:01:38 $</i><br>
+Last Updated: <i>$Date: 2004-04-10 02:01:38 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Scoreboard.html b/doc/howto/Scoreboard.html
index f643c90..5873a5a 100644
--- a/doc/howto/Scoreboard.html
+++ b/doc/howto/Scoreboard.html
@@ -1,5 +1,5 @@
-<!-- $Id: Scoreboard.html,v 1.9 2013/01/04 23:07:38 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Scoreboard.html,v $ -->
+<!-- $Id: Scoreboard.html,v 1.9 2013-01-04 23:07:38 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Scoreboard.html,v $ -->
 
 <html>
 <head>
@@ -215,7 +215,7 @@ daemon will automatically create a new scoreboard in the correct format.
 
 <p>
 <hr>
-<i>$Date: 2013/01/04 23:07:38 $</i><br>
+<i>$Date: 2013-01-04 23:07:38 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Sendfile.html b/doc/howto/Sendfile.html
index bf7110c..86391e2 100644
--- a/doc/howto/Sendfile.html
+++ b/doc/howto/Sendfile.html
@@ -1,5 +1,5 @@
-<!-- $Id: Sendfile.html,v 1.4 2011/02/21 02:57:16 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Sendfile.html,v $ -->
+<!-- $Id: Sendfile.html,v 1.4 2011-02-21 02:57:16 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Sendfile.html,v $ -->
 
 <html>
 <head>
@@ -167,7 +167,7 @@ the size of the file being downloaded:
 
 <p>
 <hr>
-<i>$Date: 2011/02/21 02:57:16 $</i><br>
+<i>$Date: 2011-02-21 02:57:16 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/ServerType.html b/doc/howto/ServerType.html
index 9a4b829..79c6014 100644
--- a/doc/howto/ServerType.html
+++ b/doc/howto/ServerType.html
@@ -1,5 +1,5 @@
-<!-- $Id: ServerType.html,v 1.7 2012/12/02 00:33:19 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/ServerType.html,v $ -->
+<!-- $Id: ServerType.html,v 1.7 2012-12-02 00:33:19 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/ServerType.html,v $ -->
 
 <html>
 <head>
@@ -241,7 +241,7 @@ Another solution is simply to <a href="#Switching">switch</a> your
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2012/12/02 00:33:19 $</i><br>
+Last Updated: <i>$Date: 2012-12-02 00:33:19 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Stopping.html b/doc/howto/Stopping.html
index d672672..7c07289 100644
--- a/doc/howto/Stopping.html
+++ b/doc/howto/Stopping.html
@@ -1,5 +1,5 @@
-<!-- $Id: Stopping.html,v 1.6 2013/07/02 05:46:51 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Stopping.html,v $ -->
+<!-- $Id: Stopping.html,v 1.6 2013-07-02 05:46:51 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Stopping.html,v $ -->
 
 <html>
 <head>
@@ -295,7 +295,7 @@ for more detailed information on its usage.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/07/02 05:46:51 $</i><br>
+Last Updated: <i>$Date: 2013-07-02 05:46:51 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/TLS.html b/doc/howto/TLS.html
index ea26385..660b241 100644
--- a/doc/howto/TLS.html
+++ b/doc/howto/TLS.html
@@ -1,5 +1,5 @@
-<!-- $Id: TLS.html,v 1.39 2014/03/26 18:22:32 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/TLS.html,v $ -->
+<!-- $Id: TLS.html,v 1.39 2014-03-26 18:22:32 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/TLS.html,v $ -->
 
 <html>
 <head>
@@ -1191,7 +1191,7 @@ configured files were not properly matched up.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2014/03/26 18:22:32 $</i><br>
+Last Updated: <i>$Date: 2014-03-26 18:22:32 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Testing.html b/doc/howto/Testing.html
index 2989c23..b293194 100644
--- a/doc/howto/Testing.html
+++ b/doc/howto/Testing.html
@@ -1,5 +1,5 @@
-<!-- $Id: Testing.html,v 1.6 2011/05/19 18:26:42 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Testing.html,v $ -->
+<!-- $Id: Testing.html,v 1.6 2011-05-19 18:26:42 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Testing.html,v $ -->
 
 <html>
 <head>
@@ -215,7 +215,7 @@ to run your changes.
 
 <p>
 <hr>
-Last updated: <i>$Date: 2011/05/19 18:26:42 $</i><br>
+Last updated: <i>$Date: 2011-05-19 18:26:42 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Timestamps.html b/doc/howto/Timestamps.html
index e1f3877..aaa19c7 100644
--- a/doc/howto/Timestamps.html
+++ b/doc/howto/Timestamps.html
@@ -1,5 +1,5 @@
-<!-- $Id: Timestamps.html,v 1.7 2012/06/06 17:56:51 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Timestamps.html,v $ -->
+<!-- $Id: Timestamps.html,v 1.7 2012-06-06 17:56:51 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Timestamps.html,v $ -->
 
 <html>
 <head>
@@ -154,7 +154,7 @@ log files.
 
 <p>
 <hr>
-<i>$Date: 2012/06/06 17:56:51 $</i><br>
+<i>$Date: 2012-06-06 17:56:51 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Tracing.html b/doc/howto/Tracing.html
index 5c149fa..8c67450 100644
--- a/doc/howto/Tracing.html
+++ b/doc/howto/Tracing.html
@@ -1,5 +1,5 @@
-<!-- $Id: Tracing.html,v 1.15 2012/09/27 17:52:36 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Tracing.html,v $ -->
+<!-- $Id: Tracing.html,v 1.15 2012-09-27 17:52:36 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Tracing.html,v $ -->
 
 <html>
 <head>
@@ -250,7 +250,7 @@ sections as well.
 
 <p>
 <hr>
-<i>$Date: 2012/09/27 17:52:36 $</i><br>
+<i>$Date: 2012-09-27 17:52:36 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Translations.html b/doc/howto/Translations.html
index dfda2eb..26212da 100644
--- a/doc/howto/Translations.html
+++ b/doc/howto/Translations.html
@@ -1,5 +1,5 @@
-<!-- $Id: Translations.html,v 1.1 2008/10/08 16:55:34 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Translations.html,v $ -->
+<!-- $Id: Translations.html,v 1.1 2008-10-08 16:55:34 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Translations.html,v $ -->
 
 <html>
 <head>
@@ -95,7 +95,7 @@ and attach the diff, or send the diff to the ProFTPD developers mailing list.
 
 <p>
 <hr>
-<i>$Date: 2008/10/08 16:55:34 $</i><br>
+<i>$Date: 2008-10-08 16:55:34 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Umask.html b/doc/howto/Umask.html
index ddbe768..d602e48 100644
--- a/doc/howto/Umask.html
+++ b/doc/howto/Umask.html
@@ -1,5 +1,5 @@
-<!-- $Id: Umask.html,v 1.5 2012/03/24 18:41:57 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Umask.html,v $ -->
+<!-- $Id: Umask.html,v 1.5 2012-03-24 18:41:57 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Umask.html,v $ -->
 
 <html>
 <head>
@@ -231,7 +231,7 @@ rename files of other users in that directory.  Because of this property,
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2012/03/24 18:41:57 $</i><br>
+Last Updated: <i>$Date: 2012-03-24 18:41:57 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/Upgrade.html b/doc/howto/Upgrade.html
index 082f562..a5b308a 100644
--- a/doc/howto/Upgrade.html
+++ b/doc/howto/Upgrade.html
@@ -1,5 +1,5 @@
-<!-- $Id: Upgrade.html,v 1.2 2010/01/21 17:37:16 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Upgrade.html,v $ -->
+<!-- $Id: Upgrade.html,v 1.2 2010-01-21 17:37:16 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Upgrade.html,v $ -->
 
 <html>
 <head>
@@ -63,7 +63,7 @@ will be running.
 
 <p>
 <hr>
-<i>$Date: 2010/01/21 17:37:16 $</i><br>
+<i>$Date: 2010-01-21 17:37:16 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Versioning.html b/doc/howto/Versioning.html
index df3700b..e1c784b 100644
--- a/doc/howto/Versioning.html
+++ b/doc/howto/Versioning.html
@@ -1,5 +1,5 @@
-<!-- $Id: Versioning.html,v 1.2 2010/02/25 00:51:40 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Versioning.html,v $ -->
+<!-- $Id: Versioning.html,v 1.2 2010-02-25 00:51:40 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Versioning.html,v $ -->
 
 <html>
 <head>
@@ -132,7 +132,7 @@ newer, supported versions of ProFTPD instead of in the unsupported branches.
 
 <p>
 <hr>
-<i>$Date: 2010/02/25 00:51:40 $</i><br>
+<i>$Date: 2010-02-25 00:51:40 $</i><br>
 
 </body>
 </html>
diff --git a/doc/howto/Vhost.html b/doc/howto/Vhost.html
index 6c91402..b2af36a 100644
--- a/doc/howto/Vhost.html
+++ b/doc/howto/Vhost.html
@@ -1,5 +1,5 @@
-<!-- $Id: Vhost.html,v 1.7 2009/01/12 23:41:26 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/Vhost.html,v $ -->
+<!-- $Id: Vhost.html,v 1.7 2009-01-12 23:41:26 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/Vhost.html,v $ -->
 
 <html>
 <head>
@@ -233,7 +233,7 @@ addresses/DNS names:
 </pre>
 
 <hr>
-Last Updated: <i>$Date: 2009/01/12 23:41:26 $</i><br>
+Last Updated: <i>$Date: 2009-01-12 23:41:26 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/VirtualUsers.html b/doc/howto/VirtualUsers.html
index 89cfe01..e505b10 100644
--- a/doc/howto/VirtualUsers.html
+++ b/doc/howto/VirtualUsers.html
@@ -1,5 +1,5 @@
-<!-- $Id: VirtualUsers.html,v 1.1 2005/07/05 16:11:15 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/VirtualUsers.html,v $ -->
+<!-- $Id: VirtualUsers.html,v 1.1 2005-07-05 16:11:15 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/VirtualUsers.html,v $ -->
 
 <html>
 <head>
@@ -180,7 +180,7 @@ flexible, and more in line with ProFTPD's design philosophy.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2005/07/05 16:11:15 $</i><br>
+Last Updated: <i>$Date: 2005-07-05 16:11:15 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/howto/index.html b/doc/howto/index.html
index a740458..cbfacef 100644
--- a/doc/howto/index.html
+++ b/doc/howto/index.html
@@ -1,5 +1,5 @@
-<!-- $Id: index.html,v 1.33 2014/01/27 01:28:21 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/howto/index.html,v $ -->
+<!-- $Id: index.html,v 1.33 2014-01-27 01:28:21 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/howto/index.html,v $ -->
 
 <html>
 <head>
@@ -321,7 +321,7 @@ all of the directives to see everything that ProFTPD is capable of supporting.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2014/01/27 01:28:21 $</i><br>
+Last Updated: <i>$Date: 2014-01-27 01:28:21 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/mod_sample.c b/doc/mod_sample.c
index 93f6568..8c3af5e 100644
--- a/doc/mod_sample.c
+++ b/doc/mod_sample.c
@@ -31,7 +31,7 @@
  */
 
 /* sample module for ProFTPD
- * $Id: mod_sample.c,v 1.11 2011/05/23 21:08:34 castaglia Exp $
+ * $Id: mod_sample.c,v 1.11 2011-05-23 21:08:34 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/doc/modules/index.html b/doc/modules/index.html
index ed24911..3472806 100644
--- a/doc/modules/index.html
+++ b/doc/modules/index.html
@@ -1,5 +1,5 @@
-<!-- $Id: index.html,v 1.5 2013/02/21 19:56:02 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/index.html,v $ -->
+<!-- $Id: index.html,v 1.5 2013-02-21 19:56:02 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/index.html,v $ -->
 
 <html>
 <head>
@@ -143,7 +143,7 @@ all of the directives to see everything that ProFTPD is capable of supporting.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2013/02/21 19:56:02 $</i><br>
+Last Updated: <i>$Date: 2013-02-21 19:56:02 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/modules/mod_auth.html b/doc/modules/mod_auth.html
index fceada9..dac74d3 100644
--- a/doc/modules/mod_auth.html
+++ b/doc/modules/mod_auth.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_auth.html,v 1.11 2013/08/19 16:28:23 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_auth.html,v $ -->
+<!-- $Id: mod_auth.html,v 1.11 2013-08-19 16:28:23 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_auth.html,v $ -->
 
 <html>
 <head>
@@ -398,7 +398,7 @@ The <code>mod_auth</code> module is compiled by default.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/08/19 16:28:23 $</i><br>
+Last Updated: <i>$Date: 2013-08-19 16:28:23 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_auth_file.html b/doc/modules/mod_auth_file.html
index 9d04d2d..90ec0d7 100644
--- a/doc/modules/mod_auth_file.html
+++ b/doc/modules/mod_auth_file.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_auth_file.html,v 1.6 2014/01/22 04:18:09 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_auth_file.html,v $ -->
+<!-- $Id: mod_auth_file.html,v 1.6 2014-01-22 04:18:09 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_auth_file.html,v $ -->
 
 <html>
 <head>
@@ -198,7 +198,7 @@ unsafe configuration against which <code>mod_auth_file</code> now guards.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/22 04:18:09 $</i><br>
+Last Updated: <i>$Date: 2014-01-22 04:18:09 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_auth_pam.html b/doc/modules/mod_auth_pam.html
index a5e7694..18e0dab 100644
--- a/doc/modules/mod_auth_pam.html
+++ b/doc/modules/mod_auth_pam.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_auth_pam.html,v 1.3 2011/03/10 07:28:33 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_auth_pam.html,v $ -->
+<!-- $Id: mod_auth_pam.html,v 1.3 2011-03-10 07:28:33 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_auth_pam.html,v $ -->
 
 <html>
 <head>
@@ -150,7 +150,7 @@ is what tells <code>proftpd</code> to treat that module's results as
 authoritative.
 
 <hr>
-Last Updated: <i>$Date: 2011/03/10 07:28:33 $</i><br>
+Last Updated: <i>$Date: 2011-03-10 07:28:33 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/modules/mod_auth_unix.html b/doc/modules/mod_auth_unix.html
index e5a3133..07dc2e5 100644
--- a/doc/modules/mod_auth_unix.html
+++ b/doc/modules/mod_auth_unix.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_auth_unix.html,v 1.7 2013/09/29 23:28:02 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_auth_unix.html,v $ -->
+<!-- $Id: mod_auth_unix.html,v 1.7 2013-09-29 23:28:02 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_auth_unix.html,v $ -->
 
 <html>
 <head>
@@ -198,7 +198,7 @@ does not see/know that the file has changed.  That is why it can look like
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/09/29 23:28:02 $</i><br>
+Last Updated: <i>$Date: 2013-09-29 23:28:02 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_cap.html b/doc/modules/mod_cap.html
index d679de4..178845f 100644
--- a/doc/modules/mod_cap.html
+++ b/doc/modules/mod_cap.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_cap.html,v 1.9 2013/07/19 17:17:00 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_cap.html,v $ -->
+<!-- $Id: mod_cap.html,v 1.9 2013-07-19 17:17:00 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_cap.html,v $ -->
 
 <html>
 <head>
@@ -218,7 +218,7 @@ you will need to use a configuration such as:
 <p>
 <hr><br>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/07/19 17:17:00 $</i><br>
+Last Updated: <i>$Date: 2013-07-19 17:17:00 $</i><br>
 <br><hr>
 
 <font size=2><b><i>
diff --git a/doc/modules/mod_core.html b/doc/modules/mod_core.html
index 01f0c11..2e2ded9 100644
--- a/doc/modules/mod_core.html
+++ b/doc/modules/mod_core.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_core.html,v 1.43 2014/01/30 16:50:10 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_core.html,v $ -->
+<!-- $Id: mod_core.html,v 1.43 2014-01-30 16:50:10 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_core.html,v $ -->
 
 <html>
 <head>
@@ -1692,7 +1692,7 @@ addresses.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/30 16:50:10 $</i><br>
+Last Updated: <i>$Date: 2014-01-30 16:50:10 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_ctrls.html b/doc/modules/mod_ctrls.html
index faef628..6f6ea28 100644
--- a/doc/modules/mod_ctrls.html
+++ b/doc/modules/mod_ctrls.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ctrls.html,v 1.6 2013/05/17 15:04:43 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_ctrls.html,v $ -->
+<!-- $Id: mod_ctrls.html,v 1.6 2013-05-17 15:04:43 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_ctrls.html,v $ -->
 
 <html>
 <head>
@@ -313,7 +313,7 @@ This option causes <code>mod_ctrls</code> to be compiled into
 <p>
 <hr>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/05/17 15:04:43 $</i><br>
+Last Updated: <i>$Date: 2013-05-17 15:04:43 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_delay.html b/doc/modules/mod_delay.html
index 2fa51ef..6a32a5e 100644
--- a/doc/modules/mod_delay.html
+++ b/doc/modules/mod_delay.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_delay.html,v 1.7 2009/03/04 00:57:52 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_delay.html,v $ -->
+<!-- $Id: mod_delay.html,v 1.7 2009-03-04 00:57:52 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_delay.html,v $ -->
 
 <html>
 <head>
@@ -250,7 +250,7 @@ The <code>mod_delay</code> module is compiled by default.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2009/03/04 00:57:52 $</i><br>
+Last Updated: <i>$Date: 2009-03-04 00:57:52 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_dso.html b/doc/modules/mod_dso.html
index 0145e76..e148535 100644
--- a/doc/modules/mod_dso.html
+++ b/doc/modules/mod_dso.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_dso.html,v 1.7 2013/05/09 03:58:40 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_dso.html,v $ -->
+<!-- $Id: mod_dso.html,v 1.7 2013-05-09 03:58:40 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_dso.html,v $ -->
 
 <html>
 <head>
@@ -445,7 +445,7 @@ code would not be loaded, and thus would not override the static module.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/05/09 03:58:40 $</i><br>
+Last Updated: <i>$Date: 2013-05-09 03:58:40 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_facl.html b/doc/modules/mod_facl.html
index ce87040..0f130ca 100644
--- a/doc/modules/mod_facl.html
+++ b/doc/modules/mod_facl.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_facl.html,v 1.1 2006/10/11 16:47:15 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_facl.html,v $ -->
+<!-- $Id: mod_facl.html,v 1.1 2006-10-11 16:47:15 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_facl.html,v $ -->
 
 <html>
 <head>
@@ -66,7 +66,7 @@ using the following:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2006/10/11 16:47:15 $</i><br>
+Last Updated: <i>$Date: 2006-10-11 16:47:15 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_facts.html b/doc/modules/mod_facts.html
index 979cf1b..eec45d0 100644
--- a/doc/modules/mod_facts.html
+++ b/doc/modules/mod_facts.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_facts.html,v 1.13 2013/07/29 16:54:45 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_facts.html,v $ -->
+<!-- $Id: mod_facts.html,v 1.13 2013-07-29 16:54:45 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_facts.html,v $ -->
 
 <html>
 <head>
@@ -226,7 +226,7 @@ and <code>MLSD</code> equally.
 <p>
 <hr><br>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/07/29 16:54:45 $</i><br>
+Last Updated: <i>$Date: 2013-07-29 16:54:45 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_ident.html b/doc/modules/mod_ident.html
index 56147d6..599201a 100644
--- a/doc/modules/mod_ident.html
+++ b/doc/modules/mod_ident.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ident.html,v 1.1 2008/01/05 01:22:20 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_ident.html,v $ -->
+<!-- $Id: mod_ident.html,v 1.1 2008-01-05 01:22:20 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_ident.html,v $ -->
 
 <html>
 <head>
@@ -71,7 +71,7 @@ module, rather than be statically linked into <code>proftpd</code>:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2008/01/05 01:22:20 $</i><br>
+Last Updated: <i>$Date: 2008-01-05 01:22:20 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_lang.html b/doc/modules/mod_lang.html
index 9e8d2a6..b07ba1c 100644
--- a/doc/modules/mod_lang.html
+++ b/doc/modules/mod_lang.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_lang.html,v 1.12 2012/10/10 01:26:33 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_lang.html,v $ -->
+<!-- $Id: mod_lang.html,v 1.12 2012-10-10 01:26:33 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_lang.html,v $ -->
 
 <html>
 <head>
@@ -303,7 +303,7 @@ Both of these conditions <b>must</b> be true, otherwise you will see the
 <p>
 <hr><br>
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2012/10/10 01:26:33 $</i><br>
+Last Updated: <i>$Date: 2012-10-10 01:26:33 $</i><br>
 <br><hr>
 
 <font size=2><b><i>
diff --git a/doc/modules/mod_log.html b/doc/modules/mod_log.html
index 22a46be..b11def7 100644
--- a/doc/modules/mod_log.html
+++ b/doc/modules/mod_log.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_log.html,v 1.17 2014/01/02 16:43:54 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_log.html,v $ -->
+<!-- $Id: mod_log.html,v 1.17 2014-01-02 16:43:54 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_log.html,v $ -->
 
 <html>
 <head>
@@ -496,7 +496,7 @@ The <code>mod_log</code> module is compiled by default.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/02 16:43:54 $</i><br>
+Last Updated: <i>$Date: 2014-01-02 16:43:54 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_ls.html b/doc/modules/mod_ls.html
index 5a3c265..2c331e8 100644
--- a/doc/modules/mod_ls.html
+++ b/doc/modules/mod_ls.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_ls.html,v 1.2 2012/02/06 17:54:59 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_ls.html,v $ -->
+<!-- $Id: mod_ls.html,v 1.2 2012-02-06 17:54:59 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_ls.html,v $ -->
 
 <html>
 <head>
@@ -140,7 +140,7 @@ The <code>mod_ls</code>module is <b>always</b> installed.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2012/02/06 17:54:59 $</i><br>
+Last Updated: <i>$Date: 2012-02-06 17:54:59 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_memcache.html b/doc/modules/mod_memcache.html
index d5a41e5..9222716 100644
--- a/doc/modules/mod_memcache.html
+++ b/doc/modules/mod_memcache.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_memcache.html,v 1.7 2013/05/07 05:11:40 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_memcache.html,v $ -->
+<!-- $Id: mod_memcache.html,v 1.7 2013-05-07 05:11:40 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_memcache.html,v $ -->
 
 <html>
 <head>
@@ -153,7 +153,7 @@ You may also need to tell <code>configure</code> how to find the
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/05/07 05:11:40 $</i><br>
+Last Updated: <i>$Date: 2013-05-07 05:11:40 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_rlimit.html b/doc/modules/mod_rlimit.html
index 8ae12af..87191f3 100644
--- a/doc/modules/mod_rlimit.html
+++ b/doc/modules/mod_rlimit.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_rlimit.html,v 1.4 2014/01/31 17:08:10 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_rlimit.html,v $ -->
+<!-- $Id: mod_rlimit.html,v 1.4 2014-01-31 17:08:10 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_rlimit.html,v $ -->
 
 <html>
 <head>
@@ -212,7 +212,7 @@ default.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2014/01/31 17:08:10 $</i><br>
+Last Updated: <i>$Date: 2014-01-31 17:08:10 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_site.html b/doc/modules/mod_site.html
index df9675a..6c2a560 100644
--- a/doc/modules/mod_site.html
+++ b/doc/modules/mod_site.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_site.html,v 1.1 2011/02/20 20:06:10 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_site.html,v $ -->
+<!-- $Id: mod_site.html,v 1.1 2011-02-20 20:06:10 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_site.html,v $ -->
 
 <html>
 <head>
@@ -44,7 +44,7 @@ Example configurations:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2011/02/20 20:06:10 $</i><br>
+Last Updated: <i>$Date: 2011-02-20 20:06:10 $</i><br>
 
 <br><hr>
 
diff --git a/doc/modules/mod_xfer.html b/doc/modules/mod_xfer.html
index 6302af7..19179fa 100644
--- a/doc/modules/mod_xfer.html
+++ b/doc/modules/mod_xfer.html
@@ -1,5 +1,5 @@
-<!-- $Id: mod_xfer.html,v 1.10 2013/03/13 18:08:28 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/modules/mod_xfer.html,v $ -->
+<!-- $Id: mod_xfer.html,v 1.10 2013-03-13 18:08:28 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/modules/mod_xfer.html,v $ -->
 
 <html>
 <head>
@@ -435,7 +435,7 @@ The <code>mod_xfer</code>module is <b>always</b> installed.
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2013/03/13 18:08:28 $</i><br>
+Last Updated: <i>$Date: 2013-03-13 18:08:28 $</i><br>
 
 <br><hr>
 
diff --git a/doc/utils/ftpasswd.html b/doc/utils/ftpasswd.html
index 50c8beb..b93b256 100644
--- a/doc/utils/ftpasswd.html
+++ b/doc/utils/ftpasswd.html
@@ -1,5 +1,5 @@
-<!-- $Id: ftpasswd.html,v 1.2 2011/03/03 22:17:29 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/utils/ftpasswd.html,v $ -->
+<!-- $Id: ftpasswd.html,v 1.2 2011-03-03 22:17:29 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/utils/ftpasswd.html,v $ -->
 
 <html>
 <head>
@@ -318,7 +318,7 @@ usage: ftpasswd [--help] [--hash|--group|--passwd]
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2011/03/03 22:17:29 $</i><br>
+Last Updated: <i>$Date: 2011-03-03 22:17:29 $</i><br>
 
 <br><hr>
 
diff --git a/doc/utils/ftpmail.html b/doc/utils/ftpmail.html
index ca9e61c..7ac05d2 100644
--- a/doc/utils/ftpmail.html
+++ b/doc/utils/ftpmail.html
@@ -1,5 +1,5 @@
-<!-- $Id: ftpmail.html,v 1.2 2012/12/04 19:59:36 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/utils/ftpmail.html,v $ -->
+<!-- $Id: ftpmail.html,v 1.2 2012-12-04 19:59:36 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/utils/ftpmail.html,v $ -->
 
 <html>
 <head>
@@ -197,7 +197,7 @@ Then start instances of <code>ftpmail</code> running, but only for the
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2012/12/04 19:59:36 $</i><br>
+Last Updated: <i>$Date: 2012-12-04 19:59:36 $</i><br>
 
 <br><hr>
 
diff --git a/doc/utils/ftpquota.html b/doc/utils/ftpquota.html
index 1fc8fbf..b3233ae 100644
--- a/doc/utils/ftpquota.html
+++ b/doc/utils/ftpquota.html
@@ -1,5 +1,5 @@
-<!-- $Id: ftpquota.html,v 1.2 2011/03/03 22:17:29 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/utils/ftpquota.html,v $ -->
+<!-- $Id: ftpquota.html,v 1.2 2011-03-03 22:17:29 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/utils/ftpquota.html,v $ -->
 
 <html>
 <head>
@@ -270,7 +270,7 @@ usage: ftpquota [options]
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2011/03/03 22:17:29 $</i><br>
+Last Updated: <i>$Date: 2011-03-03 22:17:29 $</i><br>
 
 <br><hr>
 
diff --git a/doc/utils/index.html b/doc/utils/index.html
index 01f53f8..518ea7d 100644
--- a/doc/utils/index.html
+++ b/doc/utils/index.html
@@ -1,5 +1,5 @@
-<!-- $Id: index.html,v 1.7 2012/12/11 19:41:51 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/utils/index.html,v $ -->
+<!-- $Id: index.html,v 1.7 2012-12-11 19:41:51 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/utils/index.html,v $ -->
 
 <html>
 <head>
@@ -93,7 +93,7 @@ all of the directives to see everything that ProFTPD is capable of supporting.
 
 <p>
 <hr>
-Last Updated: <i>$Date: 2012/12/11 19:41:51 $</i><br>
+Last Updated: <i>$Date: 2012-12-11 19:41:51 $</i><br>
 <hr>
 
 </body>
diff --git a/doc/utils/prxs.html b/doc/utils/prxs.html
index 46c31dd..24458bc 100644
--- a/doc/utils/prxs.html
+++ b/doc/utils/prxs.html
@@ -1,5 +1,5 @@
-<!-- $Id: prxs.html,v 1.1 2012/02/20 18:56:08 castaglia Exp $ -->
-<!-- $Source: /cvsroot/proftp/proftpd/doc/utils/prxs.html,v $ -->
+<!-- $Id: prxs.html,v 1.1 2012-02-20 18:56:08 castaglia Exp $ -->
+<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/utils/prxs.html,v $ -->
 
 <html>
 <head>
@@ -109,7 +109,7 @@ To use prxs all in one step, you could do:
 <hr><br>
 
 Author: <i>$Author: castaglia $</i><br>
-Last Updated: <i>$Date: 2012/02/20 18:56:08 $</i><br>
+Last Updated: <i>$Date: 2012-02-20 18:56:08 $</i><br>
 
 <br><hr>
 
diff --git a/include/ascii.h b/include/ascii.h
index 69ceb38..4fa3673 100644
--- a/include/ascii.h
+++ b/include/ascii.h
@@ -23,7 +23,7 @@
  */
 
 /* ASCII character checks
- * $Id: ascii.h,v 1.1 2013/02/15 22:33:23 castaglia Exp $
+ * $Id: ascii.h,v 1.1 2013-02-15 22:33:23 castaglia Exp $
  */
 
 #ifndef PR_ASCII_H
diff --git a/include/auth.h b/include/auth.h
index e616964..8e68332 100644
--- a/include/auth.h
+++ b/include/auth.h
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD Auth API
- * $Id: auth.h,v 1.14 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: auth.h,v 1.14 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_AUTH_H
diff --git a/include/bindings.h b/include/bindings.h
index 19856e8..cf63365 100644
--- a/include/bindings.h
+++ b/include/bindings.h
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD bindings support routines.
- * $Id: bindings.h,v 1.14 2012/04/15 18:04:14 castaglia Exp $
+ * $Id: bindings.h,v 1.14 2012-04-15 18:04:14 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/include/child.h b/include/child.h
index 92a8203..91e257a 100644
--- a/include/child.h
+++ b/include/child.h
@@ -23,7 +23,7 @@
  */
 
 /* Management of child objects
- * $Id: child.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: child.h,v 1.3 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_CHILD_H
diff --git a/include/class.h b/include/class.h
index 3bb0340..8e9ff82 100644
--- a/include/class.h
+++ b/include/class.h
@@ -23,7 +23,7 @@
  */
 
 /* Class definitions
- * $Id: class.h,v 1.4 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: class.h,v 1.4 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_CLASS_H
diff --git a/include/cmd.h b/include/cmd.h
index a95cac3..7b490a8 100644
--- a/include/cmd.h
+++ b/include/cmd.h
@@ -21,7 +21,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: cmd.h,v 1.7 2012/12/27 22:30:58 castaglia Exp $
+ * $Id: cmd.h,v 1.7 2012-12-27 22:30:58 castaglia Exp $
  */
 
 #ifndef PR_CMD_H
@@ -106,6 +106,16 @@ int pr_cmd_get_id(const char *name_name);
 #define PR_CMD_MIN_NAMELEN	3
 #define PR_CMD_MAX_NAMELEN	4
 
+/* Returns TRUE if the given command is a known HTTP method, FALSE if not
+ * a known HTTP method, and -1 if there is an error.
+ */
+int pr_cmd_is_http(cmd_rec *c);
+
+/* Returns TRUE if the given command is a known SMTP method, FALSE if not
+ * a known SMTP method, and -1 if there is an error.
+ */
+int pr_cmd_is_smtp(cmd_rec *c);
+
 int pr_cmd_set_name(cmd_rec *, const char *);
 
 /* Implemented in main.c */
diff --git a/include/compat.h b/include/compat.h
index f398a71..9091333 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -23,7 +23,7 @@
  */
 
 /* Compatibility
- * $Id: compat.h,v 1.17 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: compat.h,v 1.17 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_COMPAT_H
diff --git a/include/conf.h b/include/conf.h
index 0c5ceec..5d1cda1 100644
--- a/include/conf.h
+++ b/include/conf.h
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2014 The ProFTPD Project team
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* Generic configuration and standard header file includes.
- * $Id: conf.h,v 1.92 2013/09/19 05:54:32 castaglia Exp $
+ * $Id: conf.h,v 1.92 2013-09-19 05:54:32 castaglia Exp $
  */
 
 #ifndef PR_CONF_H
@@ -274,10 +274,10 @@ char *strchr(),*strrchr();
 #include "options.h"
 
 /* Solaris 2.5 seems to already have a typedef for 'timer_t', so
- * #define timer_t to something else as a workaround.
+ * #define timer_t to something else as a workaround.  However, on AIX,
+ * we do NOT want to do this.
  */
-
-#ifdef HAVE_TIMER_T
+#if defined(HAVE_TIMER_T) && !defined(AIX7)
 # define timer_t p_timer_t
 #endif
 
diff --git a/include/ctrls.h b/include/ctrls.h
index b5a67e9..1bbf4af 100644
--- a/include/ctrls.h
+++ b/include/ctrls.h
@@ -23,7 +23,7 @@
  */
 
 /* Controls API definitions
- * $Id: ctrls.h,v 1.9 2013/02/04 06:46:22 castaglia Exp $
+ * $Id: ctrls.h,v 1.9 2013-02-04 06:46:22 castaglia Exp $
  */
 
 #ifndef PR_CTRLS_H
diff --git a/include/data.h b/include/data.h
index af05ac3..4eaf5d9 100644
--- a/include/data.h
+++ b/include/data.h
@@ -25,7 +25,7 @@
  */
 
 /* Data connection management prototypes
- * $Id: data.h,v 1.23 2013/01/30 22:37:04 castaglia Exp $
+ * $Id: data.h,v 1.23 2013-01-30 22:37:04 castaglia Exp $
  */
 
 #ifndef PR_DATACONN_H
diff --git a/include/default_paths.h b/include/default_paths.h
index b8aa08d..1d6a28d 100644
--- a/include/default_paths.h
+++ b/include/default_paths.h
@@ -26,7 +26,7 @@
 /* ProFTPD default path configuration.  Normally, Makefiles generated
  * by the top-level configuration script define the PR_RUN_DIR and
  * PR_CONFIG_FILE_PATH macros, so the two below are typically not used.
- * $Id: default_paths.h,v 1.12 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: default_paths.h,v 1.12 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PROFTPD_PATHS_H
diff --git a/include/dirtree.h b/include/dirtree.h
index 0f41986..0b0115c 100644
--- a/include/dirtree.h
+++ b/include/dirtree.h
@@ -25,7 +25,7 @@
  */
 
 /* Configuration structure, server, command and associated prototypes.
- * $Id: dirtree.h,v 1.88 2013/07/16 19:06:13 castaglia Exp $
+ * $Id: dirtree.h,v 1.88 2013-07-16 19:06:13 castaglia Exp $
  */
 
 #ifndef PR_DIRTREE_H
@@ -126,6 +126,14 @@ typedef struct cmd_struc {
   pr_table_t *notes;		/* Private data for passing/retaining between handlers */
 
   int cmd_id;			/* Index into commands list, for faster comparisons */
+
+  /* If we detect that the client sent commands for a protocol OTHER than
+   * FTP, then this field will be FALSE; the protocol field will identify
+   * the detected protocol.
+   */
+  int is_ftp;
+  const char *protocol;
+
 } cmd_rec;
 
 struct config_struc {
diff --git a/include/display.h b/include/display.h
index 2669020..0fcf2f3 100644
--- a/include/display.h
+++ b/include/display.h
@@ -23,7 +23,7 @@
  */
 
 /* Display of files
- * $Id: display.h,v 1.7 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: display.h,v 1.7 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_DISPLAY_H
diff --git a/include/encode.h b/include/encode.h
index 4489bd4..aedfc06 100644
--- a/include/encode.h
+++ b/include/encode.h
@@ -23,7 +23,7 @@
  */
 
 /* UTF8/charset encoding/decoding
- * $Id: encode.h,v 1.4 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: encode.h,v 1.4 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_ENCODE_H
diff --git a/include/env.h b/include/env.h
index b678b1d..27f9fb7 100644
--- a/include/env.h
+++ b/include/env.h
@@ -23,7 +23,7 @@
  */
 
 /* Environment handling
- * $Id: env.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: env.h,v 1.3 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_ENV_H
diff --git a/include/event.h b/include/event.h
index 8e9a828..35c5fd8 100644
--- a/include/event.h
+++ b/include/event.h
@@ -23,7 +23,7 @@
  */
 
 /* Event management
- * $Id: event.h,v 1.6 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: event.h,v 1.6 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_EVENT_H
diff --git a/include/expr.h b/include/expr.h
index b0b55fd..fbdb3b5 100644
--- a/include/expr.h
+++ b/include/expr.h
@@ -23,7 +23,7 @@
  */
 
 /* Expression API definition
- * $Id: expr.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: expr.h,v 1.3 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_EXPR_H
diff --git a/include/feat.h b/include/feat.h
index 439995a..bc289f3 100644
--- a/include/feat.h
+++ b/include/feat.h
@@ -23,7 +23,7 @@
  */
 
 /* Feature list management
- * $Id: feat.h,v 1.5 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: feat.h,v 1.5 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_FEAT_H
diff --git a/include/filter.h b/include/filter.h
index 2c4f08a..097245e 100644
--- a/include/filter.h
+++ b/include/filter.h
@@ -21,7 +21,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: filter.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: filter.h,v 1.3 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_FILTER_H
diff --git a/include/fsio.h b/include/fsio.h
index 3f5b7b9..42adc15 100644
--- a/include/fsio.h
+++ b/include/fsio.h
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2014 The ProFTPD Project
+ * Copyright (c) 2001-2015 The ProFTPD Project
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* ProFTPD virtual/modular filesystem support.
- * $Id: fsio.h,v 1.37 2014/01/31 16:52:33 castaglia Exp $
+ * $Id: fsio.h,v 1.37 2014-01-31 16:52:33 castaglia Exp $
  */
 
 #ifndef PR_FSIO_H
@@ -315,7 +315,7 @@ int pr_unregister_fs_match(const char *);
 
 void pr_fs_clear_cache(void);
 int pr_fs_copy_file(const char *, const char *);
-void pr_fs_setcwd(const char *);
+int pr_fs_setcwd(const char *);
 const char *pr_fs_getcwd(void);
 const char *pr_fs_getvwd(void);
 int pr_fs_dircat(char *, int, const char *, const char *);
diff --git a/include/ftp.h b/include/ftp.h
index 2ffcbe0..5171a46 100644
--- a/include/ftp.h
+++ b/include/ftp.h
@@ -25,7 +25,7 @@
  */
 
 /* FTP commands and responses (may not all be implemented)
- * $Id: ftp.h,v 1.14 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: ftp.h,v 1.14 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_FTP_H
diff --git a/include/help.h b/include/help.h
index c008f11..bd700d4 100644
--- a/include/help.h
+++ b/include/help.h
@@ -23,7 +23,7 @@
  */
 
 /* HELP management
- * $Id: help.h,v 1.2 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: help.h,v 1.2 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_HELP_H
diff --git a/include/xferlog.h b/include/ident.h
similarity index 68%
copy from include/xferlog.h
copy to include/ident.h
index a71dc12..d54afd3 100644
--- a/include/xferlog.h
+++ b/include/ident.h
@@ -1,6 +1,8 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2003-2011 The ProFTPD Project team
+ * Copyright (c) 1997, 1998 Public Flood Software
+ * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
+ * Copyright (c) 2001, 2002, 2003 The ProFTPD Project team
  *
  * 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
@@ -14,24 +16,19 @@
  *
  * 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, Suite 500, Boston, MA 02110-1335, USA.
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
  *
  * As a special exemption, Public Flood Software/MacGyver aka Habeeb J. Dihu
  * and other respective copyright holders give permission to link this program
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
+ *
+ * $Id: ident.h,v 1.9 2003-02-12 08:49:14 castaglia Exp $
  */
 
-/* TransferLog routines
- * $Id: xferlog.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
- */
-
-#ifndef PR_XFERLOG_H
-#define PR_XFERLOG_H
+#ifndef PR_IDENT_H
+#define PR_IDENT_H
 
-int xferlog_open(const char *);
-void xferlog_close(void);
-int xferlog_write(long, const char *, off_t, char *, char, char, char, char *,
-  char, const char *);
+char *pr_ident_lookup(pool *, conn_t *);
 
-#endif /* PR_XFERLOG_H */
+#endif /* PR_IDENT_H */
diff --git a/include/inet.h b/include/inet.h
index babbca8..72405c8 100644
--- a/include/inet.h
+++ b/include/inet.h
@@ -25,7 +25,7 @@
  */
 
 /* BSD socket manipulation tools.
- * $Id: inet.h,v 1.40 2013/02/07 15:44:29 castaglia Exp $
+ * $Id: inet.h,v 1.40 2013-02-07 15:44:29 castaglia Exp $
  */
 
 #ifndef PR_INET_H
diff --git a/include/child.h b/include/lastlog.h
similarity index 56%
copy from include/child.h
copy to include/lastlog.h
index 92a8203..de7589a 100644
--- a/include/child.h
+++ b/include/lastlog.h
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2004-2011 The ProFTPD Project team
+ * Copyright (c) 2006 The ProFTPD Project team
  *
  * 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
@@ -14,7 +14,7 @@
  *
  * 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, Suite 500, Boston, MA 02110-1335, USA.
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
  *
  * As a special exemption, The ProFTPD Project team and other respective
  * copyright holders give permission to link this program with OpenSSL, and
@@ -22,29 +22,39 @@
  * OpenSSL in the source distribution.
  */
 
-/* Management of child objects
- * $Id: child.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+/* Lastlog API
+ * $Id: lastlog.h,v 1.1 2006-06-22 20:37:07 castaglia Exp $
  */
 
-#ifndef PR_CHILD_H
-#define PR_CHILD_H
+#ifndef PR_LASTLOG_H
+#define PR_LASTLOG_H
 
-typedef struct child {
-  struct child *next, *prev;
+#ifdef PR_USE_LASTLOG
 
-  pool *ch_pool;
-  pid_t ch_pid;
-  time_t ch_when;
-  int ch_pipefd;
+#ifdef HAVE_LASTLOG_H
+# include <lastlog.h>
+#endif
 
-  unsigned char ch_dead;
-} pr_child_t;
+#ifdef HAVE_LOGIN_H
+# include <login.h>
+#endif
 
-int child_add(pid_t, int);
-unsigned long child_count(void);
-pr_child_t *child_get(pr_child_t *);
-int child_remove(pid_t);
-void child_signal(int);
-void child_update(void);
+#ifdef HAVE_PATHS_H
+# include <paths.h>
+#endif
 
-#endif /* PR_CHILD_H */
+#ifndef PR_LASTLOG_PATH
+# ifdef _PATH_LASTLOG
+#   define PR_LASTLOG_PATH	_PATH_LASTLOG
+# else
+#   ifdef LASTLOG_FILE
+#     define PR_LASTLOG_PATH	LASTLOG_FILE
+#   endif
+# endif
+#endif
+
+int log_lastlog(uid_t uid, const char *user_name, const char *tty,
+  pr_netaddr_t *remote_addr);
+#endif /* PR_USE_LASTLOG */
+
+#endif /* PR_LASTLOG_H */
diff --git a/include/libsupp.h b/include/libsupp.h
index 544422f..d036eb2 100644
--- a/include/libsupp.h
+++ b/include/libsupp.h
@@ -28,7 +28,7 @@
  */
 
 /* ProFTPD support library definitions.
- * $Id: libsupp.h,v 1.17 2013/06/22 04:59:35 castaglia Exp $
+ * $Id: libsupp.h,v 1.17 2013-06-22 04:59:35 castaglia Exp $
  */
 
 #include <glibc-glob.h>
diff --git a/include/log.h b/include/log.h
index c3985d1..af4db26 100644
--- a/include/log.h
+++ b/include/log.h
@@ -27,7 +27,7 @@
 /* Logging, either to syslog or stderr, as well as debug logging
  * and debug levels.
  *
- * $Id: log.h,v 1.38 2013/10/07 01:29:05 castaglia Exp $
+ * $Id: log.h,v 1.38 2013-10-07 01:29:05 castaglia Exp $
  */
 
 #ifndef PR_LOG_H
diff --git a/include/memcache.h b/include/memcache.h
index 0de26e3..e08a611 100644
--- a/include/memcache.h
+++ b/include/memcache.h
@@ -23,7 +23,7 @@
  */
 
 /* Memcache support
- * $Id: memcache.h,v 1.12 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: memcache.h,v 1.12 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_MEMCACHE_H
diff --git a/include/mkhome.h b/include/mkhome.h
index 6e47b4e..145ce75 100644
--- a/include/mkhome.h
+++ b/include/mkhome.h
@@ -23,7 +23,7 @@
  */
 
 /* Home-on-demand support
- * $Id: mkhome.h,v 1.3 2012/09/05 16:40:58 castaglia Exp $
+ * $Id: mkhome.h,v 1.3 2012-09-05 16:40:58 castaglia Exp $
  */
 
 #ifndef PR_MKHOME_H
diff --git a/include/mod_ctrls.h b/include/mod_ctrls.h
index 0deb94e..8186524 100644
--- a/include/mod_ctrls.h
+++ b/include/mod_ctrls.h
@@ -26,7 +26,7 @@
  * This is mod_ctrls, contrib software for proftpd 1.2 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_ctrls.h,v 1.5 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: mod_ctrls.h,v 1.5 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef MOD_CTRLS_H
diff --git a/include/mod_log.h b/include/mod_log.h
index 1a82db0..b398c2d 100644
--- a/include/mod_log.h
+++ b/include/mod_log.h
@@ -22,7 +22,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_log.h,v 1.2 2013/11/11 01:34:04 castaglia Exp $
+ * $Id: mod_log.h,v 1.2 2013-11-11 01:34:04 castaglia Exp $
  */
 
 #ifndef MOD_LOG_H
diff --git a/include/modules.h b/include/modules.h
index 061347f..73b6f72 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -25,7 +25,7 @@
  */
 
 /* ProFTPD module definitions.
- * $Id: modules.h,v 1.59 2012/04/15 18:04:14 castaglia Exp $
+ * $Id: modules.h,v 1.59 2012-04-15 18:04:14 castaglia Exp $
  */
 
 #ifndef PR_MODULES_H
diff --git a/include/netacl.h b/include/netacl.h
index 205e825..fd48169 100644
--- a/include/netacl.h
+++ b/include/netacl.h
@@ -23,7 +23,7 @@
  */
 
 /* Network ACL definitions
- * $Id: netacl.h,v 1.5 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: netacl.h,v 1.5 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_NETACL_H
diff --git a/include/netaddr.h b/include/netaddr.h
index d6ab46c..6a23b9d 100644
--- a/include/netaddr.h
+++ b/include/netaddr.h
@@ -23,7 +23,7 @@
  */
 
 /* Network address API
- * $Id: netaddr.h,v 1.36 2013/12/23 17:53:42 castaglia Exp $
+ * $Id: netaddr.h,v 1.36 2013-12-23 17:53:42 castaglia Exp $
  */
 
 #ifndef PR_NETADDR_H
diff --git a/include/netio.h b/include/netio.h
index 42223d6..e61527e 100644
--- a/include/netio.h
+++ b/include/netio.h
@@ -25,7 +25,7 @@
  */
 
 /* Network IO stream layer
- * $Id: netio.h,v 1.18 2014/01/06 06:57:16 castaglia Exp $
+ * $Id: netio.h,v 1.18 2014-01-06 06:57:16 castaglia Exp $
  */
 
 #ifndef PR_NETIO_H
diff --git a/include/options.h b/include/options.h
index 1c74a90..5e12abc 100644
--- a/include/options.h
+++ b/include/options.h
@@ -25,7 +25,7 @@
  */
 
 /* User configurable defaults and tunable parameters.
- * $Id: options.h,v 1.36 2014/01/25 16:34:09 castaglia Exp $
+ * $Id: options.h,v 1.36 2014-01-25 16:34:09 castaglia Exp $
  */
 
 #ifndef PR_OPTIONS_H
diff --git a/include/parser.h b/include/parser.h
index 457a79c..f93e3e3 100644
--- a/include/parser.h
+++ b/include/parser.h
@@ -23,7 +23,7 @@
  */
 
 /* Configuration parser
- * $Id: parser.h,v 1.4 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: parser.h,v 1.4 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_PARSER_H
diff --git a/include/pidfile.h b/include/pidfile.h
index 9965ea0..b4e7c86 100644
--- a/include/pidfile.h
+++ b/include/pidfile.h
@@ -23,7 +23,7 @@
  */
 
 /* Pidfile handling
- * $Id: pidfile.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: pidfile.h,v 1.3 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_PIDFILE_H
diff --git a/include/pool.h b/include/pool.h
index 68c41f5..07b2352 100644
--- a/include/pool.h
+++ b/include/pool.h
@@ -27,7 +27,7 @@
 /* Memory allocation/anti-leak system.  Yes, this *IS* stolen from Apache
  * also.  What can I say?  It makes sense, and it's safe (more overhead
  * though)
- * $Id: pool.h,v 1.28 2012/02/16 00:18:33 castaglia Exp $
+ * $Id: pool.h,v 1.28 2012-02-16 00:18:33 castaglia Exp $
  */
 
 #ifndef PR_POOL_H
diff --git a/include/pr-syslog.h b/include/pr-syslog.h
index 3eea2be..88f2653 100644
--- a/include/pr-syslog.h
+++ b/include/pr-syslog.h
@@ -25,7 +25,7 @@
  */
 
 /* ProFTPD internal implemenation of syslog(3) routines
- * $Id: pr-syslog.h,v 1.6 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: pr-syslog.h,v 1.6 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/include/privs.h b/include/privs.h
index 324200b..8a10e88 100644
--- a/include/privs.h
+++ b/include/privs.h
@@ -24,7 +24,7 @@
  * the source code for OpenSSL in the source distribution.
  */
 
-/* $Id: privs.h,v 1.34 2012/01/25 07:20:42 castaglia Exp $
+/* $Id: privs.h,v 1.34 2012-01-25 07:20:42 castaglia Exp $
  */
 
 #ifndef PR_PRIVS_H
diff --git a/include/proctitle.h b/include/proctitle.h
index 11b6f71..5486cd1 100644
--- a/include/proctitle.h
+++ b/include/proctitle.h
@@ -23,7 +23,7 @@
  */
 
 /* Proctitle handling
- * $Id: proctitle.h,v 1.5 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: proctitle.h,v 1.5 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_PROCTITLE_H
diff --git a/include/proftpd.h b/include/proftpd.h
index 2c13ebd..b8858cf 100644
--- a/include/proftpd.h
+++ b/include/proftpd.h
@@ -25,7 +25,7 @@
  */
 
 /* General options
- * $Id: proftpd.h,v 1.75 2012/04/15 18:04:14 castaglia Exp $
+ * $Id: proftpd.h,v 1.75 2012-04-15 18:04:14 castaglia Exp $
  */
 
 #ifndef PR_PROFTPD_H
diff --git a/include/regexp.h b/include/regexp.h
index ab1ed39..f8c6e62 100644
--- a/include/regexp.h
+++ b/include/regexp.h
@@ -23,7 +23,7 @@
  */
 
 /* Regular expression management
- * $Id: regexp.h,v 1.9 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: regexp.h,v 1.9 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_REGEXP_H
diff --git a/include/response.h b/include/response.h
index 2917059..22aa4aa 100644
--- a/include/response.h
+++ b/include/response.h
@@ -23,7 +23,7 @@
  */
 
 /* Command response routines
- * $Id: response.h,v 1.9 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: response.h,v 1.9 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_RESPONSE_H
diff --git a/include/rlimit.h b/include/rlimit.h
index 7cff340..d8ae3a4 100644
--- a/include/rlimit.h
+++ b/include/rlimit.h
@@ -23,7 +23,7 @@
  */
 
 /* Resource limits
- * $Id: rlimit.h,v 1.3 2013/02/06 07:34:54 castaglia Exp $
+ * $Id: rlimit.h,v 1.3 2013-02-06 07:34:54 castaglia Exp $
  */
 
 #ifndef PR_RLIMIT_H
diff --git a/include/scoreboard.h b/include/scoreboard.h
index b30325d..57f700f 100644
--- a/include/scoreboard.h
+++ b/include/scoreboard.h
@@ -23,7 +23,7 @@
  */
 
 /* Scoreboard routines
- * $Id: scoreboard.h,v 1.22 2012/01/27 01:02:58 castaglia Exp $
+ * $Id: scoreboard.h,v 1.22 2012-01-27 01:02:58 castaglia Exp $
  */
 
 #ifndef PR_SCOREBOARD_H
diff --git a/include/session.h b/include/session.h
index a0ccd1a..8b24f3e 100644
--- a/include/session.h
+++ b/include/session.h
@@ -21,7 +21,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: session.h,v 1.8 2012/04/15 18:04:14 castaglia Exp $
+ * $Id: session.h,v 1.8 2012-04-15 18:04:14 castaglia Exp $
  */
 
 #ifndef PR_SESSION_H
@@ -72,6 +72,9 @@
 /* Disconnected due to snprintf(3) buffer truncation. */
 #define PR_SESS_DISCONNECT_SNPRINTF_TRUNCATED	13
 
+/* Disconnected due to wrong protocol used (e.g. HTTP/SMTP). */
+#define PR_SESS_DISCONNECT_BAD_PROTOCOL		14
+
 /* Returns a string describing the reason the client was disconnected or
  * the session ended.  If a pointer to a char * was provided, any extra
  * disconnect details will be provided.
diff --git a/include/sets.h b/include/sets.h
index eeed898..ad94034 100644
--- a/include/sets.h
+++ b/include/sets.h
@@ -24,7 +24,7 @@
  * the source code for OpenSSL in the source distribution.
  */
 
-/* $Id: sets.h,v 1.11 2011/12/21 04:16:58 castaglia Exp $
+/* $Id: sets.h,v 1.11 2011-12-21 04:16:58 castaglia Exp $
  */
 
 #ifndef PR_SETS_H
diff --git a/include/stash.h b/include/stash.h
index e1344cb..c389b2f 100644
--- a/include/stash.h
+++ b/include/stash.h
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD symbol table hash ("stash")
- * $Id: stash.h,v 1.3 2012/04/24 23:27:38 castaglia Exp $
+ * $Id: stash.h,v 1.3 2012-04-24 23:27:38 castaglia Exp $
  */
 
 #ifndef PR_STASH_H
diff --git a/include/str.h b/include/str.h
index 495a72b..149912f 100644
--- a/include/str.h
+++ b/include/str.h
@@ -23,7 +23,7 @@
  */
 
 /* String manipulation functions
- * $Id: str.h,v 1.11 2013/11/24 00:45:29 castaglia Exp $
+ * $Id: str.h,v 1.11 2013-11-24 00:45:29 castaglia Exp $
  */
 
 #ifndef PR_STR_H
diff --git a/include/support.h b/include/support.h
index 840523a..a63144a 100644
--- a/include/support.h
+++ b/include/support.h
@@ -25,7 +25,7 @@
  */
 
 /* Non-specific support functions.
- * $Id: support.h,v 1.39 2011/11/19 02:40:12 castaglia Exp $
+ * $Id: support.h,v 1.39 2011-11-19 02:40:12 castaglia Exp $
  */
 
 #ifndef PR_SUPPORT_H
diff --git a/include/table.h b/include/table.h
index b61bab3..9954482 100644
--- a/include/table.h
+++ b/include/table.h
@@ -23,7 +23,7 @@
  */
 
 /* Table management
- * $Id: table.h,v 1.12 2012/01/26 17:55:07 castaglia Exp $
+ * $Id: table.h,v 1.12 2012-01-26 17:55:07 castaglia Exp $
  */
 
 #ifndef PR_TABLE_H
diff --git a/include/throttle.h b/include/throttle.h
index a3d0ada..b5b52a1 100644
--- a/include/throttle.h
+++ b/include/throttle.h
@@ -23,7 +23,7 @@
  */
 
 /* Transfer rate/throttling functions
- * $Id: throttle.h,v 1.2 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: throttle.h,v 1.2 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_THROTTLE_H
diff --git a/include/timers.h b/include/timers.h
index 89fd052..8ba6afc 100644
--- a/include/timers.h
+++ b/include/timers.h
@@ -23,7 +23,7 @@
  * with OpenSSL, and distribute the resulting executable, without including
  * the source code for OpenSSL in the source distribution.
  *
- * $Id: timers.h,v 1.18 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: timers.h,v 1.18 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_TIMERS_H
diff --git a/include/trace.h b/include/trace.h
index e17f3c2..c2d7005 100644
--- a/include/trace.h
+++ b/include/trace.h
@@ -23,7 +23,7 @@
  */
 
 /* Trace API
- * $Id: trace.h,v 1.8 2013/01/31 20:35:54 castaglia Exp $
+ * $Id: trace.h,v 1.8 2013-01-31 20:35:54 castaglia Exp $
  */
 
 #ifndef PR_TRACE_H
diff --git a/src/version.c b/include/utf8.h
similarity index 65%
copy from src/version.c
copy to include/utf8.h
index 540acf3..e2c5ac4 100644
--- a/src/version.c
+++ b/include/utf8.h
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2008 The ProFTPD Project team
+ * Copyright (c) 2006 The ProFTPD Project team
  *
  * 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
@@ -14,7 +14,7 @@
  *
  * 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, Suite 500, Boston, MA 02110-1335, USA.
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
  *
  * As a special exemption, The ProFTPD Project team and other respective
  * copyright holders give permission to link this program with OpenSSL, and
@@ -22,20 +22,23 @@
  * OpenSSL in the source distribution.
  */
 
-/* Versioning
- * $Id: version.c,v 1.2 2011/05/23 21:22:24 castaglia Exp $
+/* UTF8 encoding/decoding
+ * $Id: utf8.h,v 1.1 2006-05-25 16:55:34 castaglia Exp $
  */
 
-#include "conf.h"
+#ifndef PR_UTF8_H
+#define PR_UTF8_H
 
-unsigned long pr_version_get_module_api_number(void) {
-  return PR_MODULE_API_VERSION;
-}
+/*
+ */
+char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen);
+
+/*
+ */
+char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen);
 
-unsigned long pr_version_get_number(void) {
-  return PROFTPD_VERSION_NUMBER;
-}
+/* Internal use only. */
+int utf8_init(void);
+int utf8_free(void);
 
-const char *pr_version_get_str(void) {
-  return PROFTPD_VERSION_TEXT;
-}
+#endif /* PR_UTF8_H */
diff --git a/include/var.h b/include/var.h
index f93daf3..8777599 100644
--- a/include/var.h
+++ b/include/var.h
@@ -23,7 +23,7 @@
  */
 
 /* Variables API definition
- * $Id: var.h,v 1.4 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: var.h,v 1.4 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_VAR_H
diff --git a/include/version.h b/include/version.h
index 8a62fb4..e6ff92c 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1,8 +1,8 @@
 #include "buildstamp.h"
 
 /* Application version (in various forms) */
-#define PROFTPD_VERSION_NUMBER		0x0001030505
-#define PROFTPD_VERSION_TEXT		"1.3.5"
+#define PROFTPD_VERSION_NUMBER		0x0001030507
+#define PROFTPD_VERSION_TEXT		"1.3.5a"
 
 /* Module API version */
 #define PR_MODULE_API_VERSION		0x20
@@ -12,4 +12,4 @@ unsigned long pr_version_get_number(void);
 const char *pr_version_get_str(void);
 
 /* PR_STATUS is reported by --version-status -- don't ask why */
-#define PR_STATUS          		"(stable)"
+#define PR_STATUS          		"(maint)"
diff --git a/include/xferlog.h b/include/xferlog.h
index a71dc12..e30dd6f 100644
--- a/include/xferlog.h
+++ b/include/xferlog.h
@@ -23,7 +23,7 @@
  */
 
 /* TransferLog routines
- * $Id: xferlog.h,v 1.3 2011/05/23 20:35:35 castaglia Exp $
+ * $Id: xferlog.h,v 1.3 2011-05-23 20:35:35 castaglia Exp $
  */
 
 #ifndef PR_XFERLOG_H
diff --git a/lib/Makefile.in b/lib/Makefile.in
index a6ba107..f476488 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -44,31 +44,3 @@ depend:
 
 distclean:
 	test -z $(LIB_DEPS) || (cd libltdl/ && $(MAKE) distclean)
-# DO NOT DELETE
-
-getopt1.o: ../config.h getopt.h
-getopt.o: ../config.h getopt.h
-glibc-glob.o: ../config.h ../include/options.h ../include/glibc-glob.h
-glibc-hstrerror.o: ../include/conf.h ../include/version.h ../config.h
-glibc-hstrerror.o: ../include/default_paths.h ../include/options.h
-glibc-hstrerror.o: ../include/libsupp.h ../include/glibc-glob.h
-glibc-mkstemp.o: ../include/conf.h ../include/version.h ../config.h
-glibc-mkstemp.o: ../include/default_paths.h ../include/options.h
-glibc-mkstemp.o: ../include/libsupp.h ../include/glibc-glob.h
-pr_fnmatch.o: ../config.h ../include/conf.h ../include/version.h
-pr_fnmatch.o: ../include/default_paths.h ../include/options.h
-pr_fnmatch.o: ../include/libsupp.h ../include/glibc-glob.h pr_fnmatch_loop.c
-pr_fnmatch_loop.o: ../config.h
-pr-syslog.o: ../include/conf.h ../include/version.h ../config.h
-pr-syslog.o: ../include/default_paths.h ../include/options.h
-pwgrent.o: ../include/conf.h ../include/version.h ../config.h
-pwgrent.o: ../include/default_paths.h ../include/options.h
-pwgrent.o: ../include/libsupp.h ../include/glibc-glob.h
-sstrncpy.o: ../config.h ../include/libsupp.h ../include/glibc-glob.h
-strsep.o: ../include/conf.h ../include/version.h ../config.h
-strsep.o: ../include/default_paths.h ../include/options.h
-strsep.o: ../include/libsupp.h ../include/glibc-glob.h
-tpl.o: ../include/tpl.h
-vsnprintf.o: ../include/conf.h ../include/version.h ../config.h
-vsnprintf.o: ../include/default_paths.h ../include/options.h
-vsnprintf.o: ../include/libsupp.h ../include/glibc-glob.h
diff --git a/lib/libcap/_makenames.c b/lib/libcap/_makenames.c
index d0462b9..48933ec 100644
--- a/lib/libcap/_makenames.c
+++ b/lib/libcap/_makenames.c
@@ -1,5 +1,5 @@
 /*
- * $Id: _makenames.c,v 1.1 2003/01/03 02:16:17 jwm Exp $
+ * $Id: _makenames.c,v 1.1 2003-01-03 02:16:17 jwm Exp $
  *
  * Copyright (c) 1997-8 Andrew G. Morgan <morgan at linux.kernel.org>
  *
@@ -64,7 +64,7 @@ int main(void)
 
 /*
  * $Log: _makenames.c,v $
- * Revision 1.1  2003/01/03 02:16:17  jwm
+ * Revision 1.1  2003-01-03 02:16:17  jwm
  *
  * Turning mod_linuxprivs into a core module, mod_cap. This is by no means
  * complete.
diff --git a/lib/libcap/cap_alloc.c b/lib/libcap/cap_alloc.c
index d6e1bcb..8beee74 100644
--- a/lib/libcap/cap_alloc.c
+++ b/lib/libcap/cap_alloc.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_alloc.c,v 1.3 2008/08/06 17:00:41 castaglia Exp $
+ * $Id: cap_alloc.c,v 1.3 2008-08-06 17:00:41 castaglia Exp $
  *
  * Copyright (c) 1997-8 Andrew G Morgan <morgan at linux.kernel.org>
  *
@@ -123,7 +123,7 @@ int cap_free(void *data_p)
 
 /*
  * $Log: cap_alloc.c,v $
- * Revision 1.3  2008/08/06 17:00:41  castaglia
+ * Revision 1.3  2008-08-06 17:00:41  castaglia
  *
  * Bug#3096 - libcap version errors on newer Linux kernel.  Newer Linux kernels
  * have a _LINUX_CAPABILITY_VERSION_2 macro, and redefine the old
diff --git a/lib/libcap/cap_extint.c b/lib/libcap/cap_extint.c
index 64bd881..1dae41e 100644
--- a/lib/libcap/cap_extint.c
+++ b/lib/libcap/cap_extint.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_extint.c,v 1.1 2003/01/03 02:16:17 jwm Exp $
+ * $Id: cap_extint.c,v 1.1 2003-01-03 02:16:17 jwm Exp $
  *
  * Copyright (c) 1997-8 Andrew G Morgan <morgan at linux.kernel.org>
  *
@@ -130,7 +130,7 @@ cap_t cap_copy_int(const void *cap_ext)
 
 /*
  * $Log: cap_extint.c,v $
- * Revision 1.1  2003/01/03 02:16:17  jwm
+ * Revision 1.1  2003-01-03 02:16:17  jwm
  *
  * Turning mod_linuxprivs into a core module, mod_cap. This is by no means
  * complete.
diff --git a/lib/libcap/cap_file.c b/lib/libcap/cap_file.c
index 4adc824..348644a 100644
--- a/lib/libcap/cap_file.c
+++ b/lib/libcap/cap_file.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_file.c,v 1.1 2003/01/03 02:16:17 jwm Exp $
+ * $Id: cap_file.c,v 1.1 2003-01-03 02:16:17 jwm Exp $
  *
  * Copyright (c) 1997 Andrew G Morgan <morgan at linux.kernel.org>
  *
@@ -99,7 +99,7 @@ int cap_set_file(const char *filename, cap_t cap_d)
 
 /*
  * $Log: cap_file.c,v $
- * Revision 1.1  2003/01/03 02:16:17  jwm
+ * Revision 1.1  2003-01-03 02:16:17  jwm
  *
  * Turning mod_linuxprivs into a core module, mod_cap. This is by no means
  * complete.
diff --git a/lib/libcap/cap_flag.c b/lib/libcap/cap_flag.c
index 835693d..2a1d02a 100644
--- a/lib/libcap/cap_flag.c
+++ b/lib/libcap/cap_flag.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_flag.c,v 1.1 2003/01/03 02:16:17 jwm Exp $
+ * $Id: cap_flag.c,v 1.1 2003-01-03 02:16:17 jwm Exp $
  *
  * Copyright (c) 1997-8 Andrew G. Morgan <morgan at linux.kernel.org>
  *
@@ -107,7 +107,7 @@ int cap_clear(cap_t cap_d)
 
 /*
  * $Log: cap_flag.c,v $
- * Revision 1.1  2003/01/03 02:16:17  jwm
+ * Revision 1.1  2003-01-03 02:16:17  jwm
  *
  * Turning mod_linuxprivs into a core module, mod_cap. This is by no means
  * complete.
diff --git a/lib/libcap/cap_proc.c b/lib/libcap/cap_proc.c
index 6ad355f..6837232 100644
--- a/lib/libcap/cap_proc.c
+++ b/lib/libcap/cap_proc.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_proc.c,v 1.2 2008/08/06 17:00:41 castaglia Exp $
+ * $Id: cap_proc.c,v 1.2 2008-08-06 17:00:41 castaglia Exp $
  *
  * Copyright (c) 1997-8 Andrew G Morgan <morgan at linux.kernel.org>
  *
@@ -89,7 +89,7 @@ int capsetp(pid_t pid, cap_t cap_d)
 
 /*
  * $Log: cap_proc.c,v $
- * Revision 1.2  2008/08/06 17:00:41  castaglia
+ * Revision 1.2  2008-08-06 17:00:41  castaglia
  *
  * Bug#3096 - libcap version errors on newer Linux kernel.  Newer Linux kernels
  * have a _LINUX_CAPABILITY_VERSION_2 macro, and redefine the old
diff --git a/lib/libcap/cap_sys.c b/lib/libcap/cap_sys.c
index 5f6e859..437531d 100644
--- a/lib/libcap/cap_sys.c
+++ b/lib/libcap/cap_sys.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_sys.c,v 1.2 2005/01/25 19:30:55 castaglia Exp $
+ * $Id: cap_sys.c,v 1.2 2005-01-25 19:30:55 castaglia Exp $
  *
  * Copyright (c) 1997-8 Andrew G. Morgan   <morgan at linux.kernel.org>
  *
@@ -13,7 +13,7 @@
 
 /*
  * $Log: cap_sys.c,v $
- * Revision 1.2  2005/01/25 19:30:55  castaglia
+ * Revision 1.2  2005-01-25 19:30:55  castaglia
  *
  * Bug#2503 - Bundled libcap library does not compile on IA64 machine.
  *
diff --git a/lib/libcap/cap_text.c b/lib/libcap/cap_text.c
index 11b7599..32a30ed 100644
--- a/lib/libcap/cap_text.c
+++ b/lib/libcap/cap_text.c
@@ -1,5 +1,5 @@
 /*
- * $Id: cap_text.c,v 1.2 2003/05/15 00:49:13 castaglia Exp $
+ * $Id: cap_text.c,v 1.2 2003-05-15 00:49:13 castaglia Exp $
  *
  * Copyright (c) 1997-8 Andrew G Morgan <morgan at linux.kernel.org>
  * Copyright (c) 1997 Andrew Main <zefram at dcs.warwick.ac.uk>
@@ -309,7 +309,7 @@ char *cap_to_text(cap_t caps, ssize_t *length_p)
 
 /*
  * $Log: cap_text.c,v $
- * Revision 1.2  2003/05/15 00:49:13  castaglia
+ * Revision 1.2  2003-05-15 00:49:13  castaglia
  *
  * Bug#2000 - mod_cap should not use bundled libcap.  This patch updates the
  * bundled libcap; I won't be closing the bug report just yet.
diff --git a/lib/libcap/libcap.h b/lib/libcap/libcap.h
index 8497768..ae588c8 100644
--- a/lib/libcap/libcap.h
+++ b/lib/libcap/libcap.h
@@ -1,5 +1,5 @@
 /*
- * $Id: libcap.h,v 1.5 2008/08/23 02:49:48 castaglia Exp $
+ * $Id: libcap.h,v 1.5 2008-08-23 02:49:48 castaglia Exp $
  *
  * Copyright (c) 1997 Andrew G Morgan <morgan at linux.kernel.org>
  *
@@ -133,7 +133,7 @@ extern int capsetp(pid_t pid, cap_t cap_d);
 
 /*
  * $Log: libcap.h,v $
- * Revision 1.5  2008/08/23 02:49:48  castaglia
+ * Revision 1.5  2008-08-23 02:49:48  castaglia
  *
  * Fix typo (missing backslash).
  *
diff --git a/lib/libltdl/.cvsignore b/lib/libltdl/.cvsignore
new file mode 100644
index 0000000..e8c75ed
--- /dev/null
+++ b/lib/libltdl/.cvsignore
@@ -0,0 +1,12 @@
+argz.h
+autom4te.cache
+config.log
+config.h
+config.status
+libtool
+Makefile
+stamp-h1
+.deps
+.libs
+*.lo
+*.la
diff --git a/lib/libltdl/acinclude.m4 b/lib/libltdl/acinclude.m4
new file mode 100644
index 0000000..e4858ac
--- /dev/null
+++ b/lib/libltdl/acinclude.m4
@@ -0,0 +1,7080 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
+## 2008  Free Software Foundation, Inc.
+## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+##
+## 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 52 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)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_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+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
+
+# 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']
+
+# 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'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+_LT_REQUIRED_DARWIN_CHECKS
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# --------------------------
+# Check for some things on darwin
+AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+   # By default we will add the -single_module flag. You can override
+   # by either setting the environment variable LT_MULTI_MODULE
+   # non-empty at configure time, or by adding -multi_module to the
+   # link flags.
+   echo "int foo(void){return 1;}" > conftest.c
+   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+     -dynamiclib ${wl}-single_module conftest.c
+   if test -f libconftest.dylib; then
+     lt_cv_apple_cc_single_mod=yes
+     rm -rf libconftest.dylib*
+   fi
+   rm conftest.c
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+   [lt_cv_ld_exported_symbols_list=yes],
+   [lt_cv_ld_exported_symbols_list=no])
+   LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[0123]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*)
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+   10.[[012]]*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+   10.*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil="~$DSYMUTIL \$lib || :"
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${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
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+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' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # 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.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_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' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "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 configure 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' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "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 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "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-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    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_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  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
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $rm -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	      lt_cv_sys_max_cmd_len=$new_result &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on massive
+      # amounts of additional arguments before passing them to the linker.
+      # It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# ------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ---------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# ----------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  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
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  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
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != 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 "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = 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
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         old_striplib="$STRIP -S"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+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"
+m4_if($1,[],[
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) 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.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+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}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  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"
+  # 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* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      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}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$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.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 DLLs
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [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.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# 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_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [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.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# 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_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [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.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_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_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognize shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  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
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognize a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--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([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname 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(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_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_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_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 extended 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.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_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]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_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
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately 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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately 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, lt_dlinit,
+  [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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ------------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# -------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF
+
+# Report which library types will actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+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
+  ;;
+
+aix[[4-9]]*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix[[4-9]]*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  :
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=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
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+      if test "$GXX" = yes ; then
+      output_verbose_link_cmd='echo'
+      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      fi
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  interix[[3-9]]*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux* | k*bsd*-gnu)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC* | pgcpp*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # Archives containing C++ object files must be created using
+	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	  # necessary to make sure instantiated templates are included
+	  # in the archive.
+	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	  ;;
+	esac
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    if test -f /usr/libexec/ld.so; then
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      fi
+      output_verbose_link_cmd='echo'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    # The compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_AC_TAGVAR(predep_objects,$1)=
+  _LT_AC_TAGVAR(postdep_objects,$1)=
+  _LT_AC_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+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
+  ;;
+aix[[4-9]]*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# -------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | 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 ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# 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., 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.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# 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 add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# 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=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation?
+need_locks=$lt_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_support=$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=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# 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=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# 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
+
+  # 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?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# 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 an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux* | k*bsd*-gnu)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && 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 grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#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/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    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'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    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'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp 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'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # 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.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # 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 "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=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
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=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't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=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 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=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
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # 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.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=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*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      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.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* 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 */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+  as_executable_p='test -x'
+else
+  as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])
+## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
+## Copyright (C) 1999-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.
+
+# serial 9 AC_LIB_LTDL
+
+# AC_WITH_LTDL
+# ------------
+# Clients of libltdl can use this macro to allow the installer to
+# choose between a shipped copy of the ltdl sources or a preinstalled
+# version of the library.
+AC_DEFUN([AC_WITH_LTDL],
+[AC_REQUIRE([AC_LIB_LTDL])
+AC_SUBST([LIBLTDL])
+AC_SUBST([INCLTDL])
+
+# Unless the user asks us to check, assume no installed ltdl exists.
+use_installed_libltdl=no
+
+AC_ARG_WITH([included_ltdl],
+    [  --with-included-ltdl    use the GNU ltdl sources included here])
+
+if test "x$with_included_ltdl" != xyes; then
+  # We are not being forced to use the included libltdl sources, so
+  # decide whether there is a useful installed version we can use.
+  AC_CHECK_HEADER([ltdl.h],
+      [AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
+          [with_included_ltdl=no],
+          [with_included_ltdl=yes])
+  ])
+fi
+
+if test "x$enable_ltdl_install" != xyes; then
+  # If the user did not specify an installable libltdl, then default
+  # to a convenience lib.
+  AC_LIBLTDL_CONVENIENCE
+fi
+
+if test "x$with_included_ltdl" = xno; then
+  # If the included ltdl is not to be used. then Use the
+  # preinstalled libltdl we found.
+  AC_DEFINE([HAVE_LTDL], [1],
+    [Define this if a modern libltdl is already installed])
+  LIBLTDL=-lltdl
+fi
+
+# Report our decision...
+AC_MSG_CHECKING([whether to use included libltdl])
+AC_MSG_RESULT([$with_included_ltdl])
+
+AC_CONFIG_SUBDIRS([libltdl])
+])# AC_WITH_LTDL
+
+
+# AC_LIB_LTDL
+# -----------
+# Perform all the checks necessary for compilation of the ltdl objects
+#  -- including compiler checks and header checks.
+AC_DEFUN([AC_LIB_LTDL],
+[AC_PREREQ(2.50)
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_C_CONST])
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([AC_HEADER_DIRENT])
+AC_REQUIRE([_LT_AC_CHECK_DLFCN])
+AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
+AC_REQUIRE([AC_LTDL_SHLIBEXT])
+AC_REQUIRE([AC_LTDL_SHLIBPATH])
+AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
+AC_REQUIRE([AC_LTDL_OBJDIR])
+AC_REQUIRE([AC_LTDL_DLPREOPEN])
+AC_REQUIRE([AC_LTDL_DLLIB])
+AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
+AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
+AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
+AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
+
+AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
+		  stdio.h unistd.h])
+AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h])
+AC_CHECK_HEADERS([string.h strings.h], [break])
+
+AC_CHECK_FUNCS([strchr index], [break])
+AC_CHECK_FUNCS([strrchr rindex], [break])
+AC_CHECK_FUNCS([memcpy bcopy], [break])
+AC_CHECK_FUNCS([memmove strcmp])
+AC_CHECK_FUNCS([closedir opendir readdir])
+])# AC_LIB_LTDL
+
+
+# AC_LTDL_ENABLE_INSTALL
+# ----------------------
+AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
+[AC_ARG_ENABLE([ltdl-install],
+    [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])])
+
+AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
+AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
+])# AC_LTDL_ENABLE_INSTALL
+
+
+# AC_LTDL_SYS_DLOPEN_DEPLIBS
+# --------------------------
+AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
+  [libltdl_cv_sys_dlopen_deplibs],
+  [# PORTME does your system automatically load deplibs for dlopen?
+  # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+  # For now, we just catch OSes we know something about -- in the
+  # future, we'll try test this programmatically.
+  libltdl_cv_sys_dlopen_deplibs=unknown
+  case "$host_os" in
+  aix3*|aix4.1.*|aix4.2.*)
+    # Unknown whether this is true for these versions of AIX, but
+    # we want this `case' here to explicitly catch those versions.
+    libltdl_cv_sys_dlopen_deplibs=unknown
+    ;;
+  aix[[4-9]]*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  darwin*)
+    # Assuming the user has installed a libdl from somewhere, this is true
+    # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  freebsd* | dragonfly*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  gnu* | linux* | k*bsd*-gnu)
+    # GNU and its variants, using gnu ld.so (Glibc)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  hpux10*|hpux11*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  interix*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  irix[[12345]]*|irix6.[[01]]*)
+    # Catch all versions of IRIX before 6.2, and indicate that we don't
+    # know how it worked for any of those versions.
+    libltdl_cv_sys_dlopen_deplibs=unknown
+    ;;
+  irix*)
+    # The case above catches anything before 6.2, and it's known that
+    # at 6.2 and later dlopen does load deplibs.
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  netbsd*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  openbsd*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  osf[[1234]]*)
+    # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+    # it did *not* use an RPATH in a shared library to find objects the
+    # library depends on, so we explictly say `no'.
+    libltdl_cv_sys_dlopen_deplibs=no
+    ;;
+  osf5.0|osf5.0a|osf5.1)
+    # dlopen *does* load deplibs and with the right loader patch applied
+    # it even uses RPATH in a shared library to search for shared objects
+    # that the library depends on, but there's no easy way to know if that
+    # patch is installed.  Since this is the case, all we can really
+    # say is unknown -- it depends on the patch being installed.  If
+    # it is, this changes to `yes'.  Without it, it would be `no'.
+    libltdl_cv_sys_dlopen_deplibs=unknown
+    ;;
+  osf*)
+    # the two cases above should catch all versions of osf <= 5.1.  Read
+    # the comments above for what we know about them.
+    # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+    # is used to find them so we can finally say `yes'.
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  solaris*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  esac
+  ])
+if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
+ AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
+    [Define if the OS needs help to load dependent libraries for dlopen().])
+fi
+])# AC_LTDL_SYS_DLOPEN_DEPLIBS
+
+
+# AC_LTDL_SHLIBEXT
+# ----------------
+AC_DEFUN([AC_LTDL_SHLIBEXT],
+[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+AC_CACHE_CHECK([which extension is used for loadable modules],
+  [libltdl_cv_shlibext],
+[
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+  ])
+if test -n "$libltdl_cv_shlibext"; then
+  AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$libltdl_cv_shlibext"],
+    [Define to the extension used for shared libraries, say, ".so".])
+fi
+])# AC_LTDL_SHLIBEXT
+
+
+# AC_LTDL_SHLIBPATH
+# -----------------
+AC_DEFUN([AC_LTDL_SHLIBPATH],
+[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+AC_CACHE_CHECK([which variable specifies run-time library path],
+  [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
+if test -n "$libltdl_cv_shlibpath_var"; then
+  AC_DEFINE_UNQUOTED([LTDL_SHLIBPATH_VAR], ["$libltdl_cv_shlibpath_var"],
+    [Define to the name of the environment variable that determines the dynamic library search path.])
+fi
+])# AC_LTDL_SHLIBPATH
+
+
+# AC_LTDL_SYSSEARCHPATH
+# ---------------------
+AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
+[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+AC_CACHE_CHECK([for the default library search path],
+  [libltdl_cv_sys_search_path],
+  [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
+if test -n "$libltdl_cv_sys_search_path"; then
+  sys_search_path=
+  for dir in $libltdl_cv_sys_search_path; do
+    if test -z "$sys_search_path"; then
+      sys_search_path="$dir"
+    else
+      sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
+    fi
+  done
+  AC_DEFINE_UNQUOTED([LTDL_SYSSEARCHPATH], ["$sys_search_path"],
+    [Define to the system default library search path.])
+fi
+])# AC_LTDL_SYSSEARCHPATH
+
+
+# AC_LTDL_OBJDIR
+# --------------
+AC_DEFUN([AC_LTDL_OBJDIR],
+[AC_CACHE_CHECK([for objdir],
+  [libltdl_cv_objdir],
+  [libltdl_cv_objdir="$objdir"
+  if test -n "$objdir"; then
+    :
+  else
+    rm -f .libs 2>/dev/null
+    mkdir .libs 2>/dev/null
+    if test -d .libs; then
+      libltdl_cv_objdir=.libs
+    else
+      # MS-DOS does not allow filenames that begin with a dot.
+      libltdl_cv_objdir=_libs
+    fi
+  rmdir .libs 2>/dev/null
+  fi
+  ])
+AC_DEFINE_UNQUOTED([LTDL_OBJDIR], ["$libltdl_cv_objdir/"],
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# AC_LTDL_OBJDIR
+
+
+# AC_LTDL_DLPREOPEN
+# -----------------
+AC_DEFUN([AC_LTDL_DLPREOPEN],
+[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
+  [libltdl_cv_preloaded_symbols],
+  [if test -n "$lt_cv_sys_global_symbol_pipe"; then
+    libltdl_cv_preloaded_symbols=yes
+  else
+    libltdl_cv_preloaded_symbols=no
+  fi
+  ])
+if test x"$libltdl_cv_preloaded_symbols" = xyes; then
+  AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
+    [Define if libtool can extract symbol lists from object files.])
+fi
+])# AC_LTDL_DLPREOPEN
+
+
+# AC_LTDL_DLLIB
+# -------------
+AC_DEFUN([AC_LTDL_DLLIB],
+[LIBADD_DL=
+AC_SUBST(LIBADD_DL)
+AC_LANG_PUSH([C])
+
+AC_CHECK_FUNC([shl_load],
+      [AC_DEFINE([HAVE_SHL_LOAD], [1],
+		 [Define if you have the shl_load function.])],
+  [AC_CHECK_LIB([dld], [shl_load],
+	[AC_DEFINE([HAVE_SHL_LOAD], [1],
+		   [Define if you have the shl_load function.])
+	LIBADD_DL="$LIBADD_DL -ldld"],
+    [AC_CHECK_LIB([dl], [dlopen],
+	  [AC_DEFINE([HAVE_LIBDL], [1],
+		     [Define if you have the libdl library or equivalent.])
+	        LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"],
+      [AC_TRY_LINK([#if HAVE_DLFCN_H
+#  include <dlfcn.h>
+#endif
+      ],
+	[dlopen(0, 0);],
+	    [AC_DEFINE([HAVE_LIBDL], [1],
+		             [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],
+	[AC_CHECK_LIB([svld], [dlopen],
+	      [AC_DEFINE([HAVE_LIBDL], [1],
+			 [Define if you have the libdl library or equivalent.])
+	            LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"],
+	  [AC_CHECK_LIB([dld], [dld_link],
+	        [AC_DEFINE([HAVE_DLD], [1],
+			   [Define if you have the GNU dld library.])
+	 	LIBADD_DL="$LIBADD_DL -ldld"],
+	 	[AC_CHECK_FUNC([_dyld_func_lookup],
+	 	       [AC_DEFINE([HAVE_DYLD], [1],
+	 	          [Define if you have the _dyld_func_lookup function.])])
+          ])
+        ])
+      ])
+    ])
+  ])
+])
+
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+  lt_save_LIBS="$LIBS"
+  LIBS="$LIBS $LIBADD_DL"
+  AC_CHECK_FUNCS([dlerror])
+  LIBS="$lt_save_LIBS"
+fi
+AC_LANG_POP
+])# AC_LTDL_DLLIB
+
+
+# AC_LTDL_SYMBOL_USCORE
+# ---------------------
+# does the compiler prefix global symbols with an underscore?
+AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
+[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+AC_CACHE_CHECK([for _ prefix in compiled symbols],
+  [ac_cv_sys_symbol_underscore],
+  [ac_cv_sys_symbol_underscore=no
+  cat > conftest.$ac_ext <<EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+EOF
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    ac_nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+      # See whether the symbols have a leading underscore.
+      if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+        ac_cv_sys_symbol_underscore=yes
+      else
+        if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+	  :
+        else
+	  echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
+        fi
+      fi
+    else
+      echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
+    fi
+  else
+    echo "configure: failed program was:" >&AC_FD_CC
+    cat conftest.c >&AC_FD_CC
+  fi
+  rm -rf conftest*
+  ])
+])# AC_LTDL_SYMBOL_USCORE
+
+
+# AC_LTDL_DLSYM_USCORE
+# --------------------
+AC_DEFUN([AC_LTDL_DLSYM_USCORE],
+[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
+if test x"$ac_cv_sys_symbol_underscore" = xyes; then
+  if test x"$libltdl_cv_func_dlopen" = xyes ||
+     test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
+	  [libltdl_cv_need_uscore],
+	  [libltdl_cv_need_uscore=unknown
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $LIBADD_DL"
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
+	    [],				 [libltdl_cv_need_uscore=cross])
+	  LIBS="$save_LIBS"
+	])
+  fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+  AC_DEFINE([NEED_USCORE], [1],
+    [Define if dlsym() requires a leading underscore in symbol names.])
+fi
+])# AC_LTDL_DLSYM_USCORE
+
+# AC_LTDL_FUNC_ARGZ
+# -----------------
+AC_DEFUN([AC_LTDL_FUNC_ARGZ],
+[AC_CHECK_HEADERS([argz.h])
+
+AC_CHECK_TYPES([error_t],
+  [],
+  [AC_DEFINE([error_t], [int],
+    [Define to a type to use for `error_t' if it is not otherwise available.])],
+  [#if HAVE_ARGZ_H
+#  include <argz.h>
+#endif])
+
+AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
+])# AC_LTDL_FUNC_ARGZ
diff --git a/lib/libltdl/config.guess b/lib/libltdl/config.guess
new file mode 100755
index 0000000..f32079a
--- /dev/null
+++ b/lib/libltdl/config.guess
@@ -0,0 +1,1526 @@
+#! /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
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-23'
+
+# 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 <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted 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.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+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 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 __ELF__ >/dev/null
+		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'`
+	exit ;;
+    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 ;;
+    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:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	echo i386-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:*:[456])
+	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 __LP64__ >/dev/null
+	    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:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-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*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		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 ;;
+    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 ;;
+    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
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	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 ;;
+    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:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	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 ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	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 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-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 ;;
+    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:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*)
+	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 i386.
+	echo i386-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; } ;;
+    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.0*:*)
+	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 ;;
+    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
+	    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 ;;
+    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 ;;
+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/lib/libltdl/config.sub b/lib/libltdl/config.sub
new file mode 100755
index 0000000..6759825
--- /dev/null
+++ b/lib/libltdl/config.sub
@@ -0,0 +1,1658 @@
+#! /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
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-16'
+
+# 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 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.
+
+# 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 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-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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)
+		os=
+		basic_machine=$1
+		;;
+	-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 \
+	| 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 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| score \
+	| sh | sh[1234] | sh[24]a | 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 | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# 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
+		;;
+
+	# 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-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| 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-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| 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-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | 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-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# 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
+		;;
+	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
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	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)
+		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
+		;;
+	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
+		;;
+	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
+		;;
+	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
+		;;
+	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)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	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
+		;;
+	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
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tile*)
+		basic_machine=tile-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
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-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[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.
+	-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* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -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* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -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*)
+	# 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
+		;;
+	-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
+		;;
+	# 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
+				;;
+			-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/lib/libltdl/install-sh b/lib/libltdl/install-sh
new file mode 100755
index 0000000..a5897de
--- /dev/null
+++ b/lib/libltdl/install-sh
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# 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.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$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 $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# 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.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/lib/libltdl/ltmain.sh b/lib/libltdl/ltmain.sh
new file mode 100644
index 0000000..27d498a
--- /dev/null
+++ b/lib/libltdl/ltmain.sh
@@ -0,0 +1,6956 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008  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., 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.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.26
+TIMESTAMP=" (1.1220.2.492 2008/01/30 06:40:56)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# 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 "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+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 X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
+  ;;
+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.
+lt_env=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+	  save_$lt_var=\$$lt_var
+	  lt_env=\"$lt_var=\$$lt_var \$lt_env\"
+	  $lt_var=C
+	  export $lt_var
+	fi"
+done
+
+if test -n "$lt_env"; then
+  lt_env="env $lt_env"
+fi
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+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 $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+duplicate_deps=no
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+	# Failing that, at least try and use $RANDOM to avoid a race
+	my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+	save_mktempdir_umask=`umask`
+	umask 0077
+	$mkdir "$my_tmpdir"
+	umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+	exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	$SED -n -e '1,100{
+		/ I /{
+			s,.*,import,
+			p
+			q
+			}
+		}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  extracted_serial=`expr $extracted_serial + 1`
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $exit_status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+disable_libs=no
+
+# 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)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      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
+
+Copyright (C) 2008  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."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --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 $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      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 $EXIT_FAILURE
+  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=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.[fF][09]?) xform=[fF][09]. ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    *.sx) xform=sx ;;
+    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 $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
+	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # 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 $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      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 $run ln "$progpath" "$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 $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # 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
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	exit_status=$?
+	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $exit_status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval $lt_env "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      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 $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval $lt_env "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      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 $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && 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
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-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 invocation.
+      # 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
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    single_module="${wl}-single_module"
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  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
+	  prefer_static_libs=yes
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	build_libtool_libs=no
+	build_old_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
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # 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=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_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 $EXIT_FAILURE
+	    ;;
+	  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
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	darwin_framework|darwin_framework_skip)
+	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      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: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework|-arch|-isysroot)
+	case " $CC " in
+	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
+		prev=darwin_framework_skip ;;
+	  *) compiler_flags="$compiler_flags $arg"
+	     prev=darwin_framework ;;
+	esac
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	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: cannot determine absolute directory name of \`$dir'" 1>&2
+	    absdir="$dir"
+	    notinst_path="$notinst_path $dir"
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+
+	# 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
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -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 $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	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
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	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 # arg
+
+      # 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 # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    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"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    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 object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $exit_status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  if test "$linkmode" = lib; then
+	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+	  else
+	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+	  fi
+	  for searchdir in $searchdirs; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $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"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# 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 \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $absdir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    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
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes ; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    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
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null |
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-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 $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # 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_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $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."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      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
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# 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
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$deplibdir/$depdepl" ; then
+		      depdepl="$deplibdir/$depdepl"
+	      	    elif test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    else
+		      # Can't find it, oh well...
+		      depdepl=
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
+      esac
+
+      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/-version-number' 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"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # 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 shared_ext=\"$shrext_cmds\"
+	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 $EXIT_FAILURE
+	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 shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' 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.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' 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.
+	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 $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	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 $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	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`
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    major=`expr $current - $age`
+	  else
+	    major=`expr $current - $age + 1`
+	  fi
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	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" -ne 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"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$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 $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  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
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	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
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-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"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# 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 behavior.
+	  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
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name=`expr $i : '-l\(.*\)'`
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; 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: dynamic linker does not accept needed library $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 I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name=`expr $i : '-l\(.*\)'`
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; 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: dynamic linker does not accept needed library $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"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  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 $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_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
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $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"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name=`expr $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $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"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -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
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	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."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      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
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+
+      # 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
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $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\"
+		dep_rpath="$dep_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"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      case $archive_cmds in
+	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+	      esac
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	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
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	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
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    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
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	  fi
+	fi
+	
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      $show "${rm}r $gentop"
+	      $run ${rm}r "$gentop"
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# 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
+      ;;
+
+    obj)
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
+      esac
+
+      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$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	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 and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$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 $EXIT_SUCCESS
+      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 $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      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_support" = 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
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      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 "$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
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      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"
+
+      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$old_deplibs" | $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/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    else
+	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    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" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		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 void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 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 -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -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.
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            else
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            ;;
+          esac
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	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" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	exit_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 $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 "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      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" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+	  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
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --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
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.exe"
+            $rm $cwrappersource $cwrapper
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable 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 executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
+EOF
+
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+              ;;
+            esac
+
+            cat >> $cwrappersource <<"EOF"
+  return 127;
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+          # we should really use a build-platform specific compiler
+          # here, but OTOH, the wrappers (shell script and this C one)
+          # are only useful if you want to execute the "real" binary.
+          # Since the "real" binary is built for $host, then this
+          # wrapper might as well be built for $host, too.
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 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'
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+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'$exeext
+  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 relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      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
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \$*\"
+      exit $EXIT_FAILURE
+    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 $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    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="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    exit_status=$?
+	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+	      exit $exit_status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	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"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      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
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $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='$tdlname'
+
+# 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
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	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 $EXIT_SUCCESS
+    ;;
+
+  # 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 ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | grep shtool > /dev/null; 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) 
+      	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o) prev=$arg ;;
+      -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 $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    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 $EXIT_FAILURE
+    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 $EXIT_FAILURE
+      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 $EXIT_FAILURE
+	  ;;
+	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
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# 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 $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# 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"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+	  else
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || {
+	      lt_exit=$?
+
+	      # Restore the uninstalled library and exit
+	      if test "$mode" = relink; then
+		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	      fi
+
+	      exit $lt_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"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	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 $EXIT_SUCCESS
+	;;
+
+      *)
+	# 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
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; 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'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir=`func_mktempdir`
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+
+	      $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$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway 
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$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 $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$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_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # 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.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $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 $EXIT_SUCCESS
+
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    $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 the \`-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 "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+    ;;
+
+  # 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 $EXIT_FAILURE
+    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 $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# 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 $EXIT_FAILURE
+	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
+	  if test ! -f "$dir/$dlname"; then
+	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	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 | grep "^# 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 environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+		$lt_var=\$save_$lt_var; export $lt_var
+	      fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    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 $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) 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 $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# 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
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      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.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build 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, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+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
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -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-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -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 uninstalled libtool libraries
+  -static-libtool-libs
+                    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 $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+disable_libs=shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+disable_libs=static
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/lib/libltdl/missing b/lib/libltdl/missing
new file mode 100755
index 0000000..1c8ff70
--- /dev/null
+++ b/lib/libltdl/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   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., 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# 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
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -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'
+  autom4te     touch the output file, or create a stub one
+  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]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    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' $msg.  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 test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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 test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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 "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  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."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # 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 is $msg.
+         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 prerequisites 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
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/lib/pr-syslog.c b/lib/pr-syslog.c
index 3a62956..7358228 100644
--- a/lib/pr-syslog.c
+++ b/lib/pr-syslog.c
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-/* $Id: pr-syslog.c,v 1.26 2012/01/25 07:03:24 castaglia Exp $
+/* $Id: pr-syslog.c,v 1.26 2012-01-25 07:03:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/lib/pr_fnmatch_loop.c b/lib/pr_fnmatch_loop.c
index 01135c6..80ac9d0 100644
--- a/lib/pr_fnmatch_loop.c
+++ b/lib/pr_fnmatch_loop.c
@@ -972,14 +972,13 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
 		  }
 		else if (c == L('[') && *p == L('.'))
 		  {
-		    ++p;
 		    while (1)
 		      {
 			c = *++p;
-			if (c == '\0')
+			if (c == L('\0'))
 			  return PR_FNM_NOMATCH;
 
-			if (*p == L('.') && p[1] == L(']'))
+			if (c == L('.') && p[1] == L(']'))
 			  break;
 		      }
 		    p += 2;
diff --git a/lib/sstrncpy.c b/lib/sstrncpy.c
index e332835..71fee6a 100644
--- a/lib/sstrncpy.c
+++ b/lib/sstrncpy.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -62,6 +62,11 @@ int sstrncpy(char *dst, const char *src, size_t n) {
     return 0;
   }
 
+  /* Avoid attempts to overwrite memory with itself (Bug#4156). */
+  if (dst == src) {
+    return n;
+  }
+
 #ifdef HAVE_STRLCPY
   strlcpy(dst, src, n);
 
diff --git a/lib/tpl.c b/lib/tpl.c
index 424d1c3..a354c8f 100755
--- a/lib/tpl.c
+++ b/lib/tpl.c
@@ -23,7 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define TPL_VERSION 1.5
 
-static const char id[]="$Id: tpl.c,v 1.4 2012/06/18 16:48:30 castaglia Exp $";
+static const char id[]="$Id: tpl.c,v 1.4 2012-06-18 16:48:30 castaglia Exp $";
 
 
 #include <stdlib.h>  /* malloc */
diff --git a/modules/Makefile.in b/modules/Makefile.in
index 0e2bb60..7057eb1 100644
--- a/modules/Makefile.in
+++ b/modules/Makefile.in
@@ -71,386 +71,3 @@ depend:
 	$(RM) module_glue.c
 	makedepend $(CPPFLAGS) -Y *.c 2>/dev/null
 	makedepend $(CPPFLAGS) -Y -fMakefile.in *.c 2>/dev/null
-# DO NOT DELETE
-
-mod_auth.o: ../include/conf.h ../include/version.h ../config.h
-mod_auth.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_auth.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_auth.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_auth.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_auth.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_auth.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_auth.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_auth.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_auth.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_auth.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_auth.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_auth.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_auth.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_auth.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_auth.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_auth.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_auth.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_auth.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_auth.o: ../include/privs.h
-mod_auth_file.o: ../include/conf.h ../include/version.h ../config.h
-mod_auth_file.o: ../include/default_paths.h ../include/options.h
-mod_auth_file.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_auth_file.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_auth_file.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_auth_file.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_auth_file.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_auth_file.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_auth_file.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_auth_file.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_auth_file.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_auth_file.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_auth_file.o: ../include/xferlog.h ../include/scoreboard.h
-mod_auth_file.o: ../include/data.h ../include/display.h ../include/libsupp.h
-mod_auth_file.o: ../include/glibc-glob.h ../include/fsio.h
-mod_auth_file.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_auth_file.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_auth_file.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_auth_file.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_auth_file.o: ../include/pr-syslog.h ../include/memcache.h
-mod_auth_file.o: ../include/tpl.h ../include/privs.h
-mod_auth_pam.o: ../include/conf.h ../include/version.h ../config.h
-mod_auth_pam.o: ../include/default_paths.h ../include/options.h
-mod_auth_pam.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_auth_pam.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_auth_pam.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_auth_pam.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_auth_pam.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_auth_pam.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_auth_pam.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_auth_pam.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_auth_pam.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_auth_pam.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_auth_pam.o: ../include/xferlog.h ../include/scoreboard.h
-mod_auth_pam.o: ../include/data.h ../include/display.h ../include/libsupp.h
-mod_auth_pam.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_auth_pam.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_auth_pam.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_auth_pam.o: ../include/encode.h ../include/compat.h
-mod_auth_pam.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_auth_pam.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_auth_pam.o: ../include/privs.h
-mod_auth_unix.o: ../include/conf.h ../include/version.h ../config.h
-mod_auth_unix.o: ../include/default_paths.h ../include/options.h
-mod_auth_unix.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_auth_unix.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_auth_unix.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_auth_unix.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_auth_unix.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_auth_unix.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_auth_unix.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_auth_unix.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_auth_unix.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_auth_unix.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_auth_unix.o: ../include/xferlog.h ../include/scoreboard.h
-mod_auth_unix.o: ../include/data.h ../include/display.h ../include/libsupp.h
-mod_auth_unix.o: ../include/glibc-glob.h ../include/fsio.h
-mod_auth_unix.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_auth_unix.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_auth_unix.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_auth_unix.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_auth_unix.o: ../include/pr-syslog.h ../include/memcache.h
-mod_auth_unix.o: ../include/tpl.h ../include/privs.h
-mod_cap.o: ../lib/libcap/include/sys/capability.h ../include/conf.h
-mod_cap.o: ../include/version.h ../config.h ../include/default_paths.h
-mod_cap.o: ../include/options.h ../include/pool.h ../include/str.h
-mod_cap.o: ../include/ascii.h ../include/table.h ../include/proftpd.h
-mod_cap.o: ../include/class.h ../include/netacl.h ../include/support.h
-mod_cap.o: ../include/sets.h ../include/dirtree.h ../include/expr.h
-mod_cap.o: ../include/rlimit.h ../include/filter.h ../include/modules.h
-mod_cap.o: ../include/netio.h ../include/regexp.h ../include/stash.h
-mod_cap.o: ../include/auth.h ../include/response.h ../include/timers.h
-mod_cap.o: ../include/inet.h ../include/child.h ../include/netaddr.h
-mod_cap.o: ../include/cmd.h ../include/bindings.h ../include/help.h
-mod_cap.o: ../include/feat.h ../include/ftp.h ../include/log.h
-mod_cap.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-mod_cap.o: ../include/data.h ../include/display.h ../include/libsupp.h
-mod_cap.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_cap.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_cap.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_cap.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-mod_cap.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-mod_cap.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-mod_core.o: ../include/conf.h ../include/version.h ../config.h
-mod_core.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_core.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_core.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_core.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_core.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_core.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_core.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_core.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_core.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_core.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_core.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_core.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_core.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_core.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_core.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_core.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_core.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_core.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_core.o: ../include/privs.h
-mod_ctrls.o: ../include/conf.h ../include/version.h ../config.h
-mod_ctrls.o: ../include/default_paths.h ../include/options.h
-mod_ctrls.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_ctrls.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_ctrls.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_ctrls.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_ctrls.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_ctrls.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_ctrls.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_ctrls.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_ctrls.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_ctrls.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_ctrls.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-mod_ctrls.o: ../include/display.h ../include/libsupp.h
-mod_ctrls.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_ctrls.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_ctrls.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_ctrls.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-mod_ctrls.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-mod_ctrls.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-mod_ctrls.o: ../include/mod_ctrls.h
-mod_delay.o: ../include/conf.h ../include/version.h ../config.h
-mod_delay.o: ../include/default_paths.h ../include/options.h
-mod_delay.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_delay.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_delay.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_delay.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_delay.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_delay.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_delay.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_delay.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_delay.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_delay.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_delay.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-mod_delay.o: ../include/display.h ../include/libsupp.h
-mod_delay.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_delay.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_delay.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_delay.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-mod_delay.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-mod_delay.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-mod_dso.o: ../include/conf.h ../include/version.h ../config.h
-mod_dso.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_dso.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_dso.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_dso.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_dso.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_dso.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_dso.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_dso.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_dso.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_dso.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_dso.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_dso.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_dso.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_dso.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_dso.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_dso.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_dso.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_dso.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_dso.o: ../include/mod_ctrls.h ../lib/libltdl/ltdl.h
-mod_facl.o: ../include/conf.h ../include/version.h ../config.h
-mod_facl.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_facl.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_facl.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_facl.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_facl.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_facl.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_facl.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_facl.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_facl.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_facl.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_facl.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_facl.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_facl.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_facl.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_facl.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_facl.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_facl.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_facl.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_facts.o: ../include/conf.h ../include/version.h ../config.h
-mod_facts.o: ../include/default_paths.h ../include/options.h
-mod_facts.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_facts.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_facts.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_facts.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_facts.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_facts.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_facts.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_facts.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_facts.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_facts.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_facts.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-mod_facts.o: ../include/display.h ../include/libsupp.h
-mod_facts.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_facts.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_facts.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_facts.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-mod_facts.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-mod_facts.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-mod_ident.o: ../include/conf.h ../include/version.h ../config.h
-mod_ident.o: ../include/default_paths.h ../include/options.h
-mod_ident.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_ident.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_ident.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_ident.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_ident.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_ident.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_ident.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_ident.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_ident.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_ident.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_ident.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-mod_ident.o: ../include/display.h ../include/libsupp.h
-mod_ident.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_ident.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_ident.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_ident.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-mod_ident.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-mod_ident.o: ../include/memcache.h ../include/tpl.h
-mod_lang.o: ../include/conf.h ../include/version.h ../config.h
-mod_lang.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_lang.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_lang.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_lang.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_lang.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_lang.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_lang.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_lang.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_lang.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_lang.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_lang.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_lang.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_lang.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_lang.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_lang.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_lang.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_lang.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_lang.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_log.o: ../include/conf.h ../include/version.h ../config.h
-mod_log.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_log.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_log.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_log.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_log.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_log.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_log.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_log.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_log.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_log.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_log.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_log.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_log.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_log.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_log.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_log.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_log.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_log.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_log.o: ../include/privs.h ../include/mod_log.h
-mod_ls.o: ../include/conf.h ../include/version.h ../config.h
-mod_ls.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_ls.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_ls.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_ls.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_ls.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_ls.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_ls.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_ls.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_ls.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_ls.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_ls.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_ls.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_ls.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_ls.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_ls.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_ls.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_ls.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_ls.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_memcache.o: ../include/conf.h ../include/version.h ../config.h
-mod_memcache.o: ../include/default_paths.h ../include/options.h
-mod_memcache.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_memcache.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_memcache.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_memcache.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_memcache.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_memcache.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_memcache.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_memcache.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_memcache.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_memcache.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_memcache.o: ../include/xferlog.h ../include/scoreboard.h
-mod_memcache.o: ../include/data.h ../include/display.h ../include/libsupp.h
-mod_memcache.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_memcache.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_memcache.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_memcache.o: ../include/encode.h ../include/compat.h
-mod_memcache.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_memcache.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_memcache.o: ../include/privs.h
-mod_rlimit.o: ../include/conf.h ../include/version.h ../config.h
-mod_rlimit.o: ../include/default_paths.h ../include/options.h
-mod_rlimit.o: ../include/pool.h ../include/str.h ../include/ascii.h
-mod_rlimit.o: ../include/table.h ../include/proftpd.h ../include/class.h
-mod_rlimit.o: ../include/netacl.h ../include/support.h ../include/sets.h
-mod_rlimit.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-mod_rlimit.o: ../include/filter.h ../include/modules.h ../include/netio.h
-mod_rlimit.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-mod_rlimit.o: ../include/response.h ../include/timers.h ../include/inet.h
-mod_rlimit.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-mod_rlimit.o: ../include/bindings.h ../include/help.h ../include/feat.h
-mod_rlimit.o: ../include/ftp.h ../include/log.h ../include/parser.h
-mod_rlimit.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-mod_rlimit.o: ../include/display.h ../include/libsupp.h
-mod_rlimit.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-mod_rlimit.o: ../include/ctrls.h ../include/session.h ../include/event.h
-mod_rlimit.o: ../include/var.h ../include/throttle.h ../include/trace.h
-mod_rlimit.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-mod_rlimit.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-mod_rlimit.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-mod_site.o: ../include/conf.h ../include/version.h ../config.h
-mod_site.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_site.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_site.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_site.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_site.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_site.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_site.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_site.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_site.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_site.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_site.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_site.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_site.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_site.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_site.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_site.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_site.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_site.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_xfer.o: ../include/conf.h ../include/version.h ../config.h
-mod_xfer.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mod_xfer.o: ../include/str.h ../include/ascii.h ../include/table.h
-mod_xfer.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mod_xfer.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mod_xfer.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mod_xfer.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mod_xfer.o: ../include/stash.h ../include/auth.h ../include/response.h
-mod_xfer.o: ../include/timers.h ../include/inet.h ../include/child.h
-mod_xfer.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mod_xfer.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mod_xfer.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mod_xfer.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mod_xfer.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mod_xfer.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mod_xfer.o: ../include/event.h ../include/var.h ../include/throttle.h
-mod_xfer.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mod_xfer.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mod_xfer.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mod_xfer.o: ../include/privs.h
diff --git a/modules/mod_auth.c b/modules/mod_auth.c
index f23d6ee..faadf83 100644
--- a/modules/mod_auth.c
+++ b/modules/mod_auth.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2014 The ProFTPD Project team
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* Authentication module for ProFTPD
- * $Id: mod_auth.c,v 1.317 2013/12/29 20:17:09 castaglia Exp $
+ * $Id: mod_auth.c,v 1.317 2013-12-29 20:17:09 castaglia Exp $
  */
 
 #include "conf.h"
@@ -1847,23 +1847,23 @@ static int auth_scan_scoreboard(void) {
 }
 
 static int have_client_limits(cmd_rec *cmd) {
-  if (find_config(cmd->server->conf, CONF_PARAM, "MaxClientsPerClass", FALSE) != NULL) {
+  if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClientsPerClass", FALSE) != NULL) {
     return TRUE;
   }
 
-  if (find_config(cmd->server->conf, CONF_PARAM, "MaxClientsPerHost", FALSE) != NULL) {
+  if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClientsPerHost", FALSE) != NULL) {
     return TRUE;
   }
 
-  if (find_config(cmd->server->conf, CONF_PARAM, "MaxClientsPerUser", FALSE) != NULL) {
+  if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClientsPerUser", FALSE) != NULL) {
     return TRUE;
   }
 
-  if (find_config(cmd->server->conf, CONF_PARAM, "MaxClients", FALSE) != NULL) {
+  if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClients", FALSE) != NULL) {
     return TRUE;
   }
 
-  if (find_config(cmd->server->conf, CONF_PARAM, "MaxHostsPerUser", FALSE) != NULL) {
+  if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxHostsPerUser", FALSE) != NULL) {
     return TRUE;
   }
 
diff --git a/modules/mod_auth_file.c b/modules/mod_auth_file.c
index eb715b4..a5cc663 100644
--- a/modules/mod_auth_file.c
+++ b/modules/mod_auth_file.c
@@ -2,7 +2,7 @@
  * ProFTPD: mod_auth_file - file-based authentication module that supports
  *                          restrictions on the file contents
  *
- * Copyright (c) 2002-2014 The ProFTPD Project team
+ * Copyright (c) 2002-2015 The ProFTPD Project team
  *
  * 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
@@ -22,8 +22,6 @@
  * copyright holders give permission to link this program with OpenSSL, and
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
- *
- * $Id: mod_auth_file.c,v 1.58 2014/01/22 06:39:59 castaglia Exp $
  */
 
 #include "conf.h"
@@ -172,7 +170,11 @@ static int af_check_file(pool *p, const char *name, const char *path,
     memset(buf, '\0', sizeof(buf));
     res = pr_fsio_readlink(path, buf, sizeof(buf)-1);
     if (res > 0) {
-      path = pstrdup(p, buf);
+
+      /* The path contained in the symlink might itself be relative, thus
+       * we need to make sure that we get an absolute path (Bug#4145).
+       */
+      path = dir_abs_path(p, buf, FALSE);
     }
 
     res = stat(orig_path, &st);
diff --git a/modules/mod_auth_pam.c b/modules/mod_auth_pam.c
index 33ecedd..2447e86 100644
--- a/modules/mod_auth_pam.c
+++ b/modules/mod_auth_pam.c
@@ -35,7 +35,7 @@
  *
  * -- DO NOT MODIFY THE TWO LINES BELOW --
  * $Libraries: -lpam$
- * $Id: mod_auth_pam.c,v 1.30 2013/10/13 17:34:01 castaglia Exp $
+ * $Id: mod_auth_pam.c,v 1.30 2013-10-13 17:34:01 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_auth_unix.c b/modules/mod_auth_unix.c
index a0e5098..8a4c074 100644
--- a/modules/mod_auth_unix.c
+++ b/modules/mod_auth_unix.c
@@ -25,7 +25,7 @@
  */
 
 /* Unix authentication module for ProFTPD
- * $Id: mod_auth_unix.c,v 1.61 2013/10/13 17:34:01 castaglia Exp $
+ * $Id: mod_auth_unix.c,v 1.61 2013-10-13 17:34:01 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_cap.c b/modules/mod_cap.c
index 0c9786a..7824899 100644
--- a/modules/mod_cap.c
+++ b/modules/mod_cap.c
@@ -32,7 +32,7 @@
  * -- DO NOT MODIFY THE TWO LINES BELOW --
  * $Libraries: -L$(top_srcdir)/lib/libcap -lcap$
  * $Directories: $(top_srcdir)/lib/libcap$
- * $Id: mod_cap.c,v 1.35 2013/10/13 17:34:01 castaglia Exp $
+ * $Id: mod_cap.c,v 1.35 2013-10-13 17:34:01 castaglia Exp $
  */
 
 #include <stdio.h>
diff --git a/modules/mod_core.c b/modules/mod_core.c
index e33ee11..7659630 100644
--- a/modules/mod_core.c
+++ b/modules/mod_core.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2014 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -24,9 +24,7 @@
  * the source code for OpenSSL in the source distribution.
  */
 
-/* Core FTPD module
- * $Id: mod_core.c,v 1.461 2014/05/03 22:18:12 castaglia Exp $
- */
+/* Core FTPD module */
 
 #include "conf.h"
 #include "privs.h"
@@ -1925,7 +1923,7 @@ MODRET set_allowdenyfilter(cmd_rec *cmd) {
 
   c = add_config_param(cmd->argv[0], 1, pre);
   c->flags |= CF_MERGEDOWN;
-  return HANDLED(cmd);
+  return PR_HANDLED(cmd);
 
 #else /* no regular expression support at the moment */
   CONF_ERROR(cmd, pstrcat(cmd->tmp_pool, "The ", cmd->argv[0],
diff --git a/modules/mod_ctrls.c b/modules/mod_ctrls.c
index 663d596..1c7a8ea 100644
--- a/modules/mod_ctrls.c
+++ b/modules/mod_ctrls.c
@@ -27,7 +27,7 @@
  * This is mod_ctrls, contrib software for proftpd 1.2 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_ctrls.c,v 1.59 2013/12/05 00:11:01 castaglia Exp $
+ * $Id: mod_ctrls.c,v 1.59 2013-12-05 00:11:01 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_delay.c b/modules/mod_delay.c
index 3a1cc6d..9f11b3e 100644
--- a/modules/mod_delay.c
+++ b/modules/mod_delay.c
@@ -26,7 +26,7 @@
  * This is mod_delay, contrib software for proftpd 1.2.10 and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_delay.c,v 1.73 2014/02/09 20:42:23 castaglia Exp $
+ * $Id: mod_delay.c,v 1.73 2014-02-09 20:42:23 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_dso.c b/modules/mod_dso.c
index 0058fee..70710cc 100644
--- a/modules/mod_dso.c
+++ b/modules/mod_dso.c
@@ -25,7 +25,7 @@
  * This is mod_dso, contrib software for proftpd 1.3.x.
  * For more information contact TJ Saunders <tj at castaglia.org>.
  *
- * $Id: mod_dso.c,v 1.33 2013/10/13 23:46:43 castaglia Exp $
+ * $Id: mod_dso.c,v 1.33 2013-10-13 23:46:43 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_facl.c b/modules/mod_facl.c
index a8de477..c39612d 100644
--- a/modules/mod_facl.c
+++ b/modules/mod_facl.c
@@ -23,7 +23,7 @@
  */
 
 /* POSIX ACL checking code (aka POSIX.1e hell)
- * $Id: mod_facl.c,v 1.17 2014/05/04 19:26:26 castaglia Exp $
+ * $Id: mod_facl.c,v 1.17 2014-05-04 19:26:26 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_facts.c b/modules/mod_facts.c
index ce5c651..7291f4d 100644
--- a/modules/mod_facts.c
+++ b/modules/mod_facts.c
@@ -22,7 +22,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_facts.c,v 1.60 2013/04/16 16:04:43 castaglia Exp $
+ * $Id: mod_facts.c,v 1.60 2013-04-16 16:04:43 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_ident.c b/modules/mod_ident.c
index 199826b..c54d09c 100644
--- a/modules/mod_ident.c
+++ b/modules/mod_ident.c
@@ -22,7 +22,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_ident.c,v 1.11 2013/02/15 22:50:54 castaglia Exp $
+ * $Id: mod_ident.c,v 1.11 2013-02-15 22:50:54 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_lang.c b/modules/mod_lang.c
index 092b3dd..485d01f 100644
--- a/modules/mod_lang.c
+++ b/modules/mod_lang.c
@@ -22,7 +22,7 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * $Id: mod_lang.c,v 1.41 2013/10/13 17:34:01 castaglia Exp $
+ * $Id: mod_lang.c,v 1.41 2013-10-13 17:34:01 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_log.c b/modules/mod_log.c
index 3c915be..38f2cd1 100644
--- a/modules/mod_log.c
+++ b/modules/mod_log.c
@@ -25,7 +25,7 @@
  */
 
 /* Flexible logging module for proftpd
- * $Id: mod_log.c,v 1.155 2013/11/11 01:34:04 castaglia Exp $
+ * $Id: mod_log.c,v 1.155 2013-11-11 01:34:04 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_ls.c b/modules/mod_ls.c
index 5b95d2b..e55f1e4 100644
--- a/modules/mod_ls.c
+++ b/modules/mod_ls.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* Directory listing module for ProFTPD.
- * $Id: mod_ls.c,v 1.207 2014/01/20 19:36:27 castaglia Exp $
+ * $Id: mod_ls.c,v 1.207 2014-01-20 19:36:27 castaglia Exp $
  */
 
 #include "conf.h"
@@ -322,10 +322,17 @@ static int sendline(int flags, char *fmt, ...) {
     listbuflen = (listbuf_ptr - listbuf) + strlen(listbuf_ptr);
 
     if (listbuflen > 0) {
+      int using_ascii = FALSE;
+
       /* Make sure the ASCII flags are cleared from the session flags,
        * so that the pr_data_xfer() function does not try to perform
        * ASCII translation on this data.
        */
+      if (session.sf_flags & SF_ASCII) {
+        using_ascii = TRUE;
+      }
+
+      session.sf_flags &= ~SF_ASCII;
       session.sf_flags &= ~SF_ASCII_OVERRIDE;
 
       res = pr_data_xfer(listbuf, listbuflen);
@@ -341,6 +348,9 @@ static int sendline(int flags, char *fmt, ...) {
           strerror(xerrno));
       }
 
+      if (using_ascii) {
+        session.sf_flags |= SF_ASCII;
+      }
       session.sf_flags |= SF_ASCII_OVERRIDE;
 
       memset(listbuf, '\0', listbufsz);
@@ -1534,7 +1544,7 @@ static void parse_list_opts(char **opt, int *glob_flags, int handle_plus_opts) {
       /* Options are found; skip past the leading whitespace. */
       *opt = ptr;
 
-    } else if (*(*opt + 1) == ' ') {
+    } else if (**opt && *(*opt + 1) == ' ') {
       /* If the next character is a blank space, advance just one character. */
       (*opt)++;
       break;
@@ -1644,7 +1654,7 @@ static void parse_list_opts(char **opt, int *glob_flags, int handle_plus_opts) {
       /* Options are found; skip past the leading whitespace. */
       *opt = ptr;
 
-    } else if (*(*opt + 1) == ' ') {
+    } else if (**opt && *(*opt + 1) == ' ') {
       /* If the next character is a blank space, advance just one character. */
       (*opt)++;
       break;
@@ -2465,10 +2475,7 @@ MODRET ls_stat(cmd_rec *cmd) {
   config_rec *c = NULL;
 
   if (cmd->argc == 1) {
-
-    /* In this case, the client is requesting the current session
-     * status.
-     */
+    /* In this case, the client is requesting the current session status. */
 
     if (!dir_check(cmd->tmp_pool, cmd, cmd->group, session.cwd, NULL)) {
       pr_response_add_err(R_500, "%s: %s", cmd->argv[0], strerror(EPERM));
@@ -2488,8 +2495,7 @@ MODRET ls_stat(cmd_rec *cmd) {
     }
 
     if (session.sf_flags & SF_XFER) {
-      /* Report on the data transfer attributes.
-       */
+      /* Report on the data transfer attributes. */
 
       pr_response_add(R_DUP, _("%s from %s port %u"),
         (session.sf_flags & SF_PASSIVE) ?
@@ -2533,8 +2539,9 @@ MODRET ls_stat(cmd_rec *cmd) {
   }
 
   tmp = get_param_ptr(TOPLEVEL_CONF, "ShowSymlinks", FALSE);
-  if (tmp != NULL)
+  if (tmp != NULL) {
     list_show_symlinks = *tmp;
+  }
 
   list_strict_opts = FALSE;
   list_ndepth.max = list_nfiles.max = list_ndirs.max = 0;
@@ -2571,8 +2578,9 @@ MODRET ls_stat(cmd_rec *cmd) {
      * layer deeper.  For the checks to work, the maxdepth of 2 needs to
      * handled internally as a maxdepth of 3.
      */
-    if (list_ndepth.max)
+    if (list_ndepth.max) {
       list_ndepth.max += 1;
+    }
 
     list_nfiles.max = *((unsigned int *) c->argv[3]);
     list_ndirs.max = *((unsigned int *) c->argv[4]);
@@ -2606,8 +2614,9 @@ MODRET ls_stat(cmd_rec *cmd) {
   }
 
   tmp = get_param_ptr(TOPLEVEL_CONF, "TimesGMT", FALSE);
-  if (tmp != NULL)
+  if (tmp != NULL) {
     list_times_gmt = *tmp;
+  }
 
   opt_C = opt_d = opt_F = opt_R = 0;
   opt_a = opt_l = opt_STAT = 1;
@@ -2755,6 +2764,13 @@ MODRET ls_nlst(cmd_rec *cmd) {
     parse_list_opts(&list_options, &glob_flags, TRUE);
   }
 
+  /* If, after parsing out any options, the target string is empty, assume
+   * the current directory (Bug#4069).
+   */
+  if (*target == '\0') {
+    target = pstrdup(cmd->tmp_pool, ".");
+  }
+
   /* If the target starts with '~' ... */
   if (*target == '~') {
     char pb[PR_TUNABLE_PATH_MAX + 1] = {'\0'};
diff --git a/modules/mod_memcache.c b/modules/mod_memcache.c
index c62d7b0..d0888c4 100644
--- a/modules/mod_memcache.c
+++ b/modules/mod_memcache.c
@@ -23,7 +23,7 @@
  * source distribution.
  *
  * $Libraries: -lmemcached -lmemcachedutil$
- * $Id: mod_memcache.c,v 1.21 2013/10/13 17:34:01 castaglia Exp $
+ * $Id: mod_memcache.c,v 1.21 2013-10-13 17:34:01 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_rlimit.c b/modules/mod_rlimit.c
index b6a1812..420bc53 100644
--- a/modules/mod_rlimit.c
+++ b/modules/mod_rlimit.c
@@ -23,7 +23,7 @@
  */
 
 /* Resource limit module
- * $Id: mod_rlimit.c,v 1.8 2014/01/31 17:29:27 castaglia Exp $
+ * $Id: mod_rlimit.c,v 1.8 2014-01-31 17:29:27 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_site.c b/modules/mod_site.c
index c530cac..9ae5310 100644
--- a/modules/mod_site.c
+++ b/modules/mod_site.c
@@ -24,7 +24,7 @@
  */
 
 /* "SITE" commands module for ProFTPD
- * $Id: mod_site.c,v 1.58 2013/10/07 05:51:30 castaglia Exp $
+ * $Id: mod_site.c,v 1.58 2013-10-07 05:51:30 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/modules/mod_xfer.c b/modules/mod_xfer.c
index bcfb487..f09046d 100644
--- a/modules/mod_xfer.c
+++ b/modules/mod_xfer.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2014 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -24,10 +24,7 @@
  * the source code for OpenSSL in the source distribution.
  */
 
-/* Data transfer module for ProFTPD
- *
- * $Id: mod_xfer.c,v 1.334 2014/04/28 17:11:18 castaglia Exp $
- */
+/* Data transfer module for ProFTPD */
 
 #include "conf.h"
 #include "privs.h"
@@ -54,7 +51,7 @@ static pr_fh_t *retr_fh = NULL;
 static pr_fh_t *stor_fh = NULL;
 static pr_fh_t *displayfilexfer_fh = NULL;
 
-static unsigned char have_prot = FALSE;
+static unsigned char have_rfc2228_data = FALSE;
 static unsigned char have_zmode = FALSE;
 static unsigned char use_sendfile = TRUE;
 static off_t use_sendfile_len = 0;
@@ -610,7 +607,7 @@ static int transmit_sendfile(off_t data_len, off_t *data_offset,
   if (pr_throttle_have_rate() ||
      !(session.xfer.file_size - data_len) ||
      (session.sf_flags & (SF_ASCII|SF_ASCII_OVERRIDE)) ||
-     have_prot || have_zmode ||
+     have_rfc2228_data || have_zmode ||
      !use_sendfile) {
 
     if (!xfer_logged_sendfile_decline_msg) {
@@ -625,7 +622,7 @@ static int transmit_sendfile(off_t data_len, off_t *data_offset,
       } else if (session.sf_flags & (SF_ASCII|SF_ASCII_OVERRIDE)) {
         pr_log_debug(DEBUG10, "declining use of sendfile for ASCII data");
 
-      } else if (have_prot) {
+      } else if (have_rfc2228_data) {
         pr_log_debug(DEBUG10, "declining use of sendfile due to RFC2228 data "
           "channel protections");
 
@@ -971,7 +968,7 @@ static void stor_abort(void) {
 
   } else if (session.xfer.path) {
     delete_stores = get_param_ptr(CURRENT_CONF, "DeleteAbortedStores", FALSE);
-    if (delete_stores == NULL ||
+    if (delete_stores != NULL &&
         *delete_stores == TRUE) {
       pr_log_debug(DEBUG5, "removing aborted file '%s'", session.xfer.path);
       pr_fsio_unlink(session.xfer.path);
@@ -1153,10 +1150,10 @@ MODRET xfer_post_prot(cmd_rec *cmd) {
   CHECK_CMD_ARGS(cmd, 2);
 
   if (strncmp(cmd->argv[1], "C", 2) != 0) {
-    have_prot = TRUE;
+    have_rfc2228_data = TRUE;
 
   } else {
-    have_prot = FALSE;
+    have_rfc2228_data = FALSE;
   }
 
   return PR_DECLINED(cmd);
@@ -3051,7 +3048,7 @@ MODRET set_transferpriority(cmd_rec *cmd) {
   *((int *) c->argv[1]) = prio;
   c->flags |= CF_MERGEDOWN;
 
-  return HANDLED(cmd);
+  return PR_HANDLED(cmd);
 }
 
 /* usage: TransferRate cmds kbps[:free-bytes] ["user"|"group"|"class"
@@ -3421,6 +3418,15 @@ static int xfer_sess_init(void) {
     }
   }
 
+  /* IF the RFC2228 mechanism is "TLS" at this point in time, then set the flag
+   * to disable use of sendfile; the client is probably an FTPS client using
+   * implicit SSL (Bug#4073).
+   */
+  if (session.rfc2228_mech != NULL &&
+      strncmp(session.rfc2228_mech, "TLS", 4) == 0) {
+    have_rfc2228_data = TRUE;
+  }
+
   return 0;
 }
 
diff --git a/src/Makefile.in b/src/Makefile.in
index b26cbf3..c9e4702 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -27,964 +27,3 @@ clean:
 depend:
 	makedepend $(CPPFLAGS) -Y *.c 2>/dev/null
 	makedepend $(CPPFLAGS) -Y -fMakefile.in *.c 2>/dev/null
-# DO NOT DELETE
-
-auth.o: ../include/conf.h ../include/version.h ../config.h
-auth.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-auth.o: ../include/str.h ../include/ascii.h ../include/table.h
-auth.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-auth.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-auth.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-auth.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-auth.o: ../include/stash.h ../include/auth.h ../include/response.h
-auth.o: ../include/timers.h ../include/inet.h ../include/child.h
-auth.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-auth.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-auth.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-auth.o: ../include/data.h ../include/display.h ../include/libsupp.h
-auth.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-auth.o: ../include/ctrls.h ../include/session.h ../include/event.h
-auth.o: ../include/var.h ../include/throttle.h ../include/trace.h
-auth.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-auth.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-auth.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-bindings.o: ../include/conf.h ../include/version.h ../config.h
-bindings.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-bindings.o: ../include/str.h ../include/ascii.h ../include/table.h
-bindings.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-bindings.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-bindings.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-bindings.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-bindings.o: ../include/stash.h ../include/auth.h ../include/response.h
-bindings.o: ../include/timers.h ../include/inet.h ../include/child.h
-bindings.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-bindings.o: ../include/help.h ../include/feat.h ../include/ftp.h
-bindings.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-bindings.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-bindings.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-bindings.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-bindings.o: ../include/event.h ../include/var.h ../include/throttle.h
-bindings.o: ../include/trace.h ../include/encode.h ../include/compat.h
-bindings.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-bindings.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-child.o: ../include/conf.h ../include/version.h ../config.h
-child.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-child.o: ../include/str.h ../include/ascii.h ../include/table.h
-child.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-child.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-child.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-child.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-child.o: ../include/stash.h ../include/auth.h ../include/response.h
-child.o: ../include/timers.h ../include/inet.h ../include/child.h
-child.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-child.o: ../include/help.h ../include/feat.h ../include/ftp.h
-child.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-child.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-child.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-child.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-child.o: ../include/event.h ../include/var.h ../include/throttle.h
-child.o: ../include/trace.h ../include/encode.h ../include/compat.h
-child.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-child.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-class.o: ../include/conf.h ../include/version.h ../config.h
-class.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-class.o: ../include/str.h ../include/ascii.h ../include/table.h
-class.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-class.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-class.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-class.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-class.o: ../include/stash.h ../include/auth.h ../include/response.h
-class.o: ../include/timers.h ../include/inet.h ../include/child.h
-class.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-class.o: ../include/help.h ../include/feat.h ../include/ftp.h
-class.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-class.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-class.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-class.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-class.o: ../include/event.h ../include/var.h ../include/throttle.h
-class.o: ../include/trace.h ../include/encode.h ../include/compat.h
-class.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-class.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-cmd.o: ../include/conf.h ../include/version.h ../config.h
-cmd.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-cmd.o: ../include/str.h ../include/ascii.h ../include/table.h
-cmd.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-cmd.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-cmd.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-cmd.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-cmd.o: ../include/stash.h ../include/auth.h ../include/response.h
-cmd.o: ../include/timers.h ../include/inet.h ../include/child.h
-cmd.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-cmd.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-cmd.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-cmd.o: ../include/data.h ../include/display.h ../include/libsupp.h
-cmd.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-cmd.o: ../include/ctrls.h ../include/session.h ../include/event.h
-cmd.o: ../include/var.h ../include/throttle.h ../include/trace.h
-cmd.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-cmd.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-cmd.o: ../include/memcache.h ../include/tpl.h
-ctrls.o: ../include/conf.h ../include/version.h ../config.h
-ctrls.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-ctrls.o: ../include/str.h ../include/ascii.h ../include/table.h
-ctrls.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-ctrls.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-ctrls.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-ctrls.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-ctrls.o: ../include/stash.h ../include/auth.h ../include/response.h
-ctrls.o: ../include/timers.h ../include/inet.h ../include/child.h
-ctrls.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-ctrls.o: ../include/help.h ../include/feat.h ../include/ftp.h
-ctrls.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-ctrls.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-ctrls.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-ctrls.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-ctrls.o: ../include/event.h ../include/var.h ../include/throttle.h
-ctrls.o: ../include/trace.h ../include/encode.h ../include/compat.h
-ctrls.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-ctrls.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-ctrls.o: ../include/privs.h
-data.o: ../include/conf.h ../include/version.h ../config.h
-data.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-data.o: ../include/str.h ../include/ascii.h ../include/table.h
-data.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-data.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-data.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-data.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-data.o: ../include/stash.h ../include/auth.h ../include/response.h
-data.o: ../include/timers.h ../include/inet.h ../include/child.h
-data.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-data.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-data.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-data.o: ../include/data.h ../include/display.h ../include/libsupp.h
-data.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-data.o: ../include/ctrls.h ../include/session.h ../include/event.h
-data.o: ../include/var.h ../include/throttle.h ../include/trace.h
-data.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-data.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-data.o: ../include/memcache.h ../include/tpl.h
-dirtree.o: ../include/conf.h ../include/version.h ../config.h
-dirtree.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-dirtree.o: ../include/str.h ../include/ascii.h ../include/table.h
-dirtree.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-dirtree.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-dirtree.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-dirtree.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-dirtree.o: ../include/stash.h ../include/auth.h ../include/response.h
-dirtree.o: ../include/timers.h ../include/inet.h ../include/child.h
-dirtree.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-dirtree.o: ../include/help.h ../include/feat.h ../include/ftp.h
-dirtree.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-dirtree.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-dirtree.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-dirtree.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-dirtree.o: ../include/event.h ../include/var.h ../include/throttle.h
-dirtree.o: ../include/trace.h ../include/encode.h ../include/compat.h
-dirtree.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-dirtree.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-dirtree.o: ../include/privs.h
-display.o: ../include/conf.h ../include/version.h ../config.h
-display.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-display.o: ../include/str.h ../include/ascii.h ../include/table.h
-display.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-display.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-display.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-display.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-display.o: ../include/stash.h ../include/auth.h ../include/response.h
-display.o: ../include/timers.h ../include/inet.h ../include/child.h
-display.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-display.o: ../include/help.h ../include/feat.h ../include/ftp.h
-display.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-display.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-display.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-display.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-display.o: ../include/event.h ../include/var.h ../include/throttle.h
-display.o: ../include/trace.h ../include/encode.h ../include/compat.h
-display.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-display.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-encode.o: ../include/conf.h ../include/version.h ../config.h
-encode.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-encode.o: ../include/str.h ../include/ascii.h ../include/table.h
-encode.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-encode.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-encode.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-encode.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-encode.o: ../include/stash.h ../include/auth.h ../include/response.h
-encode.o: ../include/timers.h ../include/inet.h ../include/child.h
-encode.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-encode.o: ../include/help.h ../include/feat.h ../include/ftp.h
-encode.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-encode.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-encode.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-encode.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-encode.o: ../include/event.h ../include/var.h ../include/throttle.h
-encode.o: ../include/trace.h ../include/encode.h ../include/compat.h
-encode.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-encode.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-env.o: ../include/conf.h ../include/version.h ../config.h
-env.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-env.o: ../include/str.h ../include/ascii.h ../include/table.h
-env.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-env.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-env.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-env.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-env.o: ../include/stash.h ../include/auth.h ../include/response.h
-env.o: ../include/timers.h ../include/inet.h ../include/child.h
-env.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-env.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-env.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-env.o: ../include/data.h ../include/display.h ../include/libsupp.h
-env.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-env.o: ../include/ctrls.h ../include/session.h ../include/event.h
-env.o: ../include/var.h ../include/throttle.h ../include/trace.h
-env.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-env.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-env.o: ../include/memcache.h ../include/tpl.h
-event.o: ../include/conf.h ../include/version.h ../config.h
-event.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-event.o: ../include/str.h ../include/ascii.h ../include/table.h
-event.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-event.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-event.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-event.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-event.o: ../include/stash.h ../include/auth.h ../include/response.h
-event.o: ../include/timers.h ../include/inet.h ../include/child.h
-event.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-event.o: ../include/help.h ../include/feat.h ../include/ftp.h
-event.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-event.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-event.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-event.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-event.o: ../include/event.h ../include/var.h ../include/throttle.h
-event.o: ../include/trace.h ../include/encode.h ../include/compat.h
-event.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-event.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-expr.o: ../include/conf.h ../include/version.h ../config.h
-expr.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-expr.o: ../include/str.h ../include/ascii.h ../include/table.h
-expr.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-expr.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-expr.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-expr.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-expr.o: ../include/stash.h ../include/auth.h ../include/response.h
-expr.o: ../include/timers.h ../include/inet.h ../include/child.h
-expr.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-expr.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-expr.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-expr.o: ../include/data.h ../include/display.h ../include/libsupp.h
-expr.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-expr.o: ../include/ctrls.h ../include/session.h ../include/event.h
-expr.o: ../include/var.h ../include/throttle.h ../include/trace.h
-expr.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-expr.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-expr.o: ../include/memcache.h ../include/tpl.h
-feat.o: ../include/conf.h ../include/version.h ../config.h
-feat.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-feat.o: ../include/str.h ../include/ascii.h ../include/table.h
-feat.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-feat.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-feat.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-feat.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-feat.o: ../include/stash.h ../include/auth.h ../include/response.h
-feat.o: ../include/timers.h ../include/inet.h ../include/child.h
-feat.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-feat.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-feat.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-feat.o: ../include/data.h ../include/display.h ../include/libsupp.h
-feat.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-feat.o: ../include/ctrls.h ../include/session.h ../include/event.h
-feat.o: ../include/var.h ../include/throttle.h ../include/trace.h
-feat.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-feat.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-feat.o: ../include/memcache.h ../include/tpl.h
-filter.o: ../include/conf.h ../include/version.h ../config.h
-filter.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-filter.o: ../include/str.h ../include/ascii.h ../include/table.h
-filter.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-filter.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-filter.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-filter.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-filter.o: ../include/stash.h ../include/auth.h ../include/response.h
-filter.o: ../include/timers.h ../include/inet.h ../include/child.h
-filter.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-filter.o: ../include/help.h ../include/feat.h ../include/ftp.h
-filter.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-filter.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-filter.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-filter.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-filter.o: ../include/event.h ../include/var.h ../include/throttle.h
-filter.o: ../include/trace.h ../include/encode.h ../include/compat.h
-filter.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-filter.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-fsio.o: ../include/conf.h ../include/version.h ../config.h
-fsio.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-fsio.o: ../include/str.h ../include/ascii.h ../include/table.h
-fsio.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-fsio.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-fsio.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-fsio.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-fsio.o: ../include/stash.h ../include/auth.h ../include/response.h
-fsio.o: ../include/timers.h ../include/inet.h ../include/child.h
-fsio.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-fsio.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-fsio.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-fsio.o: ../include/data.h ../include/display.h ../include/libsupp.h
-fsio.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-fsio.o: ../include/ctrls.h ../include/session.h ../include/event.h
-fsio.o: ../include/var.h ../include/throttle.h ../include/trace.h
-fsio.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-fsio.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-fsio.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-ftpdctl.o: ../include/conf.h ../include/version.h ../config.h
-ftpdctl.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-ftpdctl.o: ../include/str.h ../include/ascii.h ../include/table.h
-ftpdctl.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-ftpdctl.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-ftpdctl.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-ftpdctl.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-ftpdctl.o: ../include/stash.h ../include/auth.h ../include/response.h
-ftpdctl.o: ../include/timers.h ../include/inet.h ../include/child.h
-ftpdctl.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-ftpdctl.o: ../include/help.h ../include/feat.h ../include/ftp.h
-ftpdctl.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-ftpdctl.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-ftpdctl.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-ftpdctl.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-ftpdctl.o: ../include/event.h ../include/var.h ../include/throttle.h
-ftpdctl.o: ../include/trace.h ../include/encode.h ../include/compat.h
-ftpdctl.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-ftpdctl.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-ftpdctl.o: ../include/privs.h
-help.o: ../include/conf.h ../include/version.h ../config.h
-help.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-help.o: ../include/str.h ../include/ascii.h ../include/table.h
-help.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-help.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-help.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-help.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-help.o: ../include/stash.h ../include/auth.h ../include/response.h
-help.o: ../include/timers.h ../include/inet.h ../include/child.h
-help.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-help.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-help.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-help.o: ../include/data.h ../include/display.h ../include/libsupp.h
-help.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-help.o: ../include/ctrls.h ../include/session.h ../include/event.h
-help.o: ../include/var.h ../include/throttle.h ../include/trace.h
-help.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-help.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-help.o: ../include/memcache.h ../include/tpl.h
-inet.o: ../include/conf.h ../include/version.h ../config.h
-inet.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-inet.o: ../include/str.h ../include/ascii.h ../include/table.h
-inet.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-inet.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-inet.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-inet.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-inet.o: ../include/stash.h ../include/auth.h ../include/response.h
-inet.o: ../include/timers.h ../include/inet.h ../include/child.h
-inet.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-inet.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-inet.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-inet.o: ../include/data.h ../include/display.h ../include/libsupp.h
-inet.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-inet.o: ../include/ctrls.h ../include/session.h ../include/event.h
-inet.o: ../include/var.h ../include/throttle.h ../include/trace.h
-inet.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-inet.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-inet.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-lastlog.o: ../include/conf.h ../include/version.h ../config.h
-lastlog.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-lastlog.o: ../include/str.h ../include/ascii.h ../include/table.h
-lastlog.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-lastlog.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-lastlog.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-lastlog.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-lastlog.o: ../include/stash.h ../include/auth.h ../include/response.h
-lastlog.o: ../include/timers.h ../include/inet.h ../include/child.h
-lastlog.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-lastlog.o: ../include/help.h ../include/feat.h ../include/ftp.h
-lastlog.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-lastlog.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-lastlog.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-lastlog.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-lastlog.o: ../include/event.h ../include/var.h ../include/throttle.h
-lastlog.o: ../include/trace.h ../include/encode.h ../include/compat.h
-lastlog.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-lastlog.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-log.o: ../include/conf.h ../include/version.h ../config.h
-log.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-log.o: ../include/str.h ../include/ascii.h ../include/table.h
-log.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-log.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-log.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-log.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-log.o: ../include/stash.h ../include/auth.h ../include/response.h
-log.o: ../include/timers.h ../include/inet.h ../include/child.h
-log.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-log.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-log.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-log.o: ../include/data.h ../include/display.h ../include/libsupp.h
-log.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-log.o: ../include/ctrls.h ../include/session.h ../include/event.h
-log.o: ../include/var.h ../include/throttle.h ../include/trace.h
-log.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-log.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-log.o: ../include/memcache.h ../include/tpl.h
-main.o: ../include/conf.h ../include/version.h ../config.h
-main.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-main.o: ../include/str.h ../include/ascii.h ../include/table.h
-main.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-main.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-main.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-main.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-main.o: ../include/stash.h ../include/auth.h ../include/response.h
-main.o: ../include/timers.h ../include/inet.h ../include/child.h
-main.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-main.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-main.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-main.o: ../include/data.h ../include/display.h ../include/libsupp.h
-main.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-main.o: ../include/ctrls.h ../include/session.h ../include/event.h
-main.o: ../include/var.h ../include/throttle.h ../include/trace.h
-main.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-main.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-main.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-memcache.o: ../include/conf.h ../include/version.h ../config.h
-memcache.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-memcache.o: ../include/str.h ../include/ascii.h ../include/table.h
-memcache.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-memcache.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-memcache.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-memcache.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-memcache.o: ../include/stash.h ../include/auth.h ../include/response.h
-memcache.o: ../include/timers.h ../include/inet.h ../include/child.h
-memcache.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-memcache.o: ../include/help.h ../include/feat.h ../include/ftp.h
-memcache.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-memcache.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-memcache.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-memcache.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-memcache.o: ../include/event.h ../include/var.h ../include/throttle.h
-memcache.o: ../include/trace.h ../include/encode.h ../include/compat.h
-memcache.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-memcache.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mkhome.o: ../include/conf.h ../include/version.h ../config.h
-mkhome.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-mkhome.o: ../include/str.h ../include/ascii.h ../include/table.h
-mkhome.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-mkhome.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-mkhome.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-mkhome.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-mkhome.o: ../include/stash.h ../include/auth.h ../include/response.h
-mkhome.o: ../include/timers.h ../include/inet.h ../include/child.h
-mkhome.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-mkhome.o: ../include/help.h ../include/feat.h ../include/ftp.h
-mkhome.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-mkhome.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-mkhome.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-mkhome.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-mkhome.o: ../include/event.h ../include/var.h ../include/throttle.h
-mkhome.o: ../include/trace.h ../include/encode.h ../include/compat.h
-mkhome.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-mkhome.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-mkhome.o: ../include/privs.h
-modules.o: ../include/conf.h ../include/version.h ../config.h
-modules.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-modules.o: ../include/str.h ../include/ascii.h ../include/table.h
-modules.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-modules.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-modules.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-modules.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-modules.o: ../include/stash.h ../include/auth.h ../include/response.h
-modules.o: ../include/timers.h ../include/inet.h ../include/child.h
-modules.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-modules.o: ../include/help.h ../include/feat.h ../include/ftp.h
-modules.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-modules.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-modules.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-modules.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-modules.o: ../include/event.h ../include/var.h ../include/throttle.h
-modules.o: ../include/trace.h ../include/encode.h ../include/compat.h
-modules.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-modules.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-netacl.o: ../include/conf.h ../include/version.h ../config.h
-netacl.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-netacl.o: ../include/str.h ../include/ascii.h ../include/table.h
-netacl.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-netacl.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-netacl.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-netacl.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-netacl.o: ../include/stash.h ../include/auth.h ../include/response.h
-netacl.o: ../include/timers.h ../include/inet.h ../include/child.h
-netacl.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-netacl.o: ../include/help.h ../include/feat.h ../include/ftp.h
-netacl.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-netacl.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-netacl.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-netacl.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-netacl.o: ../include/event.h ../include/var.h ../include/throttle.h
-netacl.o: ../include/trace.h ../include/encode.h ../include/compat.h
-netacl.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-netacl.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-netaddr.o: ../include/conf.h ../include/version.h ../config.h
-netaddr.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-netaddr.o: ../include/str.h ../include/ascii.h ../include/table.h
-netaddr.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-netaddr.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-netaddr.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-netaddr.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-netaddr.o: ../include/stash.h ../include/auth.h ../include/response.h
-netaddr.o: ../include/timers.h ../include/inet.h ../include/child.h
-netaddr.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-netaddr.o: ../include/help.h ../include/feat.h ../include/ftp.h
-netaddr.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-netaddr.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-netaddr.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-netaddr.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-netaddr.o: ../include/event.h ../include/var.h ../include/throttle.h
-netaddr.o: ../include/trace.h ../include/encode.h ../include/compat.h
-netaddr.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-netaddr.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-netio.o: ../include/conf.h ../include/version.h ../config.h
-netio.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-netio.o: ../include/str.h ../include/ascii.h ../include/table.h
-netio.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-netio.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-netio.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-netio.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-netio.o: ../include/stash.h ../include/auth.h ../include/response.h
-netio.o: ../include/timers.h ../include/inet.h ../include/child.h
-netio.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-netio.o: ../include/help.h ../include/feat.h ../include/ftp.h
-netio.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-netio.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-netio.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-netio.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-netio.o: ../include/event.h ../include/var.h ../include/throttle.h
-netio.o: ../include/trace.h ../include/encode.h ../include/compat.h
-netio.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-netio.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-parser.o: ../include/conf.h ../include/version.h ../config.h
-parser.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-parser.o: ../include/str.h ../include/ascii.h ../include/table.h
-parser.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-parser.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-parser.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-parser.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-parser.o: ../include/stash.h ../include/auth.h ../include/response.h
-parser.o: ../include/timers.h ../include/inet.h ../include/child.h
-parser.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-parser.o: ../include/help.h ../include/feat.h ../include/ftp.h
-parser.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-parser.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-parser.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-parser.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-parser.o: ../include/event.h ../include/var.h ../include/throttle.h
-parser.o: ../include/trace.h ../include/encode.h ../include/compat.h
-parser.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-parser.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-pidfile.o: ../include/conf.h ../include/version.h ../config.h
-pidfile.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-pidfile.o: ../include/str.h ../include/ascii.h ../include/table.h
-pidfile.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-pidfile.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-pidfile.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-pidfile.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-pidfile.o: ../include/stash.h ../include/auth.h ../include/response.h
-pidfile.o: ../include/timers.h ../include/inet.h ../include/child.h
-pidfile.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-pidfile.o: ../include/help.h ../include/feat.h ../include/ftp.h
-pidfile.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-pidfile.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-pidfile.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-pidfile.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-pidfile.o: ../include/event.h ../include/var.h ../include/throttle.h
-pidfile.o: ../include/trace.h ../include/encode.h ../include/compat.h
-pidfile.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-pidfile.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-pidfile.o: ../include/privs.h
-pool.o: ../include/conf.h ../include/version.h ../config.h
-pool.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-pool.o: ../include/str.h ../include/ascii.h ../include/table.h
-pool.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-pool.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-pool.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-pool.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-pool.o: ../include/stash.h ../include/auth.h ../include/response.h
-pool.o: ../include/timers.h ../include/inet.h ../include/child.h
-pool.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-pool.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-pool.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-pool.o: ../include/data.h ../include/display.h ../include/libsupp.h
-pool.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-pool.o: ../include/ctrls.h ../include/session.h ../include/event.h
-pool.o: ../include/var.h ../include/throttle.h ../include/trace.h
-pool.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-pool.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-pool.o: ../include/memcache.h ../include/tpl.h
-privs.o: ../include/conf.h ../include/version.h ../config.h
-privs.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-privs.o: ../include/str.h ../include/ascii.h ../include/table.h
-privs.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-privs.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-privs.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-privs.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-privs.o: ../include/stash.h ../include/auth.h ../include/response.h
-privs.o: ../include/timers.h ../include/inet.h ../include/child.h
-privs.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-privs.o: ../include/help.h ../include/feat.h ../include/ftp.h
-privs.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-privs.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-privs.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-privs.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-privs.o: ../include/event.h ../include/var.h ../include/throttle.h
-privs.o: ../include/trace.h ../include/encode.h ../include/compat.h
-privs.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-privs.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-privs.o: ../include/privs.h
-proctitle.o: ../include/conf.h ../include/version.h ../config.h
-proctitle.o: ../include/default_paths.h ../include/options.h
-proctitle.o: ../include/pool.h ../include/str.h ../include/ascii.h
-proctitle.o: ../include/table.h ../include/proftpd.h ../include/class.h
-proctitle.o: ../include/netacl.h ../include/support.h ../include/sets.h
-proctitle.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-proctitle.o: ../include/filter.h ../include/modules.h ../include/netio.h
-proctitle.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-proctitle.o: ../include/response.h ../include/timers.h ../include/inet.h
-proctitle.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-proctitle.o: ../include/bindings.h ../include/help.h ../include/feat.h
-proctitle.o: ../include/ftp.h ../include/log.h ../include/parser.h
-proctitle.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-proctitle.o: ../include/display.h ../include/libsupp.h
-proctitle.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-proctitle.o: ../include/ctrls.h ../include/session.h ../include/event.h
-proctitle.o: ../include/var.h ../include/throttle.h ../include/trace.h
-proctitle.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-proctitle.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-proctitle.o: ../include/memcache.h ../include/tpl.h
-regexp.o: ../include/conf.h ../include/version.h ../config.h
-regexp.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-regexp.o: ../include/str.h ../include/ascii.h ../include/table.h
-regexp.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-regexp.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-regexp.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-regexp.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-regexp.o: ../include/stash.h ../include/auth.h ../include/response.h
-regexp.o: ../include/timers.h ../include/inet.h ../include/child.h
-regexp.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-regexp.o: ../include/help.h ../include/feat.h ../include/ftp.h
-regexp.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-regexp.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-regexp.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-regexp.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-regexp.o: ../include/event.h ../include/var.h ../include/throttle.h
-regexp.o: ../include/trace.h ../include/encode.h ../include/compat.h
-regexp.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-regexp.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-response.o: ../include/conf.h ../include/version.h ../config.h
-response.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-response.o: ../include/str.h ../include/ascii.h ../include/table.h
-response.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-response.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-response.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-response.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-response.o: ../include/stash.h ../include/auth.h ../include/response.h
-response.o: ../include/timers.h ../include/inet.h ../include/child.h
-response.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-response.o: ../include/help.h ../include/feat.h ../include/ftp.h
-response.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-response.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-response.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-response.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-response.o: ../include/event.h ../include/var.h ../include/throttle.h
-response.o: ../include/trace.h ../include/encode.h ../include/compat.h
-response.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-response.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-rlimit.o: ../include/conf.h ../include/version.h ../config.h
-rlimit.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-rlimit.o: ../include/str.h ../include/ascii.h ../include/table.h
-rlimit.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-rlimit.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-rlimit.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-rlimit.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-rlimit.o: ../include/stash.h ../include/auth.h ../include/response.h
-rlimit.o: ../include/timers.h ../include/inet.h ../include/child.h
-rlimit.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-rlimit.o: ../include/help.h ../include/feat.h ../include/ftp.h
-rlimit.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-rlimit.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-rlimit.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-rlimit.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-rlimit.o: ../include/event.h ../include/var.h ../include/throttle.h
-rlimit.o: ../include/trace.h ../include/encode.h ../include/compat.h
-rlimit.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-rlimit.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-scoreboard.o: ../include/conf.h ../include/version.h ../config.h
-scoreboard.o: ../include/default_paths.h ../include/options.h
-scoreboard.o: ../include/pool.h ../include/str.h ../include/ascii.h
-scoreboard.o: ../include/table.h ../include/proftpd.h ../include/class.h
-scoreboard.o: ../include/netacl.h ../include/support.h ../include/sets.h
-scoreboard.o: ../include/dirtree.h ../include/expr.h ../include/rlimit.h
-scoreboard.o: ../include/filter.h ../include/modules.h ../include/netio.h
-scoreboard.o: ../include/regexp.h ../include/stash.h ../include/auth.h
-scoreboard.o: ../include/response.h ../include/timers.h ../include/inet.h
-scoreboard.o: ../include/child.h ../include/netaddr.h ../include/cmd.h
-scoreboard.o: ../include/bindings.h ../include/help.h ../include/feat.h
-scoreboard.o: ../include/ftp.h ../include/log.h ../include/parser.h
-scoreboard.o: ../include/xferlog.h ../include/scoreboard.h ../include/data.h
-scoreboard.o: ../include/display.h ../include/libsupp.h
-scoreboard.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-scoreboard.o: ../include/ctrls.h ../include/session.h ../include/event.h
-scoreboard.o: ../include/var.h ../include/throttle.h ../include/trace.h
-scoreboard.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-scoreboard.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-scoreboard.o: ../include/memcache.h ../include/tpl.h ../include/privs.h
-session.o: ../include/conf.h ../include/version.h ../config.h
-session.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-session.o: ../include/str.h ../include/ascii.h ../include/table.h
-session.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-session.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-session.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-session.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-session.o: ../include/stash.h ../include/auth.h ../include/response.h
-session.o: ../include/timers.h ../include/inet.h ../include/child.h
-session.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-session.o: ../include/help.h ../include/feat.h ../include/ftp.h
-session.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-session.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-session.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-session.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-session.o: ../include/event.h ../include/var.h ../include/throttle.h
-session.o: ../include/trace.h ../include/encode.h ../include/compat.h
-session.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-session.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-sets.o: ../include/conf.h ../include/version.h ../config.h
-sets.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-sets.o: ../include/str.h ../include/ascii.h ../include/table.h
-sets.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-sets.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-sets.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-sets.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-sets.o: ../include/stash.h ../include/auth.h ../include/response.h
-sets.o: ../include/timers.h ../include/inet.h ../include/child.h
-sets.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-sets.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-sets.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-sets.o: ../include/data.h ../include/display.h ../include/libsupp.h
-sets.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-sets.o: ../include/ctrls.h ../include/session.h ../include/event.h
-sets.o: ../include/var.h ../include/throttle.h ../include/trace.h
-sets.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-sets.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-sets.o: ../include/memcache.h ../include/tpl.h
-stash.o: ../include/conf.h ../include/version.h ../config.h
-stash.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-stash.o: ../include/str.h ../include/ascii.h ../include/table.h
-stash.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-stash.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-stash.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-stash.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-stash.o: ../include/stash.h ../include/auth.h ../include/response.h
-stash.o: ../include/timers.h ../include/inet.h ../include/child.h
-stash.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-stash.o: ../include/help.h ../include/feat.h ../include/ftp.h
-stash.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-stash.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-stash.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-stash.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-stash.o: ../include/event.h ../include/var.h ../include/throttle.h
-stash.o: ../include/trace.h ../include/encode.h ../include/compat.h
-stash.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-stash.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-str.o: ../include/conf.h ../include/version.h ../config.h
-str.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-str.o: ../include/str.h ../include/ascii.h ../include/table.h
-str.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-str.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-str.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-str.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-str.o: ../include/stash.h ../include/auth.h ../include/response.h
-str.o: ../include/timers.h ../include/inet.h ../include/child.h
-str.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-str.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-str.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-str.o: ../include/data.h ../include/display.h ../include/libsupp.h
-str.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-str.o: ../include/ctrls.h ../include/session.h ../include/event.h
-str.o: ../include/var.h ../include/throttle.h ../include/trace.h
-str.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-str.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-str.o: ../include/memcache.h ../include/tpl.h
-support.o: ../include/conf.h ../include/version.h ../config.h
-support.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-support.o: ../include/str.h ../include/ascii.h ../include/table.h
-support.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-support.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-support.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-support.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-support.o: ../include/stash.h ../include/auth.h ../include/response.h
-support.o: ../include/timers.h ../include/inet.h ../include/child.h
-support.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-support.o: ../include/help.h ../include/feat.h ../include/ftp.h
-support.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-support.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-support.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-support.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-support.o: ../include/event.h ../include/var.h ../include/throttle.h
-support.o: ../include/trace.h ../include/encode.h ../include/compat.h
-support.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-support.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-table.o: ../include/conf.h ../include/version.h ../config.h
-table.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-table.o: ../include/str.h ../include/ascii.h ../include/table.h
-table.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-table.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-table.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-table.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-table.o: ../include/stash.h ../include/auth.h ../include/response.h
-table.o: ../include/timers.h ../include/inet.h ../include/child.h
-table.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-table.o: ../include/help.h ../include/feat.h ../include/ftp.h
-table.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-table.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-table.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-table.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-table.o: ../include/event.h ../include/var.h ../include/throttle.h
-table.o: ../include/trace.h ../include/encode.h ../include/compat.h
-table.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-table.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-throttle.o: ../include/conf.h ../include/version.h ../config.h
-throttle.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-throttle.o: ../include/str.h ../include/ascii.h ../include/table.h
-throttle.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-throttle.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-throttle.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-throttle.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-throttle.o: ../include/stash.h ../include/auth.h ../include/response.h
-throttle.o: ../include/timers.h ../include/inet.h ../include/child.h
-throttle.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-throttle.o: ../include/help.h ../include/feat.h ../include/ftp.h
-throttle.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-throttle.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-throttle.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-throttle.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-throttle.o: ../include/event.h ../include/var.h ../include/throttle.h
-throttle.o: ../include/trace.h ../include/encode.h ../include/compat.h
-throttle.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-throttle.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-timers.o: ../include/conf.h ../include/version.h ../config.h
-timers.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-timers.o: ../include/str.h ../include/ascii.h ../include/table.h
-timers.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-timers.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-timers.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-timers.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-timers.o: ../include/stash.h ../include/auth.h ../include/response.h
-timers.o: ../include/timers.h ../include/inet.h ../include/child.h
-timers.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-timers.o: ../include/help.h ../include/feat.h ../include/ftp.h
-timers.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-timers.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-timers.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-timers.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-timers.o: ../include/event.h ../include/var.h ../include/throttle.h
-timers.o: ../include/trace.h ../include/encode.h ../include/compat.h
-timers.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-timers.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-trace.o: ../include/conf.h ../include/version.h ../config.h
-trace.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-trace.o: ../include/str.h ../include/ascii.h ../include/table.h
-trace.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-trace.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-trace.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-trace.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-trace.o: ../include/stash.h ../include/auth.h ../include/response.h
-trace.o: ../include/timers.h ../include/inet.h ../include/child.h
-trace.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-trace.o: ../include/help.h ../include/feat.h ../include/ftp.h
-trace.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-trace.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-trace.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-trace.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-trace.o: ../include/event.h ../include/var.h ../include/throttle.h
-trace.o: ../include/trace.h ../include/encode.h ../include/compat.h
-trace.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-trace.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-trace.o: ../include/privs.h
-var.o: ../include/conf.h ../include/version.h ../config.h
-var.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-var.o: ../include/str.h ../include/ascii.h ../include/table.h
-var.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-var.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-var.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-var.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-var.o: ../include/stash.h ../include/auth.h ../include/response.h
-var.o: ../include/timers.h ../include/inet.h ../include/child.h
-var.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-var.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-var.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-var.o: ../include/data.h ../include/display.h ../include/libsupp.h
-var.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-var.o: ../include/ctrls.h ../include/session.h ../include/event.h
-var.o: ../include/var.h ../include/throttle.h ../include/trace.h
-var.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-var.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-var.o: ../include/memcache.h ../include/tpl.h
-version.o: ../include/conf.h ../include/version.h ../config.h
-version.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-version.o: ../include/str.h ../include/ascii.h ../include/table.h
-version.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-version.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-version.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-version.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-version.o: ../include/stash.h ../include/auth.h ../include/response.h
-version.o: ../include/timers.h ../include/inet.h ../include/child.h
-version.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-version.o: ../include/help.h ../include/feat.h ../include/ftp.h
-version.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-version.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-version.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-version.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-version.o: ../include/event.h ../include/var.h ../include/throttle.h
-version.o: ../include/trace.h ../include/encode.h ../include/compat.h
-version.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-version.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-wtmp.o: ../include/conf.h ../include/version.h ../config.h
-wtmp.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-wtmp.o: ../include/str.h ../include/ascii.h ../include/table.h
-wtmp.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-wtmp.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-wtmp.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-wtmp.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-wtmp.o: ../include/stash.h ../include/auth.h ../include/response.h
-wtmp.o: ../include/timers.h ../include/inet.h ../include/child.h
-wtmp.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-wtmp.o: ../include/help.h ../include/feat.h ../include/ftp.h ../include/log.h
-wtmp.o: ../include/parser.h ../include/xferlog.h ../include/scoreboard.h
-wtmp.o: ../include/data.h ../include/display.h ../include/libsupp.h
-wtmp.o: ../include/glibc-glob.h ../include/fsio.h ../include/mkhome.h
-wtmp.o: ../include/ctrls.h ../include/session.h ../include/event.h
-wtmp.o: ../include/var.h ../include/throttle.h ../include/trace.h
-wtmp.o: ../include/encode.h ../include/compat.h ../include/proctitle.h
-wtmp.o: ../include/pidfile.h ../include/env.h ../include/pr-syslog.h
-wtmp.o: ../include/memcache.h ../include/tpl.h
-xferlog.o: ../include/conf.h ../include/version.h ../config.h
-xferlog.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-xferlog.o: ../include/str.h ../include/ascii.h ../include/table.h
-xferlog.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-xferlog.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-xferlog.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-xferlog.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-xferlog.o: ../include/stash.h ../include/auth.h ../include/response.h
-xferlog.o: ../include/timers.h ../include/inet.h ../include/child.h
-xferlog.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-xferlog.o: ../include/help.h ../include/feat.h ../include/ftp.h
-xferlog.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-xferlog.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-xferlog.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-xferlog.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-xferlog.o: ../include/event.h ../include/var.h ../include/throttle.h
-xferlog.o: ../include/trace.h ../include/encode.h ../include/compat.h
-xferlog.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-xferlog.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
diff --git a/src/auth.c b/src/auth.c
index 50c2089..1ac77fc 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -25,7 +25,7 @@
  */
 
 /* Authentication front-end for ProFTPD
- * $Id: auth.c,v 1.102 2013/11/10 01:56:49 castaglia Exp $
+ * $Id: auth.c,v 1.102 2013-11-10 01:56:49 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/bindings.c b/src/bindings.c
index 775937c..ad84a88 100644
--- a/src/bindings.c
+++ b/src/bindings.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -22,9 +22,7 @@
  * OpenSSL in the source distribution.
  */
 
-/* Routines to work with ProFTPD bindings
- * $Id: bindings.c,v 1.52 2013/11/09 23:34:34 castaglia Exp $
- */
+/* Routines to work with ProFTPD bindings */
 
 #include "conf.h"
 
@@ -719,9 +717,9 @@ int pr_ipbind_open(pr_netaddr_t *addr, unsigned int port, conn_t *listen_conn,
       res = pr_namebind_open(nb->nb_name, nb->nb_server->addr,
         nb->nb_server->ServerPort);
       if (res < 0) {
-        pr_log_pri(PR_LOG_NOTICE,
-          "%s:%d: notice: unable to open namebind '%s': %s", __FILE__,
-          __LINE__, nb->nb_name, strerror(errno));
+        pr_trace_msg(trace_channel, 2,
+          "notice: unable to open namebind '%s': %s", nb->nb_name,
+          strerror(errno));
       }
     }
   }
@@ -1176,13 +1174,13 @@ static int init_standalone_bindings(void) {
 
         res = pr_namebind_open(c->argv[0], serv->addr, serv->ServerPort);
         if (res < 0) {
-          pr_log_pri(PR_LOG_NOTICE,
-            "%s:%d: notice: unable to open namebind '%s': %s", __FILE__,
-            __LINE__, (char *) c->argv[0], strerror(errno));
+          pr_trace_msg(trace_channel, 2, 
+            "notice: unable to open namebind '%s': %s", (char *) c->argv[0],
+            strerror(errno));
         }
 
       } else {
-        pr_log_pri(PR_LOG_NOTICE,
+        pr_trace_msg(trace_channel, 2,
           "unable to create namebind for '%s' to %s#%u: %s",
           (char *) c->argv[0], pr_netaddr_get_ipstr(serv->addr),
           serv->ServerPort, strerror(errno));
diff --git a/src/child.c b/src/child.c
index 3e7ce27..9a1fff8 100644
--- a/src/child.c
+++ b/src/child.c
@@ -23,7 +23,7 @@
  */
 
 /* Children management code
- * $Id: child.c,v 1.9 2013/10/08 07:01:43 castaglia Exp $
+ * $Id: child.c,v 1.9 2013-10-08 07:01:43 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/class.c b/src/class.c
index 329c059..cb5cac0 100644
--- a/src/class.c
+++ b/src/class.c
@@ -23,7 +23,7 @@
  */
 
 /* Class routines
- * $Id: class.c,v 1.10 2011/05/23 21:22:24 castaglia Exp $
+ * $Id: class.c,v 1.10 2011-05-23 21:22:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/cmd.c b/src/cmd.c
index b441c54..f940088 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -21,7 +21,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: cmd.c,v 1.12 2012/12/28 17:40:36 castaglia Exp $
+ * $Id: cmd.c,v 1.12 2012-12-28 17:40:36 castaglia Exp $
  */
 
 #include "conf.h"
@@ -112,6 +112,38 @@ static struct cmd_entry cmd_ids[] = {
   { NULL,	0 }
 };
 
+/* Due to potential XSS issues (see Bug#4143), we want to explicitly
+ * check for commands from other text-based protocols (e.g. HTTP and SMTP);
+ * if we see these, we want to close the connection with extreme prejudice.
+ */
+
+static struct cmd_entry http_ids[] = {
+  { " ",	1 },    /* Index 0 is intentionally filled with a sentinel */
+  { "CONNECT",	7 },
+  { "DELETE",	6 },
+  { "GET",	3 },
+  { "HEAD",	4 },
+  { "OPTIONS",	7 },
+  { "PATCH",	5 },
+  { "POST",	4 },
+  { "PUT",	3 },
+
+  { NULL,	0 }
+};
+
+static struct cmd_entry smtp_ids[] = {
+  { " ",	1 },    /* Index 0 is intentionally filled with a sentinel */
+  { "DATA",	4 },
+  { "EHLO",	4 },
+  { "HELO",	4 },
+  { "MAIL",	4 },
+  { "RCPT",	4 },
+  { "RSET",	4 },
+  { "VRFY",	4 },
+
+  { NULL,	0 }
+};
+
 cmd_rec *pr_cmd_alloc(pool *p, int argc, ...) { 
   pool *newpool = NULL;
   cmd_rec *cmd = NULL;
@@ -340,3 +372,58 @@ int pr_cmd_get_id(const char *cmd_name) {
   errno = ENOENT;
   return -1;
 }
+
+static int is_known_cmd(struct cmd_entry *known_cmds, const char *cmd_name,
+    size_t cmd_namelen) {
+  register unsigned int i;
+  int known = FALSE;
+
+  for (i = 0; known_cmds[i].cmd_name != NULL; i++) {
+    if (cmd_namelen == known_cmds[i].cmd_namelen) {
+      if (strncmp(cmd_name, known_cmds[i].cmd_name, cmd_namelen + 1) == 0) {
+        known = TRUE;
+        break;
+      }
+    }
+  }
+
+  return known;
+}
+
+int pr_cmd_is_http(cmd_rec *cmd) {
+  const char *cmd_name;
+  size_t cmd_namelen;
+
+  if (cmd == NULL) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  cmd_name = cmd->argv[0];
+  if (cmd_name == NULL) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  cmd_namelen = strlen(cmd_name);
+  return is_known_cmd(http_ids, cmd_name, cmd_namelen);
+}
+
+int pr_cmd_is_smtp(cmd_rec *cmd) {
+  const char *cmd_name;
+  size_t cmd_namelen;
+
+  if (cmd == NULL) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  cmd_name = cmd->argv[0];
+  if (cmd_name == NULL) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  cmd_namelen = strlen(cmd_name);
+  return is_known_cmd(smtp_ids, cmd_name, cmd_namelen);
+}
diff --git a/src/ctrls.c b/src/ctrls.c
index ee8df7d..8b659b9 100644
--- a/src/ctrls.c
+++ b/src/ctrls.c
@@ -22,9 +22,7 @@
  * OpenSSL in the source distribution.
  */
 
-/* Controls API routines
- * $Id: ctrls.c,v 1.40 2013/05/28 21:02:02 castaglia Exp $
- */
+/* Controls API routines */
 
 #include "conf.h"
 #include "privs.h"
@@ -1117,10 +1115,15 @@ int pr_ctrls_issock_unix(mode_t sock_mode) {
 #if defined(SO_PEERCRED)
 static int ctrls_get_creds_peercred(int sockfd, uid_t *uid, gid_t *gid,
     pid_t *pid) {
+# if defined(HAVE_STRUCT_SOCKPEERCRED)
+  struct sockpeercred cred;
+# else
   struct ucred cred;
-  socklen_t credlen = sizeof(cred);
+# endif /* HAVE_STRUCT_SOCKPEERCRED */
+  socklen_t cred_len;
 
-  if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cred, &credlen) < 0) {
+  cred_len = sizeof(cred);
+  if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cred, &cred_len) < 0) {
     int xerrno = errno;
 
     pr_trace_msg(trace_channel, 2,
@@ -1131,14 +1134,17 @@ static int ctrls_get_creds_peercred(int sockfd, uid_t *uid, gid_t *gid,
     return -1;
   }
 
-  if (uid)
+  if (uid) {
     *uid = cred.uid;
+  }
 
-  if (gid)
+  if (gid) {
     *gid = cred.gid;
+  }
 
-  if (pid)
+  if (pid) {
     *pid = cred.pid;
+  }
 
   return 0;
 }
diff --git a/src/data.c b/src/data.c
index de236cb..5da377b 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2014 The ProFTPD Project team
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* Data connection management functions
- * $Id: data.c,v 1.152 2013/11/09 23:20:23 castaglia Exp $
+ * $Id: data.c,v 1.152 2013-11-09 23:20:23 castaglia Exp $
  */
 
 #include "conf.h"
@@ -369,6 +369,16 @@ static int data_active_open(char *reason, off_t size) {
   }
 
   session.d = pr_inet_create_conn(session.pool, -1, bind_addr, bind_port, TRUE);
+  if (session.d == NULL) {
+    int xerrno = errno;
+
+    pr_response_add_err(R_425, _("Unable to build data connection: %s"),
+      strerror(xerrno));
+    session.d = NULL;
+
+    errno = xerrno;
+    return -1;
+  }
 
   /* Default remote address to which to connect for an active transfer,
    * if the client has not specified a different address via PORT/EPRT,
@@ -547,6 +557,9 @@ void pr_data_reset(void) {
     destroy_pool(session.d->pool);
   }
 
+  /* Clear any leftover state from previous transfers. */
+  have_dangling_cr = FALSE;
+
   session.d = NULL;
   session.sf_flags &= (SF_ALL^(SF_ABORT|SF_POST_ABORT|SF_XFER|SF_PASSIVE|SF_ASCII_OVERRIDE|SF_EPSV_ALL));
 }
@@ -563,6 +576,9 @@ void pr_data_init(char *filename, int direction) {
 
     session.xfer.direction = direction;
   }
+
+  /* Clear any leftover state from previous transfers. */
+  have_dangling_cr = FALSE;
 }
 
 int pr_data_open(char *filename, char *reason, int direction, off_t size) {
@@ -610,6 +626,7 @@ int pr_data_open(char *filename, char *reason, int direction, off_t size) {
       pr_response_add_err(R_425, _("Unable to build data connection: %s"),
         strerror(session.d->xerrno));
       destroy_pool(session.d->pool);
+      errno = session.d->xerrno;
       session.d = NULL;
       return -1;
     }
@@ -618,6 +635,7 @@ int pr_data_open(char *filename, char *reason, int direction, off_t size) {
       pr_response_add_err(R_425, _("Unable to build data connection: %s"),
         strerror(session.d->xerrno));
       destroy_pool(session.d->pool);
+      errno = session.d->xerrno;
       session.d = NULL;
       return -1;
     }
diff --git a/src/dirtree.c b/src/dirtree.c
index 1ba8c58..bda3f11 100644
--- a/src/dirtree.c
+++ b/src/dirtree.c
@@ -25,7 +25,7 @@
  */
 
 /* Read configuration file(s), and manage server/configuration structures.
- * $Id: dirtree.c,v 1.292 2013/10/13 18:06:57 castaglia Exp $
+ * $Id: dirtree.c,v 1.292 2013-10-13 18:06:57 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/display.c b/src/display.c
index da3a83d..46ee945 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2004-2013 The ProFTPD Project team
+ * Copyright (c) 2004-2014 The ProFTPD Project team
  *
  * 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
@@ -23,7 +23,7 @@
  */
 
 /* Display of files
- * $Id: display.c,v 1.32 2013/10/07 05:51:30 castaglia Exp $
+ * $Id: display.c,v 1.32 2013-10-07 05:51:30 castaglia Exp $
  */
 
 #include "conf.h"
@@ -32,10 +32,12 @@ static int first_msg_sent = FALSE;
 static const char *first_msg = NULL;
 static const char *prev_msg = NULL;
 
+/* Note: The size provided by pr_fs_getsize2() is in KB, not bytes. */
 static void format_size_str(char *buf, size_t buflen, off_t size) {
-  char *units[] = {"", "K", "M", "G", "T", "P"};
-  unsigned int nunits = 6;
+  char *units[] = {"K", "M", "G", "T", "P"};
+  unsigned int nunits = 5;
   register unsigned int i = 0;
+  int res;
 
   /* Determine the appropriate units label to use. */
   while (size > 1024 &&
@@ -47,7 +49,15 @@ static void format_size_str(char *buf, size_t buflen, off_t size) {
   }
 
   /* Now, prepare the buffer. */
-  snprintf(buf, buflen, "%.3" PR_LU "%sB", (pr_off_t) size, units[i]);
+  res = snprintf(buf, buflen, "%.3" PR_LU "%sB", (pr_off_t) size, units[i]);
+
+  if (res > 2) {
+    /* Check for leading zeroes; it's an aethetic choice. */
+    if (buf[0] == '0' && buf[1] != '.') {
+      memmove(&buf[0], &buf[1], res-1);
+      buf[res-1] = '\0';
+    }
+  }
 }
 
 static int display_add_line(pool *p, const char *resp_code,
@@ -154,6 +164,7 @@ static int display_fh(pr_fh_t *fh, const char *fs, const char *code,
   pr_fsio_fstat(fh, &st);
   fh->fh_iosz = st.st_blksize;
 
+  /* Note: The size provided by pr_fs_getsize() is in KB, not bytes. */
   res = pr_fs_fgetsize(fh->fh_fd, &fs_size);
   if (res < 0 &&
       errno != ENOSYS) {
diff --git a/src/encode.c b/src/encode.c
index 23c9d0c..dd4bf79 100644
--- a/src/encode.c
+++ b/src/encode.c
@@ -23,7 +23,7 @@
  */
 
 /* UTF8/charset encoding/decoding
- * $Id: encode.c,v 1.33 2012/04/06 16:44:40 castaglia Exp $
+ * $Id: encode.c,v 1.33 2012-04-06 16:44:40 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/env.c b/src/env.c
index a8e8344..8f9ba61 100644
--- a/src/env.c
+++ b/src/env.c
@@ -23,7 +23,7 @@
  */
 
 /* Environment management
- * $Id: env.c,v 1.11 2013/10/07 01:29:05 castaglia Exp $
+ * $Id: env.c,v 1.11 2013-10-07 01:29:05 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/event.c b/src/event.c
index f92bb89..4a1c85d 100644
--- a/src/event.c
+++ b/src/event.c
@@ -23,7 +23,7 @@
  */
 
 /* Event management code
- * $Id: event.c,v 1.28 2013/02/24 16:46:42 castaglia Exp $
+ * $Id: event.c,v 1.28 2013-02-24 16:46:42 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/expr.c b/src/expr.c
index d0f4a84..310ff29 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -23,7 +23,7 @@
  */
 
 /* Expression API implementation
- * $Id: expr.c,v 1.6 2011/12/11 02:14:43 castaglia Exp $
+ * $Id: expr.c,v 1.6 2011-12-11 02:14:43 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/feat.c b/src/feat.c
index 20b5c90..d8002d8 100644
--- a/src/feat.c
+++ b/src/feat.c
@@ -23,7 +23,7 @@
  */
 
 /* Feature management code
- * $Id: feat.c,v 1.9 2011/05/23 21:22:24 castaglia Exp $
+ * $Id: feat.c,v 1.9 2011-05-23 21:22:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/filter.c b/src/filter.c
index 200642a..f27b3e2 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -21,7 +21,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: filter.c,v 1.8 2011/12/20 22:56:48 castaglia Exp $
+ * $Id: filter.c,v 1.8 2011-12-20 22:56:48 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/fsio.c b/src/fsio.c
index 04285ed..333a17f 100644
--- a/src/fsio.c
+++ b/src/fsio.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2014 The ProFTPD Project
+ * Copyright (c) 2001-2015 The ProFTPD Project
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* ProFTPD virtual/modular file-system support
- * $Id: fsio.c,v 1.159 2014/02/11 15:17:54 castaglia Exp $
+ * $Id: fsio.c,v 1.159 2014-02-11 15:17:54 castaglia Exp $
  */
 
 #include "conf.h"
@@ -1674,11 +1674,19 @@ pr_fs_match_t *pr_get_fs_match(const char *path, int op) {
 }
 #endif /* PR_USE_REGEX and PR_FS_MATCH */
 
-void pr_fs_setcwd(const char *dir) {
-  pr_fs_resolve_path(dir, cwd, sizeof(cwd)-1, FSIO_DIR_CHDIR);
-  sstrncpy(cwd, dir, sizeof(cwd));
+int pr_fs_setcwd(const char *dir) {
+  if (pr_fs_resolve_path(dir, cwd, sizeof(cwd)-1, FSIO_DIR_CHDIR) < 0) {
+    return -1;
+  }
+
+  if (sstrncpy(cwd, dir, sizeof(cwd)) < 0) {
+    return -1;
+  }
+
   fs_cwd = lookup_dir_fs(cwd, FSIO_DIR_CHDIR);
   cwd[sizeof(cwd) - 1] = '\0';
+
+  return 0;
 }
 
 const char *pr_fs_getcwd(void) {
@@ -2914,8 +2922,9 @@ int pr_fsio_set_use_mkdtemp(int value) {
  * its permissions.
  */
 static int schmod_dir(pool *p, const char *path, mode_t perms, int use_root) {
-  int flags, fd, res, xerrno = 0;
+  int flags, fd, ignore_eacces = FALSE, res, xerrno = 0;
   struct stat st;
+  mode_t dir_mode;
 
   /* We're not using the pool at the moment. */
   (void) p;
@@ -2923,7 +2932,10 @@ static int schmod_dir(pool *p, const char *path, mode_t perms, int use_root) {
   /* Open an fd on the path using O_RDONLY|O_NOFOLLOW, so that we a)
    * avoid symlinks, and b) get an fd on the (hopefully) directory.
    */
-  flags = O_RDONLY|O_NOFOLLOW;
+  flags = O_RDONLY;
+#ifdef O_NOFOLLOW
+  flags |= O_NOFOLLOW;
+#endif
   fd = open(path, flags);
   xerrno = errno;
 
@@ -2966,12 +2978,31 @@ static int schmod_dir(pool *p, const char *path, mode_t perms, int use_root) {
     return -1;
   }
 
+  /* Note that some filesystems (e.g. CIFS) may not actually create a
+   * directory with the expected 0700 mode.  If that is the case, then a
+   * subsequence chmod(2) on that directory will likely fail.  Thus we also
+   * double-check the mode of the directory created via mkdtemp(3), and
+   * attempt to mitigate Bug#4063.
+   */
+  dir_mode = (st.st_mode & ~S_IFMT);
+  if (dir_mode != 0700) {
+    ignore_eacces = TRUE;
+
+    pr_trace_msg(trace_channel, 3,
+      "schmod: path '%s' has mode %04o, expected 0700", path, dir_mode);
+
+    /* This is such an unexpected situation that it warrants some logging. */
+    pr_log_pri(PR_LOG_DEBUG,
+      "NOTICE: directory '%s' has unexpected mode %04o (expected 0700)", path,
+      dir_mode);
+  }
+
   if (use_root) {
     PRIVS_ROOT
   }
 
   res = fchmod(fd, perms);
-  xerrno = xerrno;
+  xerrno = errno;
 
   if (use_root) {
     PRIVS_RELINQUISH
@@ -2994,17 +3025,27 @@ static int schmod_dir(pool *p, const char *path, mode_t perms, int use_root) {
      *
      * Maybe this exception for ENOSYS here should be made configurable?
      */
-    if (xerrno != ENOSYS) {
-      pr_trace_msg(trace_channel, 3,
-        "schmod: unable to set perms %04o on path '%s': %s", perms, path,
-        strerror(xerrno));
-      errno = xerrno;
-      return -1;
+
+    if (xerrno == ENOSYS) {
+      pr_log_debug(DEBUG0, "schmod: unable to set perms %04o on "
+        "path '%s': %s (chmod(2) not supported by underlying filesystem?)",
+        perms, path, strerror(xerrno));
+      return 0;
     }
 
-    pr_log_debug(DEBUG0, "mkdir: unable to set perms %04o on "
-      "path '%s': %s (chmod(2) not supported by underlying filesystem?)",
-      perms, path, strerror(xerrno));
+    if (xerrno == EACCES &&
+        ignore_eacces == TRUE) {
+      pr_log_debug(DEBUG0, "schmod: unable to set perms %04o on "
+        "path '%s': %s (chmod(2) not supported by underlying filesystem?)",
+        perms, path, strerror(xerrno));
+      return 0;
+    }
+
+    pr_trace_msg(trace_channel, 3,
+      "schmod: unable to set perms %04o on path '%s': %s", perms, path,
+      strerror(xerrno));
+    errno = xerrno;
+    return -1;
   }
 
   return 0;
diff --git a/src/ftpdctl.8 b/src/ftpdctl.8
deleted file mode 100644
index 4e1cd50..0000000
--- a/src/ftpdctl.8
+++ /dev/null
@@ -1,62 +0,0 @@
-.TH ftpdctl 8 "November 2003"
-.\" Process with
-.\" groff -man -Tascii ftpdctl.8 
-.\"
-.SH NAME
-ftpdctl \- ProFTPD control program
-.SH SYNOPSIS
-.B ftpdctl
-[
-.B \-hv
-] [
-.BI \-s " Unix domain socket"
-]
-.BI action " action-parameters"
-.SH DESCRIPTION
-.B ftpdctl
-is the control program for the Professional File Transfer Protocol (FTP) server
-daemon.  The control program is used to control the daemon while it is
-running, supporting actions like restarting or shutting down the daemon,
-disabling or enabling specific virtual servers, kicking FTP users, etc.
-.PP
-The specific \fBactions\fP available via
-.B ftpdctl
-depend on the modules compiled into
-.B proftpd.
-Check the modules documentation for more information on the specific
-\fBactions\fP supported by the modules.
-.PD
-.SH OPTIONS
-.TP 12
-.B \-h,\--help
-Display a short usage description, including all available options.
-.TP
-.B \-s,\--socket
-Specifies an alternate \fBpath\fP to be used for communicating with
-.B proftpd
-rather than the default Unix domain socket.  The default controls socket is
-.B /var/run/proftpd/proftpd.sock
-.TP
-.B \-v,\--verbose
-Display informational messages while communicating with the
-.B proftpd
-daemon.
-.TP
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR proftpd(8), ftp(1), ftpwho(1), ftpcount(1), ftpshut(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/src/ftpdctl.c b/src/ftpdctl.c
index 438b312..c3f4723 100644
--- a/src/ftpdctl.c
+++ b/src/ftpdctl.c
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD Controls command-line client
- * $Id: ftpdctl.c,v 1.20 2013/07/16 21:36:49 castaglia Exp $
+ * $Id: ftpdctl.c,v 1.20 2013-07-16 21:36:49 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/utils/ftpscrub.c b/src/ftpscrub.c
similarity index 91%
copy from utils/ftpscrub.c
copy to src/ftpscrub.c
index ded0609..e7dd8f3 100644
--- a/utils/ftpscrub.c
+++ b/src/ftpscrub.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2001-2011 The ProFTPD Project team
+ * Copyright (c) 2001-2008 The ProFTPD Project team
  *
  * 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
@@ -14,7 +14,7 @@
  *
  * 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, Suite 500, Boston, MA 02110-1335, USA.
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
  *
  * As a special exemption, The ProFTPD Project and other respective copyright
  * holders give permission to link this program with OpenSSL, and distribute
@@ -23,7 +23,7 @@
  */
 
 /* "Scrubs" the scoreboard file, clearing it of old/stale entries.
- * $Id: ftpscrub.c,v 1.3 2011/05/23 20:46:20 castaglia Exp $
+ * $Id: ftpscrub.c,v 1.1 2009-02-18 21:33:17 castaglia Exp $
  */
 
 #include "utils.h"
@@ -122,13 +122,9 @@ int main(int argc, char **argv) {
    * incorrect, try the config file kludge.
    */
   if (check_scoreboard_file() < 0) {
-    char *path;
-
-    path = util_scan_config(config_filename, "ScoreboardFile");
-    if (path) {
-      util_set_scoreboard(path);
-      free(path);
-    }
+    const char *file = util_scan_config(config_filename, "ScoreboardFile");
+    if (file)
+      util_set_scoreboard(file);
 
     if (check_scoreboard_file() < 0) {
       fprintf(stderr, "%s: %s\n", util_get_scoreboard(), strerror(errno));
diff --git a/src/help.c b/src/help.c
index 1d0599a..56816bd 100644
--- a/src/help.c
+++ b/src/help.c
@@ -23,7 +23,7 @@
  */
 
 /* HELP management code
- * $Id: help.c,v 1.7 2011/05/23 21:22:24 castaglia Exp $
+ * $Id: help.c,v 1.7 2011-05-23 21:22:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/ident.c b/src/ident.c
new file mode 100644
index 0000000..403c6e5
--- /dev/null
+++ b/src/ident.c
@@ -0,0 +1,239 @@
+/*
+ * ProFTPD - FTP server daemon
+ * Copyright (c) 1997, 1998 Public Flood Software
+ * Copyright (c) 2001-2007 The ProFTPD Project team
+ *
+ * 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 exemption, Public Flood Software/MacGyver aka Habeeb J. Dihu
+ * and other respective copyright holders give permission to link this program
+ * with OpenSSL, and distribute the resulting executable, without including
+ * the source code for OpenSSL in the source distribution.
+ */
+
+/*
+ * Ident (RFC1413) protocol support
+ * $Id: ident.c,v 1.23 2007-10-22 18:09:18 castaglia Exp $
+ */
+
+#include "conf.h"
+
+static int ident_timeout;
+static pr_netio_stream_t *nstrm = NULL;
+
+static const char *trace_channel = "ident";
+
+static int ident_timeout_cb(CALLBACK_FRAME) {
+  ident_timeout++;
+
+  if (nstrm) {
+    /* Abort the NetIO stream, which will cause netio_poll (and thus
+     * netio_read) to also abort.  This is similar to the way data connects
+     * are aborted.
+     */
+    pr_netio_abort(nstrm);
+  }
+
+  return 0;
+}
+
+char *pr_ident_lookup(pool *p, conn_t *c) {
+  char *ret = "UNKNOWN";
+  pool *tmp_pool = NULL;
+  conn_t *ident_conn = NULL, *ident_io = NULL;
+  char buf[256] = {'\0'}, *tok = NULL, *tmp = NULL;
+  int timerno, i = 0;
+  int ident_port = pr_inet_getservport(p, "ident", "tcp");
+
+  tmp_pool = make_sub_pool(p);
+  ident_timeout = 0;
+  nstrm = NULL;
+
+  if (ident_port == -1) {
+    destroy_pool(tmp_pool);
+    return pstrdup(p, ret);
+  }
+
+  /* Set up our timer before going any further. */
+  timerno = pr_timer_add(PR_TUNABLE_TIMEOUTIDENT, -1, NULL,
+    (callback_t) ident_timeout_cb, "ident lookup");
+  if (timerno <= 0) {
+    destroy_pool(tmp_pool);
+    return pstrdup(p, ret);
+  }
+
+  ident_conn = pr_inet_create_connection(tmp_pool, NULL, -1, c->local_addr,
+    INPORT_ANY, FALSE);
+  pr_inet_set_nonblock(tmp_pool, ident_conn);
+
+  i = pr_inet_connect_nowait(tmp_pool, ident_conn, c->remote_addr, ident_port);
+  if (i < 0) {
+    int xerrno = errno;
+
+    pr_timer_remove(timerno, ANY_MODULE);
+    pr_inet_close(tmp_pool, ident_conn);
+    pr_trace_msg(trace_channel, 5, "connection to %s, port %d failed: %s",
+      pr_netaddr_get_ipstr(c->remote_addr), ident_port, strerror(xerrno));
+
+    destroy_pool(tmp_pool);
+
+    errno = xerrno;
+    return pstrdup(p, ret);
+  }
+
+  if (!i) {
+    /* Not yet connected. */
+    nstrm = pr_netio_open(p, PR_NETIO_STRM_OTHR, ident_conn->listen_fd,
+      PR_NETIO_IO_RD);
+    pr_netio_set_poll_interval(nstrm, 1);
+
+    switch (pr_netio_poll(nstrm)) {
+
+      /* Aborted, timed out */
+      case 1: {
+        if (ident_timeout) {
+          pr_timer_remove(timerno, ANY_MODULE);
+          pr_netio_close(nstrm);
+          pr_inet_close(tmp_pool, ident_conn);
+
+          pr_trace_msg(trace_channel, 5, "lookup timed out, returning '%s'",
+            ret);
+          destroy_pool(tmp_pool);
+          return pstrdup(p, ret);
+        }
+        break;
+      }
+
+      /* Error. */
+      case -1: {
+        int xerrno = errno;
+
+        pr_timer_remove(timerno, ANY_MODULE);
+        pr_netio_close(nstrm);
+        pr_inet_close(tmp_pool, ident_conn);
+
+        pr_trace_msg(trace_channel, 6, "lookup failed (%s), returning '%s'",
+          strerror(xerrno), ret);
+        destroy_pool(tmp_pool);
+
+        errno = xerrno;
+        return pstrdup(p, ret);
+      }
+
+      /* Connected. */
+      default: {
+        ident_conn->mode = CM_OPEN;
+
+        if (pr_inet_get_conn_info(ident_conn, ident_conn->listen_fd) < 0) {
+          int xerrno = errno;
+
+          pr_timer_remove(timerno, ANY_MODULE);
+          pr_netio_close(nstrm);
+          pr_inet_close(tmp_pool, ident_conn);
+
+          pr_trace_msg(trace_channel, 2,
+            "lookup timed out (%s), returning '%s'", strerror(xerrno), ret);
+          destroy_pool(tmp_pool);
+
+          errno = xerrno;
+          return pstrdup(p, ret);
+        }
+        break;
+      }
+    }
+  }
+
+  ident_io = pr_inet_openrw(tmp_pool, ident_conn, NULL, PR_NETIO_STRM_OTHR,
+    -1, -1, -1, FALSE);
+  if (ident_io == NULL) {
+    int xerrno = errno;
+
+    pr_timer_remove(timerno, ANY_MODULE);
+    pr_inet_close(tmp_pool, ident_conn);
+
+    pr_trace_msg(trace_channel, 3, "failed opening read/write connection: %s",
+      strerror(xerrno));
+    destroy_pool(tmp_pool);
+
+    errno = xerrno;
+    return pstrdup(p, ret);
+  }
+
+  nstrm = ident_io->instrm;
+
+  pr_inet_set_nonblock(tmp_pool, ident_io);
+  pr_netio_set_poll_interval(ident_io->instrm, 1);
+  pr_netio_set_poll_interval(ident_io->outstrm, 1);
+
+  pr_netio_printf(ident_io->outstrm, "%d, %d\r\n", c->remote_port,
+    c->local_port);
+
+  /* If the timer fires while in netio_gets(), netio_gets() will simply return
+   * either a partial string, or NULL.  This works because ident_timeout_cb
+   * aborts the stream from which we are reading.  netio_set_poll_interval() is
+   * used to make sure significant delays don't occur on systems that
+   * automatically restart syscalls after the SIGALRM signal.
+   */
+
+  pr_trace_msg(trace_channel, 4, "reading response from remote ident server");
+
+  if (pr_netio_gets(buf, sizeof(buf), ident_io->instrm)) {
+    strip_end(buf, "\r\n");
+
+    pr_trace_msg(trace_channel, 6, "received '%s' from remote ident server",
+      buf);
+
+    tmp = buf;
+    tok = get_token(&tmp, ":");
+    if (tok && (tok = get_token(&tmp, ":"))) {
+      while (*tok && isspace((int) *tok)) {
+        pr_signals_handle();
+        tok++;
+      }
+      strip_end(tok, " \t");
+
+      if (strcasecmp(tok, "ERROR") == 0) {
+        if (tmp) {
+          while (*tmp && isspace((int) *tmp)) {
+            pr_signals_handle();
+            tmp++;
+          }
+	  strip_end(tmp, " \t");
+          if (strcasecmp(tmp, "HIDDEN-USER") == 0)
+            ret = "HIDDEN-USER";
+        }
+
+      } else if (strcasecmp(tok, "USERID") == 0) {
+        if (tmp && (tok = get_token(&tmp, ":"))) {
+          if (tmp) {
+            while (*tmp && isspace((int) *tmp)) {
+              pr_signals_handle();
+              tmp++;
+            }
+            strip_end(tmp, " \t");
+            ret = tmp;
+          }
+        }
+      }
+    }
+  }
+
+  pr_timer_remove(timerno, ANY_MODULE);
+  pr_inet_close(tmp_pool, ident_io);
+  pr_inet_close(tmp_pool, ident_conn);
+  destroy_pool(tmp_pool);
+
+  return pstrdup(p, ret);
+}
diff --git a/src/inet.c b/src/inet.c
index f5602e0..7676cd9 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -24,9 +24,7 @@
  * the source code for OpenSSL in the source distribution.
  */
 
-/* Inet support functions, many wrappers for netdb functions
- * $Id: inet.c,v 1.156 2013/10/07 05:51:30 castaglia Exp $
- */
+/* Inet support functions, many wrappers for netdb functions */
 
 #include "conf.h"
 #include "privs.h"
@@ -488,17 +486,10 @@ conn_t *pr_inet_create_conn(pool *p, int fd, pr_netaddr_t *bind_addr,
   conn_t *c = NULL;
 
   c = init_conn(p, fd, bind_addr, port, retry_bind, TRUE);
-
-  if (!is_master) {
-    /* This code is somewhat of a kludge, because error handling should
-     * NOT occur in inet.c, it should be handled by the caller.
-     */
-    if (c == NULL) {
-      pr_session_disconnect(NULL, PR_SESS_DISCONNECT_BY_APPLICATION, NULL);
-    }
+  if (c == NULL) {
+    errno = inet_errno;
   }
 
-  errno = inet_errno;
   return c;
 }
 
@@ -766,13 +757,21 @@ int pr_inet_set_proto_opts(pool *p, conn_t *c, int mss, int nodelay,
   }
 #endif /* IP_TOS */
 
-#ifdef IPV6_TCLASS
+#if defined(PR_USE_IPV6) && defined(IPV6_TCLASS)
   if (pr_netaddr_use_ipv6()) {
     /* Only set TCLASS flags on IPv6 sockets; IPv4 sockets use TOS. */
     if (pr_netaddr_get_family(c->local_addr) == AF_INET6) {
       if (c->listen_fd != -1) {
-        if (setsockopt(c->listen_fd, ip_level, IPV6_TCLASS, (void *) &tos,
-            sizeof(tos)) < 0) {
+        int level, res;
+
+        level = ipv6_proto;
+        res = setsockopt(c->listen_fd, level, IPV6_TCLASS, (void *) &tos,
+          sizeof(tos));
+        if (res < 0
+#ifdef ENOPROTOOPT
+            && errno != ENOPROTOOPT
+#endif /* !ENOPROTOOPT */
+          ) {
           pr_log_pri(PR_LOG_NOTICE, "error setting listen fd IPV6_TCLASS: %s",
             strerror(errno));
         }
diff --git a/src/lastlog.c b/src/lastlog.c
index 07a3919..3d2fd96 100644
--- a/src/lastlog.c
+++ b/src/lastlog.c
@@ -23,7 +23,7 @@
  */
 
 /* Lastlog code
- * $Id: lastlog.c,v 1.5 2013/10/13 18:06:57 castaglia Exp $
+ * $Id: lastlog.c,v 1.5 2013-10-13 18:06:57 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/log.c b/src/log.c
index 4b83413..a9700df 100644
--- a/src/log.c
+++ b/src/log.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2014 The ProFTPD Project team
  *
  * 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
@@ -25,7 +25,7 @@
  */
 
 /* ProFTPD logging support.
- * $Id: log.c,v 1.121 2013/10/13 23:46:43 castaglia Exp $
+ * $Id: log.c,v 1.121 2013-10-13 23:46:43 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/main.c b/src/main.c
index b951436..0945bc8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver at tos.net>
- * Copyright (c) 2001-2014 The ProFTPD Project team
+ * Copyright (c) 2001-2015 The ProFTPD Project team
  *
  * 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
@@ -24,9 +24,7 @@
  * the source code for OpenSSL in the source distribution.
  */
 
-/* House initialization and main program loop
- * $Id: main.c,v 1.462 2014/01/25 16:34:09 castaglia Exp $
- */
+/* House initialization and main program loop */
 
 #include "conf.h"
 
@@ -572,6 +570,20 @@ int pr_cmd_read(cmd_rec **res) {
     cmd = make_ftp_cmd(session.pool, cp, flags);
     if (cmd) {
       *res = cmd;
+
+      if (pr_cmd_is_http(cmd) == TRUE) {
+        cmd->is_ftp = FALSE;
+        cmd->protocol = "HTTP";
+
+      } else if (pr_cmd_is_smtp(cmd) == TRUE) {
+        cmd->is_ftp = FALSE;
+        cmd->protocol = "SMTP";
+
+      } else {
+        /* Assume that the client is sending valid FTP commands. */
+        cmd->is_ftp = TRUE;
+        cmd->protocol = "FTP";
+      }
     } 
   }
 
@@ -827,6 +839,20 @@ static void cmd_loop(server_rec *server, conn_t *c) {
     }
 
     if (cmd) {
+
+      /* Detect known commands for other protocols; if found, drop the
+       * connection, lest we be used as part of an attack on a different
+       * protocol server (Bug#4143).
+       */
+      if (cmd->is_ftp == FALSE) {
+        pr_log_pri(PR_LOG_WARNING,
+          "client sent %s command '%s', disconnecting", cmd->protocol,
+          cmd->argv[0]);
+        pr_event_generate("core.bad-protocol", cmd);
+        pr_session_disconnect(NULL, PR_SESS_DISCONNECT_BAD_PROTOCOL,
+          cmd->protocol);
+      }
+ 
       pr_cmd_dispatch(cmd);
       destroy_pool(cmd->pool);
 
@@ -1206,8 +1232,26 @@ static void fork_server(int fd, conn_t *l, unsigned char nofork) {
   pr_signals_unblock();
 
   if (conn == NULL) {
-    pr_log_pri(PR_LOG_ERR, "fatal: unable to open incoming connection: %s",
-      strerror(xerrno));
+    /* There are some errors, e.g. ENOTCONN ("Transport endpoint is not
+     * connected") which can easily happen, as during scans/TCP
+     * probes/healthchecks, commonly done by load balancers, firewalls, and
+     * other clients.  By the time proftpd reaches the point of looking up
+     * the peer data for that connection, the client has disconnected.
+     *
+     * These are normal errors, and thus should not be logged as fatal
+     * conditions.
+     */
+    if (xerrno == ENOTCONN ||
+        xerrno == ECONNABORTED ||
+        xerrno == ECONNRESET) {
+      pr_log_pri(PR_LOG_DEBUG, "unable to open incoming connection: %s",
+        strerror(xerrno));
+
+    } else {
+      pr_log_pri(PR_LOG_ERR, "fatal: unable to open incoming connection: %s",
+        strerror(xerrno));
+    }
+
     exit(1);
   }
 
diff --git a/src/memcache.c b/src/memcache.c
index 417749b..a67ec46 100644
--- a/src/memcache.c
+++ b/src/memcache.c
@@ -23,7 +23,7 @@
  */
 
 /* Memcache management
- * $Id: memcache.c,v 1.26 2013/01/28 01:21:05 castaglia Exp $
+ * $Id: memcache.c,v 1.26 2013-01-28 01:21:05 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/mkhome.c b/src/mkhome.c
index 09c782c..b34adad 100644
--- a/src/mkhome.c
+++ b/src/mkhome.c
@@ -23,7 +23,7 @@
  */
 
 /* Home-on-demand support
- * $Id: mkhome.c,v 1.23 2013/10/09 05:21:06 castaglia Exp $
+ * $Id: mkhome.c,v 1.23 2013-10-09 05:21:06 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/modules.c b/src/modules.c
index 655139d..80f9f1c 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -24,7 +24,7 @@
  */
 
 /* Module handling routines
- * $Id: modules.c,v 1.64 2013/10/07 05:51:30 castaglia Exp $
+ * $Id: modules.c,v 1.64 2013-10-07 05:51:30 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/netacl.c b/src/netacl.c
index 038ca44..b9eccaa 100644
--- a/src/netacl.c
+++ b/src/netacl.c
@@ -23,7 +23,7 @@
  */
 
 /* Network ACL routines
- * $Id: netacl.c,v 1.27 2013/02/15 22:39:00 castaglia Exp $
+ * $Id: netacl.c,v 1.27 2013-02-15 22:39:00 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/netaddr.c b/src/netaddr.c
index 2657ca7..8c6474f 100644
--- a/src/netaddr.c
+++ b/src/netaddr.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2003-2013 The ProFTPD Project team
+ * Copyright (c) 2003-2014 The ProFTPD Project team
  *
  * 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
@@ -23,7 +23,7 @@
  */
 
 /* Network address routines
- * $Id: netaddr.c,v 1.98 2013/12/23 17:53:42 castaglia Exp $
+ * $Id: netaddr.c,v 1.98 2013-12-23 17:53:42 castaglia Exp $
  */
 
 #include "conf.h"
@@ -761,6 +761,14 @@ static pr_netaddr_t *get_addr_by_device(pool *p, const char *name,
     int found_device = FALSE;
 
     for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+      pr_signals_handle();
+
+      /* Watch out for null ifa_addr, as when a device does not have
+       * an associated address (e.g. due to not be initialized).
+       */
+      if (ifa->ifa_addr == NULL) {
+        continue;
+      }
 
       /* We're only looking for addresses, not stats. */
       if (ifa->ifa_addr->sa_family != AF_INET
diff --git a/src/netio.c b/src/netio.c
index 8017048..88170df 100644
--- a/src/netio.c
+++ b/src/netio.c
@@ -23,7 +23,7 @@
  */
 
 /* NetIO routines
- * $Id: netio.c,v 1.63 2014/01/06 06:57:16 castaglia Exp $
+ * $Id: netio.c,v 1.63 2014-01-06 06:57:16 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/parser.c b/src/parser.c
index 4bb4a69..662598e 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -23,7 +23,7 @@
  */
 
 /* Configuration parser
- * $Id: parser.c,v 1.40 2013/12/30 06:38:59 castaglia Exp $
+ * $Id: parser.c,v 1.40 2013-12-30 06:38:59 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/pidfile.c b/src/pidfile.c
index ec04dd5..9b8f33c 100644
--- a/src/pidfile.c
+++ b/src/pidfile.c
@@ -23,7 +23,7 @@
  */
 
 /* Pidfile management
- * $Id: pidfile.c,v 1.5 2011/05/23 21:22:24 castaglia Exp $
+ * $Id: pidfile.c,v 1.5 2011-05-23 21:22:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/pool.c b/src/pool.c
index 67115f4..43b53c8 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -25,7 +25,7 @@
  */
 
 /* Resource allocation code
- * $Id: pool.c,v 1.72 2013/10/07 05:51:30 castaglia Exp $
+ * $Id: pool.c,v 1.72 2013-10-07 05:51:30 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/privs.c b/src/privs.c
index d61fd6c..32dcd2b 100644
--- a/src/privs.c
+++ b/src/privs.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2009-2012 The ProFTPD Project team
+ * Copyright (c) 2009-2014 The ProFTPD Project team
  *
  * 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
@@ -21,7 +21,7 @@
  * the resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: privs.c,v 1.6 2012/12/29 00:45:04 castaglia Exp $
+ * $Id: privs.c,v 1.6 2012-12-29 00:45:04 castaglia Exp $
  */
 
 #include "conf.h"
@@ -90,23 +90,31 @@ int pr_privs_setup(uid_t uid, gid_t gid, const char *file, int lineno) {
     session.gid = getgid();
 
     if (setgid(session.gid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setgid(): %s",
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setgid(): %s",
         strerror(errno));
     }
 
 #if defined(HAVE_SETEUID)
     if (setuid(session.uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setuid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setuid(): %s", 
         strerror(errno));
     }
 
     if (seteuid(session.uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to seteuid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to seteuid(): %s", 
         strerror(errno));
     }
 #else
     if (setreuid(session.uid, session.uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setreuid(): %s",
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setreuid(): %s",
         strerror(errno));
     }
 #endif /* !HAVE_SETEUID */
@@ -118,27 +126,37 @@ int pr_privs_setup(uid_t uid, gid_t gid, const char *file, int lineno) {
 
 #if defined(HAVE_SETEUID)
     if (setuid(PR_ROOT_UID) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setuid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setuid(): %s", 
         strerror(errno));
     }
 
     if (setgid(gid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setgid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setgid(): %s", 
         strerror(errno));
     }
 
     if (seteuid(uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to seteuid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to seteuid(): %s", 
         strerror(errno));
     }
 #else
     if (setgid(session.gid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setgid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setgid(): %s", 
         strerror(errno));
     }
 
     if (setreuid(PR_ROOT_UID, session.uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "SETUP PRIVS: unable to setreuid(): %s",
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "SETUP PRIVS: unable to setreuid(): %s",
         strerror(errno));
     }
 #endif /* !HAVE_SETEUID */
@@ -173,22 +191,30 @@ int pr_privs_root(const char *file, int lineno) {
 
 #if defined(HAVE_SETEUID)
     if (seteuid(PR_ROOT_UID) < 0) {
-      pr_log_pri(PR_LOG_ERR, "ROOT PRIVS: unable to seteuid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "ROOT PRIVS: unable to seteuid(): %s", 
         strerror(errno));
     }
 
     if (setegid(PR_ROOT_GID) < 0) {
-      pr_log_pri(PR_LOG_ERR, "ROOT PRIVS: unable to setegid(): %s", 
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "ROOT PRIVS: unable to setegid(): %s", 
         strerror(errno));
     }
 #else
     if (setreuid(session.uid, PR_ROOT_UID) < 0) {
-      pr_log_pri(PR_LOG_ERR, "ROOT PRIVS: unable to setreuid(): %s",
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "ROOT PRIVS: unable to setreuid(): %s",
         strerror(errno));
     }
 
     if (setregid(session.gid, PR_ROOT_GID)) {
-      pr_log_pri(PR_LOG_ERR, "ROOT PRIVS: unable to setregid(): %s",
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "ROOT PRIVS: unable to setregid(): %s",
         strerror(errno));
     }
 #endif /* !HAVE_SETEUID */
@@ -226,33 +252,45 @@ int pr_privs_user(const char *file, int lineno) {
   if (!session.disable_id_switching) {
 #if defined(HAVE_SETEUID)
     if (seteuid(PR_ROOT_UID) < 0) {
-      pr_log_pri(PR_LOG_ERR, "USER PRIVS: unable to seteuid(PR_ROOT_UID): %s",
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "USER PRIVS: unable to seteuid(PR_ROOT_UID): %s",
         strerror(errno));
     }
 
     if (setegid(session.login_gid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "USER PRIVS: unable to "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "USER PRIVS: unable to "
         "setegid(session.login_gid): %s", strerror(errno));
     }
 
     if (seteuid(session.login_uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "USER PRIVS: unable to "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "USER PRIVS: unable to "
         "seteuid(session.login_uid): %s", strerror(errno));
     }
 #else
     if (setreuid(session.uid, PR_ROOT_UID) < 0) {
-      pr_log_pri(PR_LOG_ERR,
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority,
         "USER PRIVS: unable to setreuid(session.uid, PR_ROOT_UID): %s",
         strerror(errno));
     }
 
     if (setregid(session.gid, session.login_gid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "USER PRIVS: unable to setregid(session.gid, "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "USER PRIVS: unable to setregid(session.gid, "
         "session.login_gid): %s", strerror(errno));
     }
 
     if (setreuid(session.uid, session.login_uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "USER PRIVS: unable to setreuid(session.uid, "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "USER PRIVS: unable to setreuid(session.uid, "
         "session.login_uid): %s", strerror(errno));
     }
 #endif /* !HAVE_SETEUID */
@@ -303,56 +341,74 @@ int pr_privs_relinquish(const char *file, int lineno) {
 #if defined(HAVE_SETEUID)
     if (geteuid() != PR_ROOT_UID) {
       if (seteuid(PR_ROOT_UID) < 0) {
-        pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+        int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+        pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
           "seteuid(PR_ROOT_UID): %s", strerror(errno));
       }
 
-      if (user_privs > 0)
+      if (user_privs > 0) {
         user_privs--;
+      }
 
     } else {
-      if (root_privs > 0)
+      if (root_privs > 0) {
         root_privs--;
+      }
     }
 
     if (setegid(session.gid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
         "setegid(session.gid): %s", strerror(errno));
     }
 
     if (seteuid(session.uid) < 0) {
-      pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
         "seteuid(session.uid): %s", strerror(errno));
     }
 #else
     if (geteuid() != PR_ROOT_UID) {
       if (setreuid(session.uid, PR_ROOT_UID) < 0) {
-        pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+        int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+        pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
           "setreuid(session.uid, PR_ROOT_UID): %s", strerror(errno));
       }
 
-      if (user_privs > 0)
+      if (user_privs > 0) {
         user_privs--;
+      }
 
     } else {
-      if (root_privs > 0)
+      if (root_privs > 0) {
         root_privs--;
+      }
     }
 
     if (getegid() != PR_ROOT_GID) {
       if (setregid(session.gid, PR_ROOT_GID) < 0) {
-        pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+        int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+        pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
           "setregid(session.gid, PR_ROOT_GID): %s", strerror(errno));
       }
     }
 
     if (setregid(session.gid, session.gid)) {
-      pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
         "setregid(session.gid, session.gid): %s", strerror(errno));
     }
 
     if (setreuid(session.uid, session.uid)) {
-      pr_log_pri(PR_LOG_ERR, "RELINQUISH PRIVS: unable to "
+      int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+      pr_log_pri(priority, "RELINQUISH PRIVS: unable to "
         "setreuid(session.uid, session.uid): %s", strerror(errno));
     }
 
@@ -383,32 +439,44 @@ int pr_privs_revoke(const char *file, int lineno) {
 
 #if defined(HAVE_SETEUID)
   if (seteuid(PR_ROOT_UID) < 0) {
-    pr_log_pri(PR_LOG_ERR, "REVOKE PRIVS: unable to seteuid(): %s",
+    int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+    pr_log_pri(priority, "REVOKE PRIVS: unable to seteuid(): %s",
       strerror(errno));
   }
 
   if (setgid(session.gid) < 0) {
-    pr_log_pri(PR_LOG_ERR, "REVOKE PRIVS: unable to setgid(): %s",
+    int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+    pr_log_pri(priority, "REVOKE PRIVS: unable to setgid(): %s",
       strerror(errno));
   }
 
   if (setuid(session.uid) < 0) {
-    pr_log_pri(PR_LOG_ERR, "REVOKE PRIVS: unable to setuid(): %s",
+    int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+    pr_log_pri(priority, "REVOKE PRIVS: unable to setuid(): %s",
       strerror(errno));
   }
 #else
   if (setreuid(PR_ROOT_UID, PR_ROOT_UID) < 0) {
-    pr_log_pri(PR_LOG_ERR, "REVOKE PRIVS: unable to "
+    int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+    pr_log_pri(priority, "REVOKE PRIVS: unable to "
       "setreuid(PR_ROOT_UID, PR_ROOT_UID): %s", strerror(errno));
   }
 
   if (setgid(session.gid) < 0) {
-    pr_log_pri(PR_LOG_ERR, "REVOKE PRIVS: unable to setgid(): %s",
+    int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+    pr_log_pri(priority, "REVOKE PRIVS: unable to setgid(): %s",
       strerror(errno));
   }
 
   if (setuid(session.uid) < 0) {
-    pr_log_pri(PR_LOG_ERR, "REVOKE PRIVS: unable to setuid(): %s",
+    int priority = (errno == EPERM ? PR_LOG_NOTICE : PR_LOG_ERR);
+
+    pr_log_pri(priority, "REVOKE PRIVS: unable to setuid(): %s",
       strerror(errno));
   }
 #endif /* !HAVE_SETEUID */
diff --git a/src/proctitle.c b/src/proctitle.c
index 1947ed4..dcace13 100644
--- a/src/proctitle.c
+++ b/src/proctitle.c
@@ -23,7 +23,7 @@
  */
 
 /* Proctitle management
- * $Id: proctitle.c,v 1.13 2012/04/15 18:04:15 castaglia Exp $
+ * $Id: proctitle.c,v 1.13 2012-04-15 18:04:15 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/proftpd.8 b/src/proftpd.8
deleted file mode 100644
index 812706f..0000000
--- a/src/proftpd.8
+++ /dev/null
@@ -1,145 +0,0 @@
-.TH proftpd 8 "July 2000"
-.\" Process with
-.\" groff -man -Tascii proftpd.1 
-.\"
-.SH NAME
-proftpd \- Professional configurable, secure file transfer protocol server
-.SH SYNOPSIS
-.B proftpd
-[
-.B \-hlntv
-] [
-.BI \-c " config\-file"
-] [
-.BI \-d " debuglevel"
-] [
-.BI \-p " 0|1"
-]
-.SH DESCRIPTION
-.B proftpd
-is the Professional File Transfer Protocol (FTP) server daemon.  The server 
-may be invoked by the Internet "super-server" inetd(8) each time a
-connection to the FTP service is made, or alternatively it can be run as a
-standalone daemon.
-.PP
-.br
-Each successful and failed ftp(1) session is logged using syslog with a
-facility of LOG_FTP.  Note: LOG_FTP messages are not displayed
-by syslogd(8) by default, and may have to be enabled in syslogd(8)'s
-configuration file.
-.PP
-When
-.B proftpd
-is run in standalone mode and it receives a SIGHUP then it will reread its
-configuration file.  When run in standalone mode without the
-.B \-n
-option, the main
-.B proftpd
-daemon writes its process ID to
-.B /usr/local/var/proftpd.pid
-to make it easy to know which process to SIGHUP.
-.SH OPTIONS
-.TP 12
-.B \-h,\--help
-Display a short usage description, including all available options.
-.TP
-.B \-n,\--nodaemon
-Runs the proftpd process in standalone mode (must be configured as such in
-the configuration file), but does not background the process or
-disassociate it from the controlling tty.  Additionally, all output (log
-or debug messages) are sent to stderr, rather than the syslog mechanism. 
-Most often used with the \fB-d option\fP for debugging. 
-.TP
-.B \-q,\--quiet
-Quiet mode; don't send logging information to standard error when running
-with the \fB-n option\fP.
-.TP
-.B \-v,\--version
-Displays the version number of ProFTPD to stdout.
-.TP
-.BI \-D,\--define " parameter"
-Sets a configuration \fIparameter\fP which can be used <IfDefine>...</IfDefine>
-sections in the configuration files to conditionally skip or process
-commands.
-.TP
-.BI \-d,\--debug " debuglevel"
-Sets proftpd's internal debug level (normally 0).  The \fIdebuglevel\fP
-should be an integer value from 0 to 10, with higher numbers producing more
-debug output.  Normally, debug messages are sent to \fBsyslog\fP using the
-\fBDEBUG\fP facility, however if the \fB-n option\fP is used, all such
-output is sent to stderr.
-.TP
-.BI \-c,\--config " config\-file"
-Specifies an alternate \fIconfig\-file\fP to be parsed at startup, rather
-than the default configuration file.  The default configuration file is
-.B /usr/local/etc/proftpd.conf
-.br
-.TP
-.BI \-N,\--nocollision
-Disables address/port collision checking.
-.TP
-.BI \-V,\--settings
-Displays various compile-time settings and exits.
-.TP
-.BI \-S,\--serveraddr
-Specifies an IP address for the host machine, avoiding an DNS lookup of the hostname
-.TP
-.BI \-t,\--configtest
-Read the configuration file, report any syntax errors, and exit.
-.TP
-.BI \-p,\--persistent " 0|1"
-Disables (0) or enables (1) the default persistent password support, which
-is determined at configure time for each platform.  This option \fBonly\fP
-affects the default support, it can still be overridden at run-time with
-the \fBPersistentPasswd\fP directive.
-.TP
-.BI \-l,\--list
-Lists all modules compiled into proftpd.
-.TP
-.BI \-4,\--ipv4
-Support IPv4 functionality \fBonly\fP, regardless of whether the
-\fB--enable-ipv6\fP configure option was used.
-.TP
-.BI \-6,\--ipv6
-Support IPv6 connections and lookup of IPv6 addresses for server DNS names.
-This is enabled by default, if the \fB--enable-ipv6\fP configure option is
-used.
-.SH FILES
-.PD 0
-.B /usr/local/sbin/proftpd
-.br
-.B /usr/local/etc/proftpd.conf
-.br
-.B /usr/local/bin/ftpwho
-.br
-.B /usr/local/bin/ftpcount
-.br
-.B /usr/local/bin/ftptop
-.br
-.B /usr/local/sbin/ftpshut
-.br
-.B /etc/ftpusers
-.br
-.B /var/log/xferlog
-.br
-.B /usr/local/var/proftpd.pid
-.br
-.B /usr/local/var/proftpd.scoreboard
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR proftpd.conf(5), inetd(8), ftp(1), ftpwho(1), ftpcount(1), ftpshut(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/src/proftpd.conf.5 b/src/proftpd.conf.5
deleted file mode 100644
index f90e114..0000000
--- a/src/proftpd.conf.5
+++ /dev/null
@@ -1,53 +0,0 @@
-.TH proftpd.conf 5
-.SH NAME
-proftpd.conf \- ProFTPD server configuration file
-.SH DESCRIPTION
-.PP
-The
-.B proftpd(8)
-daemon reads its configuration file, typically stored in one of the following
-locations:
-.LP
-.I /etc/proftpd.conf
-.br
-.I /etc/proftpd/proftpd.conf
-.br
-.I /usr/local/etc/proftpd.conf
-.TP
-or passed to proftpd with the -c command-line option.
-.PP
-The
-.B proftpd.conf
-configuration file contains
-.I directives
-, one per line. Lines starting with # and empty lines are comments and are
-ignored. Directives are case-insensitive, whereas values are case-sensitive.
-Values may be enclosed in double-quotes (") if they contain spaces.
-.PP
-The possible directives and their descriptions are described online at
-.BR http://www.proftpd.org/docs/directives/linked/by-name.html
-.RE
-.SH FILES
-.PD 0
-.B /usr/local/sbin/proftpd
-.br
-.B /usr/local/etc/proftpd.conf
-.PP
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH "SEE ALSO"
-.BR proftpd(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/src/prxs b/src/prxs
deleted file mode 100644
index 1dcec54..0000000
--- a/src/prxs
+++ /dev/null
@@ -1,322 +0,0 @@
-#!/usr/bin/env perl
-
-# ---------------------------------------------------------------------------
-# Copyright (C) 2008-2012 TJ Saunders <tj at castaglia.org>
-#
-# 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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
-#
-#  $Id: prxs.in,v 1.10 2012/09/19 00:11:39 castaglia Exp $
-# ---------------------------------------------------------------------------
-
-use strict;
-
-use File::Basename qw(basename);
-use Getopt::Long;
-
-Getopt::Long::Configure("no_ignorecase");
-
-my $prog = basename($0);
-
-my $compiler = q(gcc);
-my $cflags = q( -DLINUX -O2 -Wall -DPR_SHARED_MODULE);
-my $cppflags = q();
-my $ltdl_ldflags = q();
-my $sbindir = q(/usr/local/sbin);
-my $includedir = q(/usr/local/include);
-my $installer = q(/usr/bin/install -c);
-my $install_strip = q(-s);
-my $libexecdir = q(/usr/local/libexec);
-my $libtool = 'libtool';
-
-if (!defined($ENV{LIBTOOL})) {
-  if ($^O eq 'darwin') {
-    $libtool = 'glibtool';
-  }
-
-} else {
-  $libtool = $ENV{LIBTOOL};
-}
-
-my $opts = {};
-GetOptions($opts, 'c|compile', 'i|install', 'd|clean', 'h|help', 'name=s',
-  'D=s@', 'I=s@', 'L=s@', 'l=s@', 'W=s@');
-
-if ($opts->{h}) {
-  usage();
-  exit 0;
-}
-
-# Make sure we can query proftpd to find out its list of installed modules.
-# Unless we see mod_dso listed, there's no point in compiling a shared
-# module for proftpd to use.
-
-my $proftpd = "$sbindir/proftpd";
-unless (-x $proftpd) {
-  print STDERR "$proftpd not found or not executable\n";
-  exit 1;
-}
-
-unless (grep /mod_dso/, `$proftpd -l`) {
-  print STDERR "\nYour installed proftpd does not support shared modules/DSOs.\n";
-  print STDERR "Make sure the --enable-dso configure option is used when\n";
-  print STDERR "compiling proftpd.\n\n";
-  exit 1;
-}
-
-# If the libtool-specific linker flags are empty, it means that the
-# script was generated by a configure script lacking the --enable-dso option.
-unless (length($ltdl_ldflags) > 0) {
-  print STDERR "\nMissing the required libtool flags.\n";
-  print STDERR "Make sure the --enable-dso configure option is used when\n";
-  print STDERR "compiling proftpd.\n\n";
-  exit 1;
-}
-
-# Now, depending on the requested mode (compile/install/clean), build up
-# and execute the commands.
-
-my $mod_name = get_module_name();
-
-if (defined($opts->{c})) {
-  my $srcs = [];
-  my $objs = [];
-
-  my $configure_script;
-
-  foreach my $file (@ARGV) {
-    if ($file =~ /\.c$/) {
-      push(@$srcs, $file);
-
-      if ($file =~ /\/?mod_[^\/]+\.c$/) {
-        $configure_script = $file;
-        $configure_script =~ s/\/?mod_[^\/]+\.c$/\/configure/;
-      }
-
-      my $obj = $file;
-      $obj =~ s/\.c$/\.lo/;
-
-      # Handle an argument such as 'contrib/mod_sql_sqlite.c' by keeping
-      # just the name portion of the path.
-      $obj =~ s/^(.*)\///g;
-
-      push(@$objs, $obj);
-
-    } else {
-      print STDERR "Cannot compile non-.c file $file, aborting\n";
-      exit 1;
-    }
-  }
-
-  if (defined($configure_script)) {
-    # Check for any configure script for this module.  If present, error out
-    # for now.
-    if (-f $configure_script) {
-      print STDERR "Cannot compile $mod_name using prxs; use $configure_script instead\n";
-      exit 1;
-    }
-  }
-
-  foreach my $def (@{ $opts->{D} }) {
-    if ($def =~ /^(\S+)=(\S+)$/) {
-      $cflags .= " -D'$1=$2'";
-
-    } else {
-      $cflags .= " -D$def";
-    }
-  }
-
-  $cflags .= " -I. -I$includedir/proftpd";
-
-  foreach my $incdir (@{ $opts->{I} }) {
-    $cflags .= " -I$incdir";
-  }
-
-  my $cmds = [];
-  foreach my $src (@$srcs) {
-    push(@$cmds, "$libtool --mode=compile $compiler $cflags -c $src");
-  }
-
-  run_cmds($cmds);
-
-  my $objlist = '';
-  foreach my $obj (@$objs) {
-    $objlist .= " $obj";
-  }
-
-  my $ldflags .= " $ltdl_ldflags";
-
-  foreach my $libdir (@{ $opts->{L} }) {
-    $ldflags .= " -L$libdir";
-  }
-
-  # Scan through the .c files, looking for the $Libraries$ hint that
-  # proftpd's build system uses.
-  foreach my $src (@$srcs) {
-    if (open(my $fh, "< $src")) {
-      while (my $line = <$fh>) {
-        chomp($line);
-
-        if ($line =~ /\$Libraries:\s+(.*)?\$/) {
-          my $hint = $1;
-
-          # Assume that the library hint list is space-separated; add them
-          # to the $opts hashref.  Don't forget to strip of the '-l' prefix;
-          # that is added back later in the handling of $opts.
-          my $libs = [split(/\s+/, $hint)];
-          foreach my $lib (@$libs) {
-            $lib =~ s/^\-l//;
-            push(@{ $opts->{l} }, $lib);
-          }
-
-          last;
-        }
-      }
-
-      close($fh);
-
-    } else {
-      print STDERR "Unable to scan $src for \$Libraries\$ hint: $!\n";
-    }
-  }
-
-  my $libs = "";
-  foreach my $lib (@{ $opts->{l} }) {
-    $libs .= " -l$lib";
-  }
-
-  $cmds = [];
-  push(@$cmds, "$libtool --mode=link $compiler -o $mod_name.la -rpath $libexecdir $ldflags $objlist $libs");
-
-  run_cmds($cmds);
-}
-
-if (defined($opts->{i})) {
-  my $cmds = [];
-  push(@$cmds, "$libtool --mode=install $installer $install_strip $mod_name.la $ENV{DESTDIR}$libexecdir");
-
-  run_cmds($cmds);
-
-  # Don't forget to remind the user to manually edit their proftpd.conf
-  # and add the LoadModule to load the just-installed module.
-
-  my $load_mod_name = $mod_name;
-  $load_mod_name =~ s/^(.*)\///;
-
-  print STDOUT "\nTo load your newly installed module into proftpd, be sure\n";
-  print STDOUT "to edit your proftpd.conf and add the following:\n\n";
-  print STDOUT "  <IfModule mod_dso.c>\n";
-  print STDOUT "    LoadModule $load_mod_name.c\n";
-  print STDOUT "  </IfModule>\n\n";
-  print STDOUT "and then restart your proftpd server, so that the config change\n";
-  print STDOUT "becomes live.\n\n";
-}
-
-if (defined($opts->{d})) {
-  my $cmds = [];
-  push(@$cmds, "$libtool --mode=clean rm -f $mod_name.la *.lo");
-
-  run_cmds($cmds);
-}
-
-if (!defined($opts->{c}) &&
-    !defined($opts->{i}) &&
-    !defined($opts->{d})) {
-  print STDERR "No compile, install, or clean mode requested, exiting\n";
-  exit 1;
-}
-
-exit 0;
-
-sub get_module_name {
-  # Determine the name of the module (e.g. "mod_foo") being operated upon.
-  if (defined($opts->{n})) {
-    return $opts->{n};
-  }
-
-  foreach my $file (@ARGV) {
-    # Handle an argument such as 'contrib/mod_sql_sqlite.c' by keeping
-    # just the name portion of the path.
-
-    if ($file =~ /\/?mod_([^\/]+)\.(c|la)$/) {
-      return "mod_$1";
-    }
-  }
-
-  return "mod_unknown";
-}
-
-sub run_cmds {
-  my $cmds = shift;
-
-  foreach my $cmd (@$cmds) {
-    print STDOUT "$cmd\n";
-
-    my $res = system($cmd);
-    if ($res) {
-      print STDERR "$prog: error executing command (", $res >> 8, ")\n";
-      exit 1;
-    }
-  }
-}
-
-sub usage {
-  my $prog = basename($0);
-
-  print STDOUT <<EOU;
-
-usage: $prog <action> <opts> <source files>
-
-Actions:
-
- -c, --compile          Compiles the listed .c source files into a proftpd
-                        DSO module.
-
- -i, --install          Installs a compiled proftpd DSO module into the
-                        directory where proftpd expects to find loadable
-                        DSO modules.
-
- -d, --clean            Removes any generated files, returning the build
-                        directory to a clean state.
-
-Options:
-
- -h, --help             Displays this message.
-
- -n, --name             Tells prxs the name of the module being compiled.
-                        By default, prxs determines the module name from
-                        the list of .c files listed, expecting to see a
-                        "mod_\$name.c" file.
-
- -D key                 Passes these macros through to the compilation step.
- -D key=value           Note that the space before the key is important.
-
- -I includedir          Specify additional include file search directories.
-                        Note that the space before the directory is important.
-
- -L libdir              Specify additional library file search directories.
-                        Note that the space before the directory is important.
-
- -l library             Specify additional libraries for linking.
-                        Note that the space before the library name is important.
-
-At least one of the above actions must be specified when using prxs.  More
-than one action can be specified at the same time.
-
-To use prxs all in one step, you could do:
-
-  prxs -c -i -d mod_custom.c
-
-EOU
-}
diff --git a/src/prxs.in b/src/prxs.in
index 8775ebb..53e7c62 100755
--- a/src/prxs.in
+++ b/src/prxs.in
@@ -17,7 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
 #
-#  $Id: prxs.in,v 1.10 2012/09/19 00:11:39 castaglia Exp $
+#  $Id: prxs.in,v 1.10 2012-09-19 00:11:39 castaglia Exp $
 # ---------------------------------------------------------------------------
 
 use strict;
diff --git a/src/regexp.c b/src/regexp.c
index bfeebfa..63e9103 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -25,7 +25,7 @@
  */
 
 /* Regex management code
- * $Id: regexp.c,v 1.20 2013/03/14 21:49:19 castaglia Exp $
+ * $Id: regexp.c,v 1.20 2013-03-14 21:49:19 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/response.c b/src/response.c
index f6ca20c..7c3e378 100644
--- a/src/response.c
+++ b/src/response.c
@@ -23,7 +23,7 @@
  */
 
 /* Command response routines
- * $Id: response.c,v 1.22 2011/08/13 19:24:06 castaglia Exp $
+ * $Id: response.c,v 1.22 2011-08-13 19:24:06 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/rlimit.c b/src/rlimit.c
index 7b7d7da..915680f 100644
--- a/src/rlimit.c
+++ b/src/rlimit.c
@@ -23,7 +23,7 @@
  */
 
 /* Resource limits implementation
- * $Id: rlimit.c,v 1.4 2013/06/06 20:26:11 castaglia Exp $
+ * $Id: rlimit.c,v 1.4 2013-06-06 20:26:11 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/scoreboard.c b/src/scoreboard.c
index 0ecd531..282177c 100644
--- a/src/scoreboard.c
+++ b/src/scoreboard.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server daemon
- * Copyright (c) 2001-2013 The ProFTPD Project team
+ * Copyright (c) 2001-2014 The ProFTPD Project team
  *
  * 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
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD scoreboard support.
- * $Id: scoreboard.c,v 1.81 2013/12/09 19:16:14 castaglia Exp $
+ * $Id: scoreboard.c,v 1.81 2013-12-09 19:16:14 castaglia Exp $
  */
 
 #include "conf.h"
@@ -208,6 +208,8 @@ static int rlock_scoreboard(void) {
 }
 
 static int unlock_entry(int fd) {
+  unsigned int nattempts = 1;
+
   entry_lock.l_type = F_UNLCK;
   entry_lock.l_whence = SEEK_CUR;
   entry_lock.l_len = sizeof(pr_scoreboard_entry_t);
@@ -215,7 +217,7 @@ static int unlock_entry(int fd) {
   pr_trace_msg("lock", 9, "attempting to unlock scoreboard fd %d entry, "
     "offset %" PR_LU, fd, (pr_off_t) entry_lock.l_start);
 
-  while (fcntl(fd, F_SETLKW, &entry_lock) < 0) {
+  while (fcntl(fd, F_SETLK, &entry_lock) < 0) {
     int xerrno = errno;
 
     if (xerrno == EINTR) {
@@ -223,6 +225,26 @@ static int unlock_entry(int fd) {
       continue;
     }
 
+    if (xerrno == EAGAIN) {
+      /* Treat this as an interrupted call, call pr_signals_handle() (which
+       * will delay for a few msecs because of EINTR), and try again.
+       * After MAX_LOCK_ATTEMPTS attempts, give up altogether.
+       */
+
+      nattempts++;
+      if (nattempts <= SCOREBOARD_MAX_LOCK_ATTEMPTS) {
+        errno = EINTR;
+
+        pr_signals_handle();
+
+        errno = 0;
+        pr_trace_msg("lock", 9,
+          "attempt #%u to to unlock scoreboard fd %d entry, offset %" PR_LU,
+          nattempts, fd, (pr_off_t) entry_lock.l_start);
+        continue;
+      }
+    }
+
     pr_trace_msg("lock", 3, "unlock of scoreboard fd %d entry failed: %s", fd,
       strerror(xerrno));
 
@@ -310,6 +332,8 @@ static int unlock_scoreboard(void) {
 }
 
 static int wlock_entry(int fd) {
+  unsigned int nattempts = 1;
+
   entry_lock.l_type = F_WRLCK;
   entry_lock.l_whence = SEEK_CUR;
   entry_lock.l_len = sizeof(pr_scoreboard_entry_t);
@@ -317,7 +341,7 @@ static int wlock_entry(int fd) {
   pr_trace_msg("lock", 9, "attempting to write-lock scoreboard fd %d entry, "
     "offset %" PR_LU, fd, (pr_off_t) entry_lock.l_start);
 
-  while (fcntl(fd, F_SETLKW, &entry_lock) < 0) {
+  while (fcntl(fd, F_SETLK, &entry_lock) < 0) {
     int xerrno = errno;
 
     if (xerrno == EINTR) {
@@ -325,6 +349,26 @@ static int wlock_entry(int fd) {
       continue;
     }
 
+    if (xerrno == EAGAIN) {
+      /* Treat this as an interrupted call, call pr_signals_handle() (which
+       * will delay for a few msecs because of EINTR), and try again.
+       * After MAX_LOCK_ATTEMPTS attempts, give up altogether.
+       */
+
+      nattempts++;
+      if (nattempts <= SCOREBOARD_MAX_LOCK_ATTEMPTS) {
+        errno = EINTR;
+
+        pr_signals_handle();
+
+        errno = 0;
+        pr_trace_msg("lock", 9,
+          "attempt #%u to write-lock scoreboard fd %d entry, offset %" PR_LU,
+          nattempts, fd, (pr_off_t) entry_lock.l_start);
+        continue;
+      }
+    }
+
     pr_trace_msg("lock", 3, "write-lock of scoreboard fd %d entry failed: %s",
       fd, strerror(xerrno));
 
diff --git a/src/session.c b/src/session.c
index 9f60c50..2c80947 100644
--- a/src/session.c
+++ b/src/session.c
@@ -21,7 +21,7 @@
  * distribute the resulting executable, without including the source code for
  * OpenSSL in the source distribution.
  *
- * $Id: session.c,v 1.16 2013/08/25 21:16:39 castaglia Exp $
+ * $Id: session.c,v 1.16 2013-08-25 21:16:39 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/sets.c b/src/sets.c
index 8bace82..d38aabf 100644
--- a/src/sets.c
+++ b/src/sets.c
@@ -24,7 +24,7 @@
  */
 
 /* Generic set manipulation
- * $Id: sets.c,v 1.16 2011/05/23 21:22:24 castaglia Exp $
+ * $Id: sets.c,v 1.16 2011-05-23 21:22:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/stash.c b/src/stash.c
index e8ecd34..004de58 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -23,7 +23,7 @@
  */
 
 /* Symbol table hashes
- * $Id: stash.c,v 1.12 2014/02/11 15:17:04 castaglia Exp $
+ * $Id: stash.c,v 1.12 2014-02-11 15:17:04 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/str.c b/src/str.c
index 0f2f7bc..eb7924c 100644
--- a/src/str.c
+++ b/src/str.c
@@ -23,7 +23,7 @@
  */
 
 /* String manipulation functions
- * $Id: str.c,v 1.21 2013/11/24 00:45:30 castaglia Exp $
+ * $Id: str.c,v 1.21 2013-11-24 00:45:30 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/support.c b/src/support.c
index 9e81f19..44e6ff9 100644
--- a/src/support.c
+++ b/src/support.c
@@ -27,7 +27,7 @@
 /* Various basic support routines for ProFTPD, used by all modules
  * and not specific to one or another.
  *
- * $Id: support.c,v 1.120 2013/08/07 16:35:27 castaglia Exp $
+ * $Id: support.c,v 1.120 2013-08-07 16:35:27 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/table.c b/src/table.c
index 1771035..1a6bb38 100644
--- a/src/table.c
+++ b/src/table.c
@@ -23,7 +23,7 @@
  */
 
 /* Table API implementation
- * $Id: table.c,v 1.32 2012/02/24 01:37:27 castaglia Exp $
+ * $Id: table.c,v 1.32 2012-02-24 01:37:27 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/throttle.c b/src/throttle.c
index abe45d8..e72deaa 100644
--- a/src/throttle.c
+++ b/src/throttle.c
@@ -23,7 +23,7 @@
  */
 
 /* TransferRate throttling
- * $Id: throttle.c,v 1.12 2012/12/28 02:56:32 castaglia Exp $
+ * $Id: throttle.c,v 1.12 2012-12-28 02:56:32 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/timers.c b/src/timers.c
index 19a6061..331f17c 100644
--- a/src/timers.c
+++ b/src/timers.c
@@ -24,7 +24,7 @@
  */
 
 /* Timer system, based on alarm() and SIGALRM
- * $Id: timers.c,v 1.39 2013/10/09 06:36:20 castaglia Exp $
+ * $Id: timers.c,v 1.39 2013-10-09 06:36:20 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/trace.c b/src/trace.c
index 2d8c3e7..ad0a958 100644
--- a/src/trace.c
+++ b/src/trace.c
@@ -23,7 +23,7 @@
  */
 
 /* Trace functions
- * $Id: trace.c,v 1.46 2013/02/25 19:40:43 castaglia Exp $
+ * $Id: trace.c,v 1.46 2013-02-25 19:40:43 castaglia Exp $
  */
 
 
diff --git a/src/utf8.c b/src/utf8.c
new file mode 100644
index 0000000..9583b07
--- /dev/null
+++ b/src/utf8.c
@@ -0,0 +1,203 @@
+/*
+ * ProFTPD - FTP server daemon
+ * Copyright (c) 2006-2008 The ProFTPD Project team
+ *
+ * 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 exemption, The ProFTPD Project team and other respective
+ * copyright holders give permission to link this program with OpenSSL, and
+ * distribute the resulting executable, without including the source code for
+ * OpenSSL in the source distribution.
+ */
+
+/* UTF8 encoding/decoding
+ * $Id: utf8.c,v 1.6 2008-03-25 22:20:44 castaglia Exp $
+ */
+
+#include "conf.h"
+
+#ifdef PR_USE_NLS
+
+#ifdef HAVE_ICONV_H
+# include <iconv.h>
+#endif
+
+#ifdef HAVE_LANGINFO_H
+# include <langinfo.h>
+#endif
+
+#ifdef HAVE_ICONV_H
+static iconv_t decode_conv = (iconv_t) -1;
+static iconv_t encode_conv = (iconv_t) -1;
+
+static int utf8_convert(iconv_t conv, char *inbuf, size_t *inbuflen,
+    char *outbuf, size_t *outbuflen) {
+# ifdef HAVE_ICONV
+  char *start = inbuf;
+
+  while (inbuflen > 0) {
+    size_t nconv = iconv(conv, &inbuf, inbuflen, &outbuf, outbuflen);
+
+    if (nconv == (size_t) -1) {
+      if (errno == EINVAL) {
+        memmove(start, inbuf, *inbuflen);
+        continue;
+
+      } else
+        return -1;
+    }
+
+    break;
+  }
+  return 0;
+# else
+  errno = ENOSYS;
+  return -1;
+# endif /* HAVE_ICONV */
+}
+#endif /* !HAVE_ICONV_H */
+
+int utf8_free(void) {
+# ifdef HAVE_ICONV
+  int res;
+
+  /* Close the iconv handles. */
+  res = iconv_close(encode_conv);
+  if (res < 0) 
+    return -1;
+
+  res = iconv_close(decode_conv);
+  if (res < 0)
+    return -1;
+
+  return 0;
+# else
+  errno = ENOSYS;
+  return -1;
+# endif
+}
+
+int utf8_init(void) {
+  const char *local_charset;
+
+#ifdef HAVE_NL_LANGINFO
+  /* Look up the current charset.  If there's a problem, default to
+   * UCS-2.
+   */
+  local_charset = nl_langinfo(CODESET);
+  if (!local_charset) {
+    local_charset = "C";
+    pr_trace_msg("utf8", 1,
+      "unable to determine locale, defaulting to 'C' for UTF8 conversion");
+
+  } else {
+    pr_trace_msg("utf8", 1, "converting UTF8 to local character set '%s'",
+      local_charset);
+  }
+#else
+  local_charset = "C";
+  pr_trace_msg("utf8", 1,
+    "nl_langinfo(3) not supported, defaulting to using 'C' for UTF8 "
+    "conversion");
+#endif /* HAVE_NL_LANGINFO */
+
+# ifdef HAVE_ICONV
+  /* Get the iconv handles. */
+  encode_conv = iconv_open("UTF-8", local_charset);
+  if (encode_conv == (iconv_t) -1)
+    return -1;
+ 
+  decode_conv = iconv_open(local_charset, "UTF-8");
+  if (decode_conv == (iconv_t) -1)
+    return -1;
+
+  return 0;
+# else
+  errno = ENOSYS;
+  return -1;
+# endif /* HAVE_ICONV */
+}
+
+char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen) {
+#ifdef HAVE_ICONV_H
+  size_t inbuflen, outbuflen;
+  char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res = NULL;
+
+  if (!p || !in || !outlen) {
+    errno = EINVAL;
+    return NULL;
+  }
+
+  if (decode_conv == (iconv_t) -1) {
+    errno = EPERM;
+    return NULL;
+  }
+
+  inbuf = pcalloc(p, inlen);
+  memcpy(inbuf, in, inlen);
+  inbuflen = inlen;
+
+  outbuflen = sizeof(outbuf);
+
+  if (utf8_convert(decode_conv, inbuf, &inbuflen, outbuf, &outbuflen) < 0)
+    return NULL;
+
+  *outlen = sizeof(outbuf) - outbuflen;
+  res = pcalloc(p, *outlen);
+  memcpy(res, outbuf, *outlen);
+
+  return res;
+#else
+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 decoding possible");
+  return pstrdup(p, in);
+#endif /* !HAVE_ICONV_H */
+}
+
+char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen) {
+#ifdef HAVE_ICONV_H
+  size_t inbuflen, outbuflen;
+  char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res;
+
+  if (!p || !in || !outlen) {
+    errno = EINVAL;
+    return NULL;
+  }
+
+  if (encode_conv == (iconv_t) -1) {
+    errno = EPERM;
+    return NULL;
+  }
+
+  inbuf = pcalloc(p, inlen);
+  memcpy(inbuf, in, inlen);
+  inbuflen = inlen;
+
+  outbuflen = sizeof(outbuf);
+
+  if (utf8_convert(encode_conv, inbuf, &inbuflen, outbuf, &outbuflen) < 0)
+    return NULL;
+
+  *outlen = sizeof(outbuf) - outbuflen;
+  res = pcalloc(p, *outlen);
+  memcpy(res, outbuf, *outlen);
+
+  return res;
+#else
+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 encoding possible");
+  return pstrdup(p, in);
+#endif /* !HAVE_ICONV_H */
+}
+
+#endif /* PR_USE_NLS */
diff --git a/src/var.c b/src/var.c
index 855eb1a..d861487 100644
--- a/src/var.c
+++ b/src/var.c
@@ -23,7 +23,7 @@
  */
 
 /* Variables API implementation
- * $Id: var.c,v 1.8 2013/10/06 05:30:31 castaglia Exp $
+ * $Id: var.c,v 1.8 2013-10-06 05:30:31 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/version.c b/src/version.c
index 540acf3..1b0216a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -23,7 +23,7 @@
  */
 
 /* Versioning
- * $Id: version.c,v 1.2 2011/05/23 21:22:24 castaglia Exp $
+ * $Id: version.c,v 1.2 2011-05-23 21:22:24 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/wtmp.c b/src/wtmp.c
index dfedcd2..d411411 100644
--- a/src/wtmp.c
+++ b/src/wtmp.c
@@ -21,7 +21,7 @@
  * the resulting executable, without including the source code for OpenSSL in
  * the source distribution.
  *
- * $Id: wtmp.c,v 1.10 2013/12/09 19:16:15 castaglia Exp $
+ * $Id: wtmp.c,v 1.10 2013-12-09 19:16:15 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/src/xferlog.5 b/src/xferlog.5
deleted file mode 100644
index 7980423..0000000
--- a/src/xferlog.5
+++ /dev/null
@@ -1,173 +0,0 @@
-.TH XFERLOG 5
-.SH NAME
-xferlog \- ProFTPD server logfile
-.SH DESCRIPTION
-.LP
-The
-.B xferlog
-file contains logging information from the FTP server daemon,
-.BR proftpd (8).
-This file usually is found in
-.BR /var/log
-but can be located anywhere by
-using a
-.BR proftpd (8)
-configuration directive.
-Each server entry is composed of a single line of the following form, 
-with all fields being separated by spaces.
-.IP
-.I
-current-time\ \  transfer-time\ \  remote-host\ \  file-size\ \  filename\ \  transfer-type\ \  special-action-flag\ \  direction\ \  access-mode\ \  username\ \  service-name\ \  authentication-method\ \  authenticated-user-id\ \ completion-status
-.LP
-.TP 20
-.I current-time
-is the current local time in the form "DDD MMM dd hh:mm:ss YYYY". Where DDD
-is the day of the week, MMM is the month, dd is the day of the month,
-hh is the hour, mm is the minutes, ss is the seconds, and YYYY is the year.
-.TP 
-.I transfer-time
-is the total time in seconds for the transfer.
-.TP
-.I remote-host
-is the remote host name.
-.TP
-.I file-size
-is the size of the transferred file in bytes.
-.TP
-.I filename
-is the name of the transferred file.  If the filename contains any spaces or
-control characters, each such character is replaced by an underscore ('_')
-character.
-.TP
-.I transfer-type
-is a single character indicating the type of transfer. Can be one of:
-.RS
-.RS
-.PD 0
-.TP 10
-.B a
-for an ascii transfer
-.TP
-.B b
-for a binary transfer
-.PD
-.RE
-.RE
-.TP
-.I special-action-flag
-is one or more single character flags indicating any special action taken. 
-Can be one or more of: 
-.RS
-.RS
-.PD 0
-.TP 10
-.B C
-file was compressed
-.TP
-.B U
-file was uncompressed
-.TP
-.B T
-file was tar'ed
-.TP
-.B _
-no action was taken
-.PD
-.RE
-.RE
-.TP
-.I direction
-is the direction of the transfer. Can be one of:
-.RS
-.RS
-.PD 0
-.TP 10
-.B o
-outgoing
-.TP
-.B i
-incoming
-.TP
-.B d
-deleted
-.PD
-.RE
-.RE
-.TP
-.I access-mode
-is the method by which the user is logged in. Can be one of:
-.RS
-.RS
-.PD 0
-.TP 10
-.B a
-(anonymous) is for an anonymous guest user. 
-.TP
-.B r
-(real) is for a local authenticated user.
-.PD
-.RE
-.RE
-.TP
-.I username
-is the local username, or if guest, the ID string given. 
-.TP
-.I service-name
-is the name of the service being invoked, usually FTP.
-.TP
-.I authentication-method
-is the method of authentication used. Can be one of:
-.RS
-.RS
-.PD 0
-.TP 10
-.B 0
-none
-.TP
-.B 1
-RFC931 Authentication
-.PD
-.RE
-.RE
-.TP
-.I authenticated-user-id
-is the user id returned by the authentication method. 
-A * is used if an authenticated user id is not available.
-.TP
-.I completion-status
-is a single character indicating the status of the transfer.  Can be one of:
-.RS
-.RS
-.PD 0
-.TP 10
-.B c
-complete transfer
-.TP
-.B i
-incomplete transfer
-.PD
-.RE
-.RE
-.SH FILES
-.PD 0
-.TP 20
-.B /var/log/xferlog
-.PP
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH "SEE ALSO"
-.BR proftpd(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/src/xferlog.c b/src/xferlog.c
index 4e1ce66..771139e 100644
--- a/src/xferlog.c
+++ b/src/xferlog.c
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD xferlog(5) logging support.
- * $Id: xferlog.c,v 1.12 2013/02/15 22:39:00 castaglia Exp $
+ * $Id: xferlog.c,v 1.12 2013-02-15 22:39:00 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/tests/api/array.c b/tests/api/array.c
index 52b92a3..47e9307 100644
--- a/tests/api/array.c
+++ b/tests/api/array.c
@@ -23,7 +23,7 @@
  */
 
 /* Array API tests
- * $Id: array.c,v 1.2 2011/05/23 20:50:29 castaglia Exp $
+ * $Id: array.c,v 1.2 2011-05-23 20:50:29 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/class.c b/tests/api/class.c
index 27913f1..fbdae7f 100644
--- a/tests/api/class.c
+++ b/tests/api/class.c
@@ -24,7 +24,7 @@
 
 /*
  * Class API tests
- * $Id: class.c,v 1.2 2011/05/23 20:50:30 castaglia Exp $
+ * $Id: class.c,v 1.2 2011-05-23 20:50:30 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/cmd.c b/tests/api/cmd.c
index 334ae05..6600d6e 100644
--- a/tests/api/cmd.c
+++ b/tests/api/cmd.c
@@ -23,7 +23,7 @@
  */
 
 /* Command API tests
- * $Id: cmd.c,v 1.4 2014/01/27 18:25:15 castaglia Exp $
+ * $Id: cmd.c,v 1.4 2014-01-27 18:25:15 castaglia Exp $
  */
 
 #include "tests.h"
@@ -359,7 +359,6 @@ END_TEST
 START_TEST (cmd_get_displayable_str_test) {
   char *ok, *res = NULL;
   cmd_rec *cmd = NULL;
-  size_t len = 0;
 
   res = pr_cmd_get_displayable_str(NULL, NULL);
   fail_unless(res == NULL, "Failed to handle null cmd_rec");
diff --git a/tests/api/env.c b/tests/api/env.c
index 9ae5eb8..4d960c9 100644
--- a/tests/api/env.c
+++ b/tests/api/env.c
@@ -23,7 +23,7 @@
  */
 
 /* Env API tests
- * $Id: env.c,v 1.2 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: env.c,v 1.2 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/event.c b/tests/api/event.c
index 3233412..b04130b 100644
--- a/tests/api/event.c
+++ b/tests/api/event.c
@@ -23,7 +23,7 @@
  */
 
 /* Event API tests
- * $Id: event.c,v 1.3 2013/01/05 03:36:39 castaglia Exp $
+ * $Id: event.c,v 1.3 2013-01-05 03:36:39 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/expr.c b/tests/api/expr.c
index 6e75dec..ff6f21a 100644
--- a/tests/api/expr.c
+++ b/tests/api/expr.c
@@ -23,7 +23,7 @@
  */
 
 /* Expression API tests
- * $Id: expr.c,v 1.4 2011/12/11 02:14:43 castaglia Exp $
+ * $Id: expr.c,v 1.4 2011-12-11 02:14:43 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/feat.c b/tests/api/feat.c
index 60f6210..9a1be75 100644
--- a/tests/api/feat.c
+++ b/tests/api/feat.c
@@ -23,7 +23,7 @@
  */
 
 /* Feat API tests
- * $Id: feat.c,v 1.2 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: feat.c,v 1.2 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/fsio.c b/tests/api/fsio.c
index e4578ec..5efb21b 100644
--- a/tests/api/fsio.c
+++ b/tests/api/fsio.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server testsuite
- * Copyright (c) 2008-2014 The ProFTPD Project team
+ * Copyright (c) 2008-2015 The ProFTPD Project team
  *
  * 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
@@ -22,9 +22,7 @@
  * OpenSSL in the source distribution.
  */
 
-/* FSIO API tests
- * $Id: fsio.c,v 1.3 2014/01/20 19:36:27 castaglia Exp $
- */
+/* FSIO API tests */
 
 #include "tests.h"
 
@@ -36,6 +34,8 @@ static void set_up(void) {
   if (p == NULL) {
     p = permanent_pool = make_sub_pool(NULL);
   }
+
+  init_fs();
 }
 
 static void tear_down(void) {
@@ -175,6 +175,18 @@ START_TEST (fs_dircat_test) {
 }
 END_TEST
 
+START_TEST (fs_setcwd_test) {
+  int res;
+
+  /* Make sure that we don't segfault if we call pr_fs_setcwd() on the
+   * buffer that it is already using.
+   */
+  res = pr_fs_setcwd(pr_fs_getcwd());
+  fail_unless(res == 0, "Failed to set cwd to '%s': %s", pr_fs_getcwd(),
+    strerror(errno));
+}
+END_TEST
+
 Suite *tests_get_fsio_suite(void) {
   Suite *suite;
   TCase *testcase;
@@ -188,6 +200,7 @@ Suite *tests_get_fsio_suite(void) {
   tcase_add_test(testcase, fs_clean_path_test);
   tcase_add_test(testcase, fs_clean_path2_test);
   tcase_add_test(testcase, fs_dircat_test);
+  tcase_add_test(testcase, fs_setcwd_test);
 
   suite_add_tcase(suite, testcase);
   return suite;
diff --git a/tests/api/modules.c b/tests/api/modules.c
index 9921a96..b98f81f 100644
--- a/tests/api/modules.c
+++ b/tests/api/modules.c
@@ -23,7 +23,7 @@
  */
 
 /* Modules API tests
- * $Id: modules.c,v 1.3 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: modules.c,v 1.3 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/netacl.c b/tests/api/netacl.c
index d0ead2f..89229bf 100644
--- a/tests/api/netacl.c
+++ b/tests/api/netacl.c
@@ -23,7 +23,7 @@
  */
 
 /* NetACL API tests
- * $Id: netacl.c,v 1.4 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: netacl.c,v 1.4 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/netaddr.c b/tests/api/netaddr.c
index 5570b1e..39e13b6 100644
--- a/tests/api/netaddr.c
+++ b/tests/api/netaddr.c
@@ -23,7 +23,7 @@
  */
 
 /* NetAddr API tests
- * $Id: netaddr.c,v 1.13 2014/01/27 18:31:35 castaglia Exp $
+ * $Id: netaddr.c,v 1.13 2014-01-27 18:31:35 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/netio.c b/tests/api/netio.c
index 3198cee..c5069da 100644
--- a/tests/api/netio.c
+++ b/tests/api/netio.c
@@ -23,7 +23,7 @@
  */
 
 /* NetIO API tests
- * $Id: netio.c,v 1.1 2014/01/06 06:58:23 castaglia Exp $
+ * $Id: netio.c,v 1.1 2014-01-06 06:58:23 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/pool.c b/tests/api/pool.c
index 6d51276..f70dca0 100644
--- a/tests/api/pool.c
+++ b/tests/api/pool.c
@@ -23,7 +23,7 @@
  */
 
 /* Pool API tests
- * $Id: pool.c,v 1.5 2013/02/19 15:49:16 castaglia Exp $
+ * $Id: pool.c,v 1.5 2013-02-19 15:49:16 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/regexp.c b/tests/api/regexp.c
index 635cbb7..f86f3b7 100644
--- a/tests/api/regexp.c
+++ b/tests/api/regexp.c
@@ -23,7 +23,7 @@
  */
 
 /* Regexp API tests
- * $Id: regexp.c,v 1.4 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: regexp.c,v 1.4 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/response.c b/tests/api/response.c
index fba1237..d07c377 100644
--- a/tests/api/response.c
+++ b/tests/api/response.c
@@ -23,7 +23,7 @@
  */
 
 /* Response API tests
- * $Id: response.c,v 1.5 2012/07/26 22:40:37 castaglia Exp $
+ * $Id: response.c,v 1.5 2012-07-26 22:40:37 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/scoreboard.c b/tests/api/scoreboard.c
index a15bf20..6fb6503 100644
--- a/tests/api/scoreboard.c
+++ b/tests/api/scoreboard.c
@@ -23,7 +23,7 @@
  */
 
 /* Scoreboard API tests
- * $Id: scoreboard.c,v 1.10 2013/01/05 03:36:39 castaglia Exp $
+ * $Id: scoreboard.c,v 1.10 2013-01-05 03:36:39 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/sets.c b/tests/api/sets.c
index c64dbca..eea5c6a 100644
--- a/tests/api/sets.c
+++ b/tests/api/sets.c
@@ -23,7 +23,7 @@
  */
 
 /* Sets API tests
- * $Id: sets.c,v 1.2 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: sets.c,v 1.2 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/stash.c b/tests/api/stash.c
index bc89f7b..0afd17f 100644
--- a/tests/api/stash.c
+++ b/tests/api/stash.c
@@ -23,7 +23,7 @@
  */
 
 /* Stash API tests
- * $Id: stash.c,v 1.2 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: stash.c,v 1.2 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/str.c b/tests/api/str.c
index 5cb7988..fc9ecf0 100644
--- a/tests/api/str.c
+++ b/tests/api/str.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - FTP server testsuite
- * Copyright (c) 2008-2014 The ProFTPD Project team
+ * Copyright (c) 2008-2015 The ProFTPD Project team
  *
  * 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
@@ -23,7 +23,7 @@
  */
 
 /* String API tests
- * $Id: str.c,v 1.12 2014/01/27 18:34:44 castaglia Exp $
+ * $Id: str.c,v 1.12 2014-01-27 18:34:44 castaglia Exp $
  */
 
 #include "tests.h"
@@ -65,6 +65,11 @@ START_TEST (sstrncpy_test) {
 
   ok = "Therefore, all progress depends on the unreasonable man";
 
+  mark_point();
+  res = sstrncpy(ok, ok, 1);
+  fail_unless(res == 1, "Expected result 1, got %d", len, res);
+
+  mark_point();
   memset(dst, 'A', sz);
   len = 1;
 
diff --git a/tests/api/table.c b/tests/api/table.c
index 6addb95..822901c 100644
--- a/tests/api/table.c
+++ b/tests/api/table.c
@@ -23,7 +23,7 @@
  */
 
 /* Table API tests
- * $Id: table.c,v 1.6 2012/01/26 17:55:07 castaglia Exp $
+ * $Id: table.c,v 1.6 2012-01-26 17:55:07 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/tests.h b/tests/api/tests.h
index f102149..06845e4 100644
--- a/tests/api/tests.h
+++ b/tests/api/tests.h
@@ -23,7 +23,7 @@
  */
 
 /* Testsuite management
- * $Id: tests.h,v 1.7 2014/01/06 06:58:23 castaglia Exp $
+ * $Id: tests.h,v 1.7 2014-01-06 06:58:23 castaglia Exp $
  */
 
 #ifndef PR_TESTS_H
diff --git a/tests/api/timers.c b/tests/api/timers.c
index 1d10652..8a347f7 100644
--- a/tests/api/timers.c
+++ b/tests/api/timers.c
@@ -23,7 +23,7 @@
  */
 
 /* Timers API tests
- * $Id: timers.c,v 1.7 2013/09/24 01:21:16 castaglia Exp $
+ * $Id: timers.c,v 1.7 2013-09-24 01:21:16 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/var.c b/tests/api/var.c
index 84b8907..ab86b95 100644
--- a/tests/api/var.c
+++ b/tests/api/var.c
@@ -23,7 +23,7 @@
  */
 
 /* Var API tests
- * $Id: var.c,v 1.2 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: var.c,v 1.2 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/api/version.c b/tests/api/version.c
index 564d9bc..2bf1932 100644
--- a/tests/api/version.c
+++ b/tests/api/version.c
@@ -23,7 +23,7 @@
  */
 
 /* Version API tests
- * $Id: version.c,v 1.2 2011/05/23 20:50:31 castaglia Exp $
+ * $Id: version.c,v 1.2 2011-05-23 20:50:31 castaglia Exp $
  */
 
 #include "tests.h"
diff --git a/tests/t/commands.t b/tests/t/commands.t
new file mode 100644
index 0000000..d25e87b
--- /dev/null
+++ b/tests/t/commands.t
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+
+use lib qw(t/lib);
+use strict;
+
+use Test::Unit::HarnessUnit;
+
+$| = 1;
+
+my $r = Test::Unit::HarnessUnit->new();
+$r->start("ProFTPD::Tests::Commands");
diff --git a/tests/t/config/directory.t b/tests/t/config/directory.t
new file mode 100644
index 0000000..7286a91
--- /dev/null
+++ b/tests/t/config/directory.t
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+
+use lib qw(t/lib);
+use strict;
+
+use Test::Unit::HarnessUnit;
+
+$| = 1;
+
+my $r = Test::Unit::HarnessUnit->new();
+$r->start("ProFTPD::Tests::Config::Directory");
diff --git a/tests/t/etc/modules/mod_deflate/zmode.pdf b/tests/t/etc/modules/mod_deflate/zmode.pdf
deleted file mode 100644
index bd53923..0000000
Binary files a/tests/t/etc/modules/mod_deflate/zmode.pdf and /dev/null differ
diff --git a/tests/t/etc/modules/mod_geoip/GeoIP.dat b/tests/t/etc/modules/mod_geoip/GeoIP.dat
new file mode 100644
index 0000000..73fbe58
Binary files /dev/null and b/tests/t/etc/modules/mod_geoip/GeoIP.dat differ
diff --git a/tests/t/etc/modules/mod_geoip/GeoIPASNum.dat b/tests/t/etc/modules/mod_geoip/GeoIPASNum.dat
new file mode 100644
index 0000000..cbafac0
Binary files /dev/null and b/tests/t/etc/modules/mod_geoip/GeoIPASNum.dat differ
diff --git a/tests/t/etc/modules/mod_geoip/GeoIPv6.dat b/tests/t/etc/modules/mod_geoip/GeoIPv6.dat
new file mode 100644
index 0000000..3dfd3d1
Binary files /dev/null and b/tests/t/etc/modules/mod_geoip/GeoIPv6.dat differ
diff --git a/tests/t/etc/modules/mod_geoip/GeoLiteCity.dat b/tests/t/etc/modules/mod_geoip/GeoLiteCity.dat
new file mode 100644
index 0000000..9136f70
Binary files /dev/null and b/tests/t/etc/modules/mod_geoip/GeoLiteCity.dat differ
diff --git a/tests/t/etc/modules/mod_quotatab_file/ftpquota.limittab b/tests/t/etc/modules/mod_quotatab_file/ftpquota.limittab
new file mode 100644
index 0000000..ad4da34
Binary files /dev/null and b/tests/t/etc/modules/mod_quotatab_file/ftpquota.limittab differ
diff --git a/tests/t/etc/modules/mod_quotatab_file/ftpquota.tallytab b/tests/t/etc/modules/mod_quotatab_file/ftpquota.tallytab
new file mode 100644
index 0000000..dae0f9d
Binary files /dev/null and b/tests/t/etc/modules/mod_quotatab_file/ftpquota.tallytab differ
diff --git a/tests/t/http.t b/tests/t/http.t
new file mode 100644
index 0000000..5723520
--- /dev/null
+++ b/tests/t/http.t
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+
+use lib qw(t/lib);
+use strict;
+
+use Test::Unit::HarnessUnit;
+
+$| = 1;
+
+my $r = Test::Unit::HarnessUnit->new();
+$r->start("ProFTPD::Tests::HTTP");
diff --git a/tests/t/lib/ProFTPD/Tests/Commands.pm b/tests/t/lib/ProFTPD/Tests/Commands.pm
new file mode 100644
index 0000000..86307a2
--- /dev/null
+++ b/tests/t/lib/ProFTPD/Tests/Commands.pm
@@ -0,0 +1,3838 @@
+package ProFTPD::Tests::Commands;
+
+use lib qw(t/lib);
+use base qw(Test::Unit::TestCase ProFTPD::TestSuite::Child);
+use strict;
+
+use File::Path qw(mkpath rmtree);
+use File::Spec;
+use IO::Handle;
+
+use ProFTPD::TestSuite::FTP;
+use ProFTPD::TestSuite::Utils qw(:auth :config :module :running :test :testsuite);
+
+$| = 1;
+
+my $order = 0;
+
+my $TESTS = {
+  cmds_pwd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_xpwd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_cwd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_cwd_fails_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_cwd_fails_eperm => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_xcwd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_cdup_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_xcup_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_syst_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_type_ascii_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_type_binary_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_type_other_fails => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_mkd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_mkd_fails_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_mkd_fails_eperm => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_xmkd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_rmd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_rmd_fails_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_rmd_fails_eperm => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_xrmd_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_dele_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_dele_fails_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_dele_fails_eperm => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_mdtm_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_mdtm_fails_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_mdtm_fails_eperm => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_size_ok => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_size_fails_ascii => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_size_fails_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  cmds_size_fails_eperm => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+};
+
+sub new {
+  return shift()->SUPER::new(@_);
+}
+
+sub list_tests {
+  return testsuite_get_runnable_tests($TESTS);
+}
+
+sub set_up {
+  my $self = shift;
+
+  # Create temporary scratch dir
+  eval { mkpath('tmp') };
+  if ($@) {
+    my $abs_path = File::Spec->rel2abs('tmp');
+    die("Can't create dir $abs_path: $@");
+  }
+}
+
+sub tear_down {
+  my $self = shift;
+  undef $self;
+
+  # Remove temporary scratch dir
+  eval { rmtree('tmp') };
+};
+
+sub cmds_pwd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->pwd() };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to PWD: $err");
+      }
+
+      my $expected;
+
+      $expected = 257;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "\"$home_dir\" is the current directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_xpwd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->xpwd() };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to XPWD: $err");
+      }
+
+      my $expected;
+
+      $expected = 257;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "\"$home_dir\" is the current directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_cwd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  mkpath($sub_dir);
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->cwd($sub_dir) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to CWD: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "CWD command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_cwd_fails_enoent {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->cwd($sub_dir) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("CWD succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$sub_dir: No such file or directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_cwd_fails_eperm {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  mkpath($sub_dir);
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      # Make it such that perms on the dir do not allow chdirs
+      unless (chmod(0440, $sub_dir)) {
+        my $err = $!;
+        print $writeh "done\n";
+        die("Failed to change perms on $sub_dir: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->cwd($sub_dir) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("CWD succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$sub_dir: No such file or directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_xcwd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  mkpath($sub_dir);
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->xcwd($sub_dir) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to XCWD: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "XCWD command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_cdup_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->cdup() };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to CDUP: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "CDUP command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_xcup_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->xcup() };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to XCUP: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "XCUP command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_syst_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->syst() };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to SYST: $err");
+      }
+
+      my $expected;
+
+      $expected = 215;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "UNIX Type: L8";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_type_ascii_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->type('ascii') };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to TYPE: $err");
+      }
+
+      my $expected;
+
+      $expected = 200;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "Type set to A";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_type_binary_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->type('binary') };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to TYPE: $err");
+      }
+
+      my $expected;
+
+      $expected = 200;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "Type set to I";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_type_other_fails {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->type('other') };
+      unless ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("TYPE succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 500;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "'TYPE other' not understood";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_mkd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mkd($sub_dir) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to MKD: $err");
+      }
+
+      my $expected;
+
+      $expected = 257;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "\"$sub_dir\" - Directory successfully created";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_mkd_fails_enoent {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo/bar');
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mkd($sub_dir) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("MKD succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$sub_dir: Operation not permitted";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_mkd_fails_eperm {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      # Make it such that perms on the parent dir do not allow writes
+      my $perms = (stat($home_dir))[2];
+      unless (chmod(0550, $home_dir)) {
+        my $err = $!;
+        print $writeh "done\n";
+        die("Failed to change perms on $home_dir: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mkd($sub_dir) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("MKD succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      # Restore the perms
+      chmod($perms, $home_dir);
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$sub_dir: Operation not permitted";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_xmkd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->xmkd($sub_dir) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to XMKD: $err");
+      }
+
+      my $expected;
+
+      $expected = 257;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "\"$sub_dir\" - Directory successfully created";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_rmd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  mkpath($sub_dir);
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->rmd($sub_dir) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to RMD: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "RMD command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_rmd_fails_enoent {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->rmd($sub_dir) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("RMD succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$sub_dir: Operation not permitted";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_rmd_fails_eperm {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      # Make it such that perms on the parent dir do not allow writes
+      my $perms = (stat($home_dir))[2];
+      unless (chmod(0550, $home_dir)) {
+        my $err = $!;
+        print $writeh "done\n";
+        die("Failed to change perms on $home_dir: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->rmd($sub_dir) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("RMD succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      # Restore the perms
+      chmod($perms, $home_dir);
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$sub_dir: Operation not permitted";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_xrmd_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $sub_dir = File::Spec->rel2abs('tmp/foo');
+  mkpath($sub_dir);
+  
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->xrmd($sub_dir) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to XRMD: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "XRMD command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_dele_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+  if (open(my $fh, "> $test_file")) {
+    close($fh);
+
+  } else {
+    die("Can't create $test_file: $!");
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->dele($test_file) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to DELE: $err");
+      }
+
+      my $expected;
+
+      $expected = 250;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "DELE command successful";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_dele_fails_enoent {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->dele($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("DELE succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$test_file: No such file or directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_dele_fails_eperm {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+  if (open(my $fh, "> $test_file")) {
+    close($fh);
+
+  } else {
+    die("Can't create $test_file: $!");
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      # Make it such that perms on the dir do not allow writes
+      my $perms = (stat($home_dir))[2];
+      unless (chmod(0550, $home_dir)) {
+        my $err = $!;
+        print $writeh "done\n";
+        die("Failed to change perms on $home_dir: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->dele($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("DELE succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      chmod($perms, $home_dir);
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$test_file: Operation not permitted";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_mdtm_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+  if (open(my $fh, "> $test_file")) {
+    close($fh);
+
+  } else {
+    die("Can't create $test_file: $!");
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mdtm($test_file) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to MDTM: $err");
+      }
+
+      my $expected;
+
+      $expected = 213;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      chomp($resp_msg);
+      $self->assert(qr/\d+/, $resp_msg);
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_mdtm_fails_enoent {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mdtm($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("MDTM succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$test_file: No such file or directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_mdtm_fails_eperm {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+  if (open(my $fh, "> $test_file")) {
+    close($fh);
+
+  } else {
+    die("Can't create $test_file: $!");
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      # Make it such that perms on the home do to not allow reads
+      my $perms = (stat($home_dir))[2];
+      unless (chmod(0220, $home_dir)) {
+        my $err = $!;
+        print $writeh "done\n";
+        die("Failed to change perms on $home_dir: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mdtm($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("MDTM succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      chmod($perms, $home_dir);
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$test_file: Permission denied";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_size_ok {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+  if (open(my $fh, "> $test_file")) {
+    print $fh "Hello, World!\n";
+    close($fh);
+
+  } else {
+    die("Can't create $test_file: $!");
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      eval { $client->type('binary') };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to TYPE: $err");
+      }
+    
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->size($test_file) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to SIZE: $err");
+      }
+
+      my $expected;
+
+      $expected = 213;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = 14;
+      chomp($resp_msg);
+      $self->assert($expected == $resp_msg,
+        test_msg("Expected $expected, got $resp_msg"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_size_fails_ascii {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      eval { $client->type('ascii') };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to TYPE: $err");
+      }
+    
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->size($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("SIZE succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "SIZE not allowed in ASCII mode";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_size_fails_enoent {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      eval { $client->type('binary') };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to TYPE: $err");
+      }
+    
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->size($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("SIZE succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$test_file: No such file or directory";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub cmds_size_fails_eperm {
+  my $self = shift;
+
+  my $config_file = 'tmp/cmds.conf';
+  my $pid_file = File::Spec->rel2abs('tmp/cmds.pid');
+  my $scoreboard_file = File::Spec->rel2abs('tmp/cmds.scoreboard');
+  my $log_file = File::Spec->rel2abs('cmds.log');
+
+  my $auth_user_file = File::Spec->rel2abs('tmp/cmds.passwd');
+  my $auth_group_file = File::Spec->rel2abs('tmp/cmds.group');
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs('tmp');
+
+  my $test_file = File::Spec->rel2abs('tmp/foo');
+  if (open(my $fh, "> $test_file")) {
+    close($fh);
+
+  } else {
+    die("Can't create $test_file: $!");
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, 500, 500, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', 500, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($readh, $writeh);
+  unless (pipe($readh, $writeh)) {
+    die("Can't open pipe: $!");
+  }
+
+  $writeh->autoflush(1);
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->login($user, $passwd) };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to log in: $err");
+      }
+
+      eval { $client->type('binary') };
+      if ($@) {
+        my $err = $@;
+        print $writeh "done\n";
+        die("Failed to TYPE: $err");
+      }
+    
+      # Make it such that perms on the home dir do not allow reads
+      my $perms = (stat($home_dir))[2];
+      unless (chmod(0220, $home_dir)) {
+        my $err = $!;
+        print $writeh "done\n";
+        die("Failed to change perms on $home_dir: $err");
+      }
+
+      my ($resp_code, $resp_msg);
+      eval { ($resp_code, $resp_msg) = $client->mdtm($test_file) };
+      unless ($@) {
+        print $writeh "done\n";
+        die("MDTM succeeded unexpectedly");
+
+      } else {
+        $resp_code = $client->response_code();
+        $resp_msg = $client->response_msg();
+      }
+
+      chmod($perms, $home_dir);
+
+      my $expected;
+
+      $expected = 550;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$test_file: Permission denied";
+      chomp($resp_msg);
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    print $writeh "done\n";
+
+  } else {
+    # Start server
+    server_start($config_file);
+
+    # Wait until we receive word from the child that it has finished its
+    # test.
+    while (my $msg = <$readh>) {
+      chomp($msg);
+
+      if ($msg eq 'done') {
+        last;
+      }
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+1;
diff --git a/tests/t/lib/ProFTPD/Tests/Commands/PORT.pm b/tests/t/lib/ProFTPD/Tests/Commands/PORT.pm
index af439b0..6c071d1 100644
--- a/tests/t/lib/ProFTPD/Tests/Commands/PORT.pm
+++ b/tests/t/lib/ProFTPD/Tests/Commands/PORT.pm
@@ -55,6 +55,11 @@ my $TESTS = {
     test_class => [qw(bug forking)],
   },
 
+  port_eaddrinuse_bug3944 => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
 };
 
 sub new {
@@ -1111,4 +1116,161 @@ sub port_during_xfer_bug3487 {
   unlink($log_file);
 }
 
+sub port_eaddrinuse_bug3944 {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/cmds.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/cmds.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/cmds.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/cmds.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/cmds.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $timeout = 20;
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+    TraceLog => $log_file,
+    Trace => 'DEFAULT:10',
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    RootRevoke => 'off',
+    TimeoutIdle => '30',
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  my $vhost_addr = '127.0.0.1';
+  my $vhost_port = $port - 1;
+
+  if (open(my $fh, ">> $config_file")) {
+    print $fh <<EOC;
+<VirtualHost $vhost_addr>
+  ServerName "DefaultServer VHost"
+  Port $vhost_port
+</VirtualHost>
+EOC
+
+    unless (close($fh)) {
+      die("Can't write $config_file: $!");
+    }
+
+  } else {
+    die("Can't open $config_file: $!");
+  }
+ 
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port, 1);
+      $client->login($user, $passwd);
+
+      my $conn = $client->list_raw();
+      if ($conn) {
+        eval { $conn->close() };
+        die("LIST succeeded unexpectedly");
+      }
+
+      my $resp_code = $client->response_code();
+      my $resp_msg = $client->response_msg();
+
+      my $expected = 425;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = 'Unable to build data connection: Address already in use';
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+
+      ($resp_code, $resp_msg) = $client->quit();
+
+      $expected = 221;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = 'Goodbye.';
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh, $timeout + 1) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 1;
diff --git a/tests/t/lib/ProFTPD/Tests/Commands/STAT.pm b/tests/t/lib/ProFTPD/Tests/Commands/STAT.pm
index e85dc4a..6b3dabe 100644
--- a/tests/t/lib/ProFTPD/Tests/Commands/STAT.pm
+++ b/tests/t/lib/ProFTPD/Tests/Commands/STAT.pm
@@ -4,6 +4,7 @@ use lib qw(t/lib);
 use base qw(ProFTPD::TestSuite::Child);
 use strict;
 
+use File::Path qw(mkpath);
 use File::Spec;
 use IO::Handle;
 
@@ -20,6 +21,21 @@ my $TESTS = {
     test_class => [qw(forking)],
   },
 
+  stat_dir => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  stat_system => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
+  stat_enoent => {
+    order => ++$order,
+    test_class => [qw(forking)],
+  },
+
   stat_listoptions_bug3295 => {
     order => ++$order,
     test_class => [qw(bug forking)],
@@ -105,10 +121,133 @@ sub stat_file {
   if ($pid) {
     eval {
       my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+      $client->login($user, $passwd);
+      $client->stat('cmds.conf');
+
+      my $resp_code = $client->response_code();
+      my $resp_msgs = $client->response_msgs();
+      my $resp_msg = $resp_msgs->[1];
+
+      my $expected;
+
+      $expected = 211;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = '^(\s+)?\S+\s+\d+\s+\S+\s+\S+\s+.*?\s+(\S+)$';
+      $self->assert(qr/$expected/, $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub stat_dir {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/cmds.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/cmds.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/cmds.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/cmds.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/cmds.group");
+
+  my $test_dir = File::Spec->rel2abs("$tmpdir/test.d");
+  mkpath($test_dir);
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
 
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
       $client->login($user, $passwd);
+      $client->stat('test.d');
 
-      my ($resp_code, $resp_msg) = $client->stat('cmds.conf');
+      my $resp_code = $client->response_code();
+      my $resp_msgs = $client->response_msgs();
+      my $resp_msg = $resp_msgs->[1];
 
       my $expected;
 
@@ -153,6 +292,242 @@ sub stat_file {
   unlink($log_file);
 }
 
+sub stat_system {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/cmds.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/cmds.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/cmds.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/cmds.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/cmds.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+      $client->login($user, $passwd);
+      $client->stat();
+
+      my $resp_code = $client->response_code();
+      my $resp_msgs = $client->response_msgs();
+
+      my $expected;
+
+      $expected = 211;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub stat_enoent {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/cmds.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/cmds.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/cmds.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/cmds.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/cmds.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+      $client->login($user, $passwd);
+
+      my $enoent_file = 'foo.bar.baz.d';
+
+      eval { $client->stat($enoent_file) };
+      unless ($@) {
+        die("STAT succeeded unexpectedly");
+      }
+
+      my $resp_code = $client->response_code();
+      my $resp_msg = $client->response_msg();
+
+      my $expected;
+
+      $expected = 450;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected $expected, got $resp_code"));
+
+      $expected = "$enoent_file: No such file or directory";
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 sub stat_listoptions_bug3295 {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
@@ -225,7 +600,6 @@ sub stat_listoptions_bug3295 {
   if ($pid) {
     eval {
       my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
-
       $client->login($user, $passwd);
 
       my ($resp_code, $resp_msg) = $client->stat('cmds.conf');
diff --git a/tests/t/lib/ProFTPD/Tests/Config/Directory.pm b/tests/t/lib/ProFTPD/Tests/Config/Directory.pm
new file mode 100644
index 0000000..83c01f1
--- /dev/null
+++ b/tests/t/lib/ProFTPD/Tests/Config/Directory.pm
@@ -0,0 +1,299 @@
+package ProFTPD::Tests::Config::Directory;
+
+use lib qw(t/lib);
+use base qw(Test::Unit::TestCase ProFTPD::TestSuite::Child);
+use strict;
+
+use Data::Dumper;
+use File::Path qw(mkpath rmtree);
+use File::Spec;
+use IO::Handle;
+use Time::HiRes qw(gettimeofday tv_interval);
+
+use ProFTPD::TestSuite::FTP;
+use ProFTPD::TestSuite::Utils qw(:auth :config :running :test :testsuite);
+
+$| = 1;
+
+my $order = 0;
+
+my $TESTS = {
+  dir_wide_layout => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  # dir_deep_layout
+  # dir_wide_deep_layout
+  #
+  # I suspect that, due to the nature of the parser, the order in which
+  # the <Directory> sections appear in the config can affect performance.
+  # If the _last_ <Directory> section is for the most common path referenced,
+  # it could mean longer traversal times (for each lookup) before the
+  # match is made.
+};
+
+sub new {
+  return shift()->SUPER::new(@_);
+}
+
+sub list_tests {
+  return testsuite_get_runnable_tests($TESTS);
+}
+
+sub set_up {
+  my $self = shift;
+  $self->{tmpdir} = testsuite_get_tmp_dir();
+
+  # Create temporary scratch dir
+  eval { mkpath($self->{tmpdir}) };
+  if ($@) {
+    my $abs_path = File::Spec->rel2abs($self->{tmpdir});
+    die("Can't create dir $abs_path: $@");
+  }
+}
+
+sub tear_down {
+  my $self = shift;
+
+  # Remove temporary scratch dir
+  if ($self->{tmpdir}) {
+    eval { rmtree($self->{tmpdir}) };
+  }
+
+  undef $self;
+}
+
+my ($prev_name, $prev_namelen);
+
+sub get_name {
+  my $name_len = shift;
+  my $inc = shift;
+
+  # If the requested name length has changed, start over
+  if ($name_len != $prev_namelen) {
+    $prev_name = undef;
+  }
+
+  if (defined($prev_name)) {
+    # Split the name into its individual chars, in reverse order
+    my @chars = reverse(split('', $prev_name));
+
+    # Increment the first char, then reassemble the name.  We only want
+    # ASCII characters (i.e. A-Za-z inclusive).  So if the incremented first
+    # char is outside the range, reset the first char to the range start, and
+    # increment the next char.
+
+    for (my $i = 0; $i < $prev_namelen; $i++) {
+      my $char = $chars[$i];
+      my $val = ord($char);
+
+      $char = chr(++$val);
+
+      my $reset_char = 0;
+      while ($char !~ /[A-Za-z]/o) {
+        ++$val;
+        if ($val > 122) {
+          # Too far; reset to 'A'.
+          $val = 65;
+          $reset_char = 1;
+        }
+
+        $char = chr($val);
+      }
+
+      $chars[$i] = $char;
+
+      unless ($reset_char) {
+        last;
+      }
+    }
+
+    $prev_name = join('', reverse(@chars));
+
+  } else {
+    $prev_name = "A" x $name_len;
+    $prev_namelen = $name_len;
+  }
+
+  return $prev_name;
+}
+
+sub dir_wide_layout {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/dir.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/dir.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/dir.scoreboard");
+
+  my $log_file = File::Spec->rel2abs('tests.log');
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/dir.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/dir.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+ 
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, 'ftpd', $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+    TraceLog => $log_file,
+    Trace => 'directory:10',
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    DefaultChdir => '~',
+
+    Directory => {
+      '/' => {
+        Umask => '066 077',
+      },
+    },
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Append our mess of many wide <Directory> sections to the config:
+  #
+  #  <Directory /path/to/a>
+  #    Umask 066 077
+  #  </Directory>
+  #
+  #  <Directory/path/to/b>
+  #    Umask 066 077
+  #  </Directory>
+
+  my $target_dir;
+
+  if (open(my $fh, ">> $config_file")) {
+    my $width = 1000;
+    my $namelen = 3;
+
+    for (my $i = 0; $i < $width; $i++) {
+      my $target_dir = get_name($namelen, 1);
+      my $dir = File::Spec->rel2abs("$tmpdir/$target_dir");
+      mkpath($dir);
+
+      print $fh <<EOD;
+<Directory ~/$target_dir>
+  Umask 066 077
+</Directory>
+EOD
+    }
+
+    unless (close($fh)) {
+      die("Can't write $config_file: $!");
+    }
+
+  } else {
+    die("Can't open $config_file: $!");
+  }
+
+  # To test the worst-case scenario, the target directory (to which we will
+  # write a file) should be the _last_ in the list.
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+      $client->login($user, $passwd);
+
+      my ($resp_code, $resp_msg);
+
+      my $start_time = [gettimeofday()];
+
+      my $conn = $client->stor_raw("$target_dir/test.txt");
+      unless ($conn) {
+        die("Failed to STOR $target_dir/test.txt: " . $client->response_code() .
+          " " . $client->response_msg());
+      }
+
+      my $elapsed = tv_interval($start_time);
+print STDERR "Elapsed: ", Dumper($elapsed);
+
+      $conn->close();
+
+      $resp_code = $client->response_code();
+      $resp_msg = $client->response_msg();
+
+      my $expected;
+
+      $expected = 226;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected '$expected', got '$resp_code'"));
+
+      $expected = "Transfer complete";
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+1;
diff --git a/tests/t/lib/ProFTPD/Tests/Config/DisplayConnect.pm b/tests/t/lib/ProFTPD/Tests/Config/DisplayConnect.pm
index c0c9769..ae9cd9f 100644
--- a/tests/t/lib/ProFTPD/Tests/Config/DisplayConnect.pm
+++ b/tests/t/lib/ProFTPD/Tests/Config/DisplayConnect.pm
@@ -648,12 +648,7 @@ sub displayconnect_multiline {
 sub displayconnect_fs_vars {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
-
-  my $config_file = "$tmpdir/config.conf";
-  my $pid_file = File::Spec->rel2abs("$tmpdir/config.pid");
-  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/config.scoreboard");
-
-  my $log_file = File::Spec->rel2abs('tests.log');
+  my $setup = test_setup($tmpdir, 'config');
 
   my $connect_file = File::Spec->rel2abs("$tmpdir/connect.txt");
 
@@ -670,10 +665,10 @@ sub displayconnect_fs_vars {
   }
 
   my $config = {
-    PidFile => $pid_file,
-    ScoreboardFile => $scoreboard_file,
-    SystemLog => $log_file,
-    TraceLog => $log_file,
+    PidFile => $setup->{pid_file},
+    ScoreboardFile => $setup->{scoreboard_file},
+    SystemLog => $setup->{log_file},
+    TraceLog => $setup->{log_file},
     Trace => 'fsio:20',
 
     DisplayConnect => $connect_file,
@@ -685,7 +680,8 @@ sub displayconnect_fs_vars {
     },
   };
 
-  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+  my ($port, $config_user, $config_group) = config_write($setup->{config_file},
+    $config);
 
   # Open pipes, for use between the parent and child processes.  Specifically,
   # the child will indicate when it's done with its test by writing a message
@@ -703,21 +699,18 @@ sub displayconnect_fs_vars {
   if ($pid) {
     eval {
       my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
-
-      my ($resp_code, $resp_msg);
-
-      $resp_code = $client->response_code();
-      $resp_msg = $client->response_msg(1);
+      my $resp_code = $client->response_code();
+      my $resp_msg = $client->response_msg(1);
 
       my $expected;
 
       $expected = 220;
       $self->assert($expected == $resp_code,
-        test_msg("Expected $expected, got $resp_code"));
+        test_msg("Expected response code $expected, got $resp_code"));
 
       $expected = 'Filesystem: (\d+) (\S+)$';
       $self->assert(qr/$expected/, $resp_msg,
-        test_msg("Expected '$expected', got '$resp_msg'"));
+        test_msg("Expected response message '$expected', got '$resp_msg'"));
     };
 
     if ($@) {
@@ -728,7 +721,7 @@ sub displayconnect_fs_vars {
     $wfh->flush();
 
   } else {
-    eval { server_wait($config_file, $rfh) };
+    eval { server_wait($setup->{config_file}, $rfh) };
     if ($@) {
       warn($@);
       exit 1;
@@ -738,15 +731,11 @@ sub displayconnect_fs_vars {
   }
 
   # Stop server
-  server_stop($pid_file);
+  server_stop($setup->{pid_file});
 
   $self->assert_child_ok($pid);
 
-  if ($ex) {
-    die($ex);
-  }
-
-  unlink($log_file);
+  test_cleanup($setup->{log_file}, $ex);
 }
 
 1;
diff --git a/tests/t/lib/ProFTPD/Tests/HTTP.pm b/tests/t/lib/ProFTPD/Tests/HTTP.pm
new file mode 100644
index 0000000..42867ac
--- /dev/null
+++ b/tests/t/lib/ProFTPD/Tests/HTTP.pm
@@ -0,0 +1,270 @@
+package ProFTPD::Tests::HTTP;
+
+use lib qw(t/lib);
+use base qw(ProFTPD::TestSuite::Child);
+use strict;
+
+use File::Spec;
+use IO::Handle;
+
+use ProFTPD::TestSuite::FTP;
+use ProFTPD::TestSuite::Utils qw(:auth :config :running :test :testsuite);
+
+$| = 1;
+
+my $order = 0;
+
+my $TESTS = {
+  http_connect => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_delete => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_get => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_head => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_options => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_patch => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_post => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+  http_put => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+};
+
+sub new {
+  return shift()->SUPER::new(@_);
+}
+
+sub list_tests {
+  # Check for the required Perl modules:
+  #
+  #  HTTP-Request
+  #  LWP-UserAgent
+
+  my $required = [qw(
+    HTTP::Request
+    LWP::UserAgent
+  )];
+
+  foreach my $req (@$required) {
+    eval "use $req";
+    if ($@) {
+      print STDERR "\nWARNING:\n + Module '$req' not found, skipping all tests\n";
+
+      if ($ENV{TEST_VERBOSE}) {
+        print STDERR "Unable to load $req: $@\n";
+      }
+
+      return qw(testsuite_empty_test);
+    }
+  }
+
+  return testsuite_get_runnable_tests($TESTS);
+}
+
+sub test_http_req {
+  my $self = shift;
+  my $tmpdir = shift;
+  my $req = shift;
+
+  my $config_file = "$tmpdir/http.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/http.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/http.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/http.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/http.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  require LWP::UserAgent;
+  require HTTP::Request;
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      sleep(1);
+
+      # To reproduce Bug#XXXX, we only need to connect to the server,
+      # then issue an HTTP request.
+
+      my $client = LWP::UserAgent->new(
+        keep_alive => 1,
+        timeout => 10,
+      );
+      $client->default_header('Host' => "127.0.0.1:$port");
+
+      my $req = HTTP::Request->new($req => "http://127.0.0.1:$port/path/to/some/file");
+      my $resp = $client->request($req);
+
+use Data::Dumper;
+print STDERR "resp: ", Dumper($resp), "\n";
+
+      if ($ENV{TEST_VERBOSE}) {
+        print STDERR "# response: ", $resp->as_string, "\n";
+      }
+
+      my $conn_count = $client->conn_cache->get_connections();
+
+      $self->assert($conn_count == 0,
+        test_msg("Expected connection cache count 0, got $conn_count"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+sub http_connect {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'CONNECT');
+}
+
+sub http_delete {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'DELETE');
+}
+
+sub http_get {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'GET');
+}
+
+sub http_head {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'HEAD');
+}
+
+sub http_options {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'OPTIONS');
+}
+
+sub http_patch {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'PATCH');
+}
+
+sub http_post {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'POST');
+}
+
+sub http_put {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+  test_http_req($self, $tmpdir, 'PUT');
+}
+
+1;
diff --git a/tests/t/lib/ProFTPD/Tests/Modules/mod_auth_file.pm b/tests/t/lib/ProFTPD/Tests/Modules/mod_auth_file.pm
index 1bc370c..4a2d296 100644
--- a/tests/t/lib/ProFTPD/Tests/Modules/mod_auth_file.pm
+++ b/tests/t/lib/ProFTPD/Tests/Modules/mod_auth_file.pm
@@ -112,6 +112,11 @@ my $TESTS = {
     test_class => [qw(bug forking)],
   },
 
+  auth_file_symlink_segfault_bug4145 => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
 };
 
 sub new {
@@ -2070,4 +2075,140 @@ EOC
   unlink($log_file);
 }
 
+sub auth_file_symlink_segfault_bug4145 {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/authfile.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/authfile.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/authfile.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $authfiles_parent_dir = File::Spec->rel2abs("$tmpdir/etc");
+  mkpath($authfiles_parent_dir);
+
+  my $authfiles_dir = File::Spec->rel2abs("$authfiles_parent_dir/proftpd");
+  mkpath($authfiles_dir);
+
+  my $auth_user_file = File::Spec->rel2abs("$authfiles_dir/authfile.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$authfiles_dir/authfile.group");
+
+  # Create symlinks using a relative path to the Auth files, to reproduce
+  # Bug#4145.
+  my $cwd = getcwd();
+  unless (chdir($authfiles_dir)) {
+    die("Can't chdir to $authfiles_dir: $!");
+  }
+
+  unless (symlink('authfile.passwd', "passwd.lnk")) {
+    die("Can't symlink '$auth_user_file' to 'passwd.lnk': $!");
+  }
+
+  unless (symlink('authfile.group', "group.lnk")) {
+    die("Can't symlink '$auth_group_file' to 'group.lnk': $!");
+  }
+
+  unless (chdir($cwd)) {
+    die("Can't chdir to $cwd: $!");
+  }
+
+  my $auth_user_symlink = File::Spec->rel2abs($authfiles_dir) . "/passwd.lnk";
+  my $auth_group_symlink = File::Spec->rel2abs($authfiles_dir) . "/group.lnk";
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir, $authfiles_parent_dir, $authfiles_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir, $authfiles_parent_dir, $authfiles_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+
+  # Test that mod_auth_file correctly deals with malformed AuthGroupFile
+  # entries (per Bug#3985).
+  auth_group_write($auth_group_file, "yarr:$group", $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_symlink,
+    AuthGroupFile => $auth_group_symlink,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+      $client->login($user, $passwd);
+      $client->quit();
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 1;
diff --git a/tests/t/lib/ProFTPD/Tests/Modules/mod_copy.pm b/tests/t/lib/ProFTPD/Tests/Modules/mod_copy.pm
index 251df45..00d8610 100644
--- a/tests/t/lib/ProFTPD/Tests/Modules/mod_copy.pm
+++ b/tests/t/lib/ProFTPD/Tests/Modules/mod_copy.pm
@@ -21,6 +21,11 @@ my $TESTS = {
     test_class => [qw(forking)],
   },
 
+  copy_file_no_login => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
   copy_dir => {
     order => ++$order,
     test_class => [qw(forking)],
@@ -86,6 +91,11 @@ my $TESTS = {
     test_class => [qw(forking)],
   },
 
+  copy_cpfr_cpto_no_login => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
   copy_cpto_no_cpfr => {
     order => ++$order,
     test_class => [qw(forking)],
@@ -263,6 +273,137 @@ sub copy_file {
   unlink($log_file);
 }
 
+sub copy_file_no_login {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/copy.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/copy.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/copy.scoreboard");
+
+  my $log_file = File::Spec->rel2abs('tests.log');
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/copy.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/copy.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $src_file = File::Spec->rel2abs("$home_dir/foo.txt");
+  if (open(my $fh, "> $src_file")) {
+    print $fh "Hello, World!\n";
+
+    unless (close($fh)) {
+      die("Can't write $src_file: $!");
+    }
+
+  } else {
+    die("Can't open $src_file: $!");
+  }
+
+  my $dst_file = File::Spec->rel2abs("$home_dir/bar.txt");
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+
+      eval { $client->site('COPY', 'foo.txt', 'bar.txt') };
+      unless ($@) { 
+        die("SITE COPY succeeded unexpectedly");
+      }
+
+      my $resp_code = $client->response_code();
+      my $resp_msg = $client->response_msg();
+
+      my $expected;
+      $expected = 530;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected response code $expected, got $resp_code"));
+
+      $expected = "Please login with USER and PASS";
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected response message '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 sub copy_dir {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
@@ -2606,6 +2747,153 @@ sub copy_cpfr_cpto {
   unlink($log_file);
 }
 
+sub copy_cpfr_cpto_no_login {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/copy.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/copy.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/copy.scoreboard");
+
+  my $log_file = File::Spec->rel2abs('tests.log');
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/copy.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/copy.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $src_file = File::Spec->rel2abs("$home_dir/foo.txt");
+  if (open(my $fh, "> $src_file")) {
+    print $fh "Hello, World!\n";
+
+    unless (close($fh)) {
+      die("Can't write $src_file: $!");
+    }
+
+  } else {
+    die("Can't open $src_file: $!");
+  }
+
+  my $dst_file = File::Spec->rel2abs("$home_dir/bar.txt");
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+ 
+      eval { $client->site('CPFR', 'foo.txt') };
+      unless ($@) {
+        die("SITE CPFR succeeded unexpectedly");
+      }
+
+      my $resp_code = $client->response_code();
+      my $resp_msg = $client->response_msg();
+
+      my $expected;
+      $expected = 530;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected response code $expected, got $resp_code"));
+
+      $expected = "Please login with USER and PASS";
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected response message '$expected', got '$resp_msg'"));
+
+      eval { $client->site('CPTO', 'bar.txt') };
+      unless ($@) {
+        die("SITE CPTO succeeded unexpectedly");
+      }
+
+      $resp_code = $client->response_code();
+      $resp_msg = $client->response_msg();
+
+      $expected = 530;
+      $self->assert($expected == $resp_code,
+        test_msg("Expected response code $expected, got $resp_code"));
+
+      $expected = "Please login with USER and PASS";
+      $self->assert($expected eq $resp_msg,
+        test_msg("Expected response message '$expected', got '$resp_msg'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 sub copy_cpto_no_cpfr {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
diff --git a/tests/t/lib/ProFTPD/Tests/Modules/mod_sftp.pm b/tests/t/lib/ProFTPD/Tests/Modules/mod_sftp.pm
index 147db24..0d605b6 100644
--- a/tests/t/lib/ProFTPD/Tests/Modules/mod_sftp.pm
+++ b/tests/t/lib/ProFTPD/Tests/Modules/mod_sftp.pm
@@ -688,6 +688,11 @@ my $TESTS = {
     test_class => [qw(forking sftp ssh2)],
   },
 
+  sftp_readlink_symlink_dir_bug4140 => {
+    order => ++$order,
+    test_class => [qw(bug forking sftp ssh2)],
+  },
+
   sftp_config_client_alive => {
     order => ++$order,
     test_class => [qw(forking sftp ssh2)],
@@ -708,6 +713,11 @@ my $TESTS = {
     test_class => [qw(forking sftp ssh2)],
   },
 
+  sftp_config_max_login_attempts_none_bug4087 => {
+    order => ++$order,
+    test_class => [qw(bug forking sftp ssh2)],
+  },
+
   sftp_config_ignore_upload_perms_upload => {
     order => ++$order,
     test_class => [qw(forking sftp ssh2)],
@@ -22906,6 +22916,170 @@ sub sftp_readlink {
   unlink($log_file);
 }
 
+sub sftp_readlink_symlink_dir_bug4140 {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/sftp.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/sftp.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/sftp.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/sftp.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/sftp.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $rsa_host_key = File::Spec->rel2abs('t/etc/modules/mod_sftp/ssh_host_rsa_key');
+  my $dsa_host_key = File::Spec->rel2abs('t/etc/modules/mod_sftp/ssh_host_dsa_key');
+
+  my $dir_name = 'test.d';
+  my $test_dir = File::Spec->rel2abs("$tmpdir/$dir_name");
+  mkpath($test_dir);
+
+  my $cwd = getcwd();
+  unless (chdir($tmpdir)) {
+    die("Can't chdir to $tmpdir: $!");
+  }
+
+  unless (symlink('test.d', 'test.lnk')) {
+    die("Can't symlink 'test.d' to 'test.lnk': $!");
+  }
+
+  unless (chdir($cwd)) {
+    die("Can't chdir to $cwd: $!");
+  }
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+    TraceLog => $log_file,
+    Trace => 'DEFAULT:10 ssh2:20 sftp:20 scp:20',
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+
+      'mod_sftp.c' => [
+        "SFTPEngine on",
+        "SFTPLog $log_file",
+        "SFTPHostKey $rsa_host_key",
+        "SFTPHostKey $dsa_host_key",
+      ],
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  require Net::SSH2;
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $ssh2 = Net::SSH2->new();
+
+      sleep(1);
+
+      unless ($ssh2->connect('127.0.0.1', $port)) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't connect to SSH2 server: [$err_name] ($err_code) $err_str");
+      }
+
+      unless ($ssh2->auth_password($user, $passwd)) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't login to SSH2 server: [$err_name] ($err_code) $err_str");
+      }
+
+      my $sftp = $ssh2->sftp();
+      unless ($sftp) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't use SFTP on SSH2 server: [$err_name] ($err_code) $err_str");
+      }
+
+      my $path = $sftp->readlink('test.lnk');
+      unless ($path) {
+        my ($err_code, $err_name) = $sftp->error();
+        die("Can't readlink test.lnk: [$err_name] ($err_code)");
+      }
+
+      $sftp = undef;
+      $ssh2->disconnect();
+
+      $self->assert($dir_name eq $path,
+        test_msg("Expected '$dir_name', got '$path'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 sub sftp_config_allowoverwrite {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
@@ -26039,6 +26213,165 @@ sub sftp_config_max_login_attempts_via_publickey {
   unlink($log_file);
 }
 
+sub sftp_config_max_login_attempts_none_bug4087 {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/sftp.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/sftp.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/sftp.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/sftp.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/sftp.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $rsa_host_key = File::Spec->rel2abs('t/etc/modules/mod_sftp/ssh_host_rsa_key');
+  my $dsa_host_key = File::Spec->rel2abs('t/etc/modules/mod_sftp/ssh_host_dsa_key');
+
+  my $rsa_priv_key = File::Spec->rel2abs('t/etc/modules/mod_sftp/test_rsa_key');
+  my $rsa_pub_key = File::Spec->rel2abs('t/etc/modules/mod_sftp/test_rsa_key.pub');
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+    TraceLog => $log_file,
+    Trace => 'DEFAULT:10 ssh2:20 sftp:20 scp:20',
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+    MaxLoginAttempts => 'none',
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+
+      'mod_sftp.c' => [
+        "SFTPEngine on",
+        "SFTPLog $log_file",
+        "SFTPHostKey $rsa_host_key",
+        "SFTPHostKey $dsa_host_key",
+      ],
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  require Net::SSH2;
+
+  my $ex;
+
+  # Ignore SIGPIPE
+  local $SIG{PIPE} = sub { };
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $ssh2 = Net::SSH2->new();
+
+      sleep(1);
+
+      unless ($ssh2->connect('127.0.0.1', $port)) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't connect to SSH2 server: [$err_name] ($err_code) $err_str");
+      }
+
+      unless ($ssh2->auth_password($user, $passwd)) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't login to SSH2 server: [$err_name] ($err_code) $err_str");
+      }
+
+      $ssh2->disconnect();
+
+      # Now connect again, try to authenticate via 'publickey', which should
+      # fail, and then again via 'password', which should succeed, since
+      # we've disabled MaxLoginAttempts using "none".
+
+      $ssh2 = Net::SSH2->new();
+      unless ($ssh2->connect('127.0.0.1', $port)) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't connect to SSH2 server: [$err_name] ($err_code) $err_str");
+      }
+
+      if ($ssh2->auth_publickey($user, $rsa_pub_key, $rsa_priv_key)) {
+        die("Publickey auth succeeded unexpectedly");
+      }
+
+      unless ($ssh2->auth_password($user, $passwd)) {
+        my ($err_code, $err_name, $err_str) = $ssh2->error();
+        die("Can't login to SSH2 server (2nd attempt): [$err_name] ($err_code) $err_str");
+      }
+
+      $ssh2->disconnect();
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 sub sftp_config_pathdenyfilter_file {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
diff --git a/tests/t/lib/ProFTPD/Tests/Modules/mod_sql_sqlite.pm b/tests/t/lib/ProFTPD/Tests/Modules/mod_sql_sqlite.pm
index 533d549..9df9279 100644
--- a/tests/t/lib/ProFTPD/Tests/Modules/mod_sql_sqlite.pm
+++ b/tests/t/lib/ProFTPD/Tests/Modules/mod_sql_sqlite.pm
@@ -387,6 +387,11 @@ my $TESTS = {
     test_class => [qw(bug forking)],
   },
 
+  sql_user_info_defaulthomedir_bug4083 => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
 };
 
 sub new {
@@ -13601,4 +13606,148 @@ EOS
   unlink($log_file);
 }
 
+sub sql_user_info_defaulthomedir_bug4083 {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/sqlite.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/sqlite.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/sqlite.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs("$tmpdir/$user");
+  mkpath($home_dir);
+  my $uid = 500;
+  my $gid = 500;
+
+  my $default_home = File::Spec->rel2abs($tmpdir) . '/%u';
+
+  my $db_file = File::Spec->rel2abs("$tmpdir/proftpd.db");
+
+  # Build up sqlite3 command to create users, groups tables and populate them
+  my $db_script = File::Spec->rel2abs("$tmpdir/proftpd.sql");
+
+  if (open(my $fh, "> $db_script")) {
+    print $fh <<EOS;
+CREATE TABLE users (
+  userid TEXT,
+  passwd TEXT,
+  uid INTEGER,
+  gid INTEGER
+);
+INSERT INTO users (userid, passwd, uid, gid) VALUES ('$user', '$passwd', $uid, $gid);
+
+EOS
+
+    unless (close($fh)) {
+      die("Can't write $db_script: $!");
+    }
+
+  } else {
+    die("Can't open $db_script: $!");
+  }
+
+  my $cmd = "sqlite3 $db_file < $db_script";
+  build_db($cmd, $db_script);
+
+  # Make sure that, if we're running as root, the database file has
+  # the permissions/privs set for use by proftpd
+  if ($< == 0) {
+    unless (chmod(0666, $db_file)) {
+      die("Can't set perms on $db_file to 0666: $!");
+    }
+  }
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+
+      'mod_sql.c' => {
+        SQLAuthenticate => 'users',
+        SQLAuthTypes => 'plaintext',
+        SQLBackend => 'sqlite3',
+        SQLConnectInfo => $db_file,
+        SQLLogFile => $log_file,
+        SQLUserInfo => 'users userid passwd uid gid Null Null',
+        SQLDefaultHomedir => $default_home,
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
+      $client->login($user, $passwd);
+
+      my $resp_msgs = $client->response_msgs();
+      my $nmsgs = scalar(@$resp_msgs);
+
+      my $expected;
+
+      $expected = 1;
+      $self->assert($expected == $nmsgs,
+        test_msg("Expected $expected, got $nmsgs")); 
+
+      $expected = "User proftpd logged in";
+      $self->assert($expected eq $resp_msgs->[0],
+        test_msg("Expected '$expected', got '$resp_msgs->[0]'"));
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 1;
diff --git a/tests/t/lib/ProFTPD/Tests/Modules/mod_wrap2_file.pm b/tests/t/lib/ProFTPD/Tests/Modules/mod_wrap2_file.pm
index 90bc2da..81a1234 100644
--- a/tests/t/lib/ProFTPD/Tests/Modules/mod_wrap2_file.pm
+++ b/tests/t/lib/ProFTPD/Tests/Modules/mod_wrap2_file.pm
@@ -7,6 +7,7 @@ use strict;
 use File::Path qw(mkpath);
 use File::Spec;
 use IO::Handle;
+use IO::Socket::INET6;
 
 use ProFTPD::TestSuite::FTP;
 use ProFTPD::TestSuite::Utils qw(:auth :config :running :test :testsuite);
@@ -76,11 +77,16 @@ my $TESTS = {
     test_class => [qw(forking)],
   },
 
-  wrap2_file_deny_table_ip_addr => {
+  wrap2_file_deny_table_ipv4_addr => {
     order => ++$order,
     test_class => [qw(forking)],
   },
 
+  wrap2_file_deny_table_ipv6_addr_bug4090 => {
+    order => ++$order,
+    test_class => [qw(bug feature_ipv6 forking)],
+  },
+
   wrap2_file_deny_table_dns_name => {
     order => ++$order,
     test_class => [qw(forking)],
@@ -1192,6 +1198,7 @@ sub wrap2_file_allow_table_keyword_local {
     AuthUserFile => $auth_user_file,
     AuthGroupFile => $auth_group_file,
     TimeoutIdle => $timeout_idle,
+    UseReverseDNS => 'on',
 
     IfModules => {
       'mod_delay.c' => {
@@ -1224,20 +1231,17 @@ sub wrap2_file_allow_table_keyword_local {
   if ($pid) {
     eval {
       my $client = ProFTPD::TestSuite::FTP->new('127.0.0.1', $port);
-
-      my ($resp_code, $resp_msg);
-
-      ($resp_code, $resp_msg) = $client->login($user, $passwd);
+      my ($resp_code, $resp_msg) = $client->login($user, $passwd);
 
       my $expected;
 
       $expected = 230;
       $self->assert($expected == $resp_code,
-        test_msg("Expected $expected, got $resp_code"));
+        test_msg("Expected response code $expected, got $resp_code"));
 
       $expected = "User $user logged in";
       $self->assert($expected eq $resp_msg,
-        test_msg("Expected '$expected', got '$resp_msg'"));
+        test_msg("Expected response message '$expected', got '$resp_msg'"));
     };
 
     if ($@) {
@@ -2139,7 +2143,7 @@ sub wrap2_file_allow_table_var_U {
   unlink($log_file);
 }
 
-sub wrap2_file_deny_table_ip_addr {
+sub wrap2_file_deny_table_ipv4_addr {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
 
@@ -2359,6 +2363,264 @@ sub wrap2_file_deny_table_ip_addr {
   unlink($log_file);
 }
 
+sub wrap2_file_deny_table_ipv6_addr_bug4090 {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/wrap2.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/wrap2.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/wrap2.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/wrap2.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/wrap2.group");
+
+  my $fh;
+  my $allow_file = File::Spec->rel2abs("$tmpdir/wrap2.allow");
+  if (open($fh, "> $allow_file")) {
+    unless (close($fh)) {
+      die("Can't write $allow_file: $!");
+    }
+
+  } else {
+    die("Can't open $allow_file: $!");
+  }
+
+  my $deny_file = File::Spec->rel2abs("$tmpdir/wrap2.deny");
+  if (open($fh, "> $deny_file")) {
+    print $fh "ALL: ALL\n";
+
+    unless (close($fh)) {
+      die("Can't write $deny_file: $!");
+    }
+
+  } else {
+    die("Can't open $deny_file: $!");
+  }
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+    DefaultAddress => '::1',
+    UseIPv6 => 'on',
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+
+      'mod_wrap2.c' => {
+        WrapEngine => 'on',
+        WrapTables => "file:$allow_file file:$deny_file",
+        WrapLog => $log_file,
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      sleep(2);
+
+      my $client = IO::Socket::INET6->new(
+        PeerAddr => '::1',
+        PeerPort => $port,
+        Proto => 'tcp',
+        Timeout => 5,
+      );
+      unless ($client) {
+        die("Can't connect to ::1: $!");
+      }
+
+      # Read the banner
+      my $banner = <$client>;
+
+      # Send the USER command
+      my $cmd = "USER $user\r\n";
+      $client->print($cmd);
+      $client->flush();
+
+      # Read USER response
+      my $resp = <$client>;
+
+      my $expected = "331 Password required for $user\r\n";
+      $self->assert($expected eq $resp,
+        test_msg("Expected '$expected', got '$resp'"));
+
+      # Send the PASS command
+      $cmd = "PASS $passwd\r\n";
+      $client->print($cmd);
+      $client->flush();
+
+      # Read PASS response
+      $resp = <$client>;
+
+      $expected = "530 Access denied\r\n";
+      $self->assert($expected eq $resp,
+        test_msg("Expected response '$expected', got '$resp'"));
+
+      $client->close();
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    die($ex);
+  }
+
+  if (open($fh, "> $deny_file")) {
+    print $fh "ALL: [::1]\n";
+    unless (close($fh)) {
+      die("Can't write $deny_file: $!");
+    }
+
+  } else {
+    die("Can't open $deny_file: $!");
+  }
+
+  ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Fork child
+  $self->handle_sigchld();
+  defined($pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      sleep(2);
+
+      my $client = IO::Socket::INET6->new(
+        PeerAddr => '::1',
+        PeerPort => $port,
+        Proto => 'tcp',
+        Timeout => 5,
+      );
+      unless ($client) {
+        die("Can't connect to ::1: $!");
+      }
+
+      # Read the banner
+      my $banner = <$client>;
+
+      # Send the USER command
+      my $cmd = "USER $user\r\n";
+      $client->print($cmd);
+      $client->flush();
+
+      # Read USER response
+      my $resp = <$client>;
+
+      my $expected = "331 Password required for $user\r\n";
+      $self->assert($expected eq $resp,
+        test_msg("Expected '$expected', got '$resp'"));
+
+      # Send the PASS command
+      $cmd = "PASS $passwd\r\n";
+      $client->print($cmd);
+      $client->flush();
+
+      # Read PASS response
+      $resp = <$client>;
+
+      $expected = "530 Access denied\r\n";
+      $self->assert($expected eq $resp,
+        test_msg("Expected response '$expected', got '$resp'"));
+
+      $client->close();
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
 sub wrap2_file_deny_table_dns_name {
   my $self = shift;
   my $tmpdir = $self->{tmpdir};
@@ -3693,11 +3955,11 @@ sub wrap2_file_syntax {
 
       $expected = 530;
       $self->assert($expected == $resp_code,
-        test_msg("Expected $expected, got $resp_code"));
+        test_msg("Expected response code $expected, got $resp_code"));
 
       $expected = "Access denied";
       $self->assert($expected eq $resp_msg,
-        test_msg("Expected '$expected', got '$resp_msg'"));
+        test_msg("Expected response message '$expected', got '$resp_msg'"));
     };
 
     if ($@) {
diff --git a/tests/t/lib/ProFTPD/Tests/SMTP.pm b/tests/t/lib/ProFTPD/Tests/SMTP.pm
new file mode 100644
index 0000000..732aef9
--- /dev/null
+++ b/tests/t/lib/ProFTPD/Tests/SMTP.pm
@@ -0,0 +1,173 @@
+package ProFTPD::Tests::SMTP;
+
+use lib qw(t/lib);
+use base qw(ProFTPD::TestSuite::Child);
+use strict;
+
+use File::Spec;
+use IO::Handle;
+
+use ProFTPD::TestSuite::FTP;
+use ProFTPD::TestSuite::Utils qw(:auth :config :running :test :testsuite);
+
+$| = 1;
+
+my $order = 0;
+
+my $TESTS = {
+  smtp_session => {
+    order => ++$order,
+    test_class => [qw(bug forking)],
+  },
+
+};
+
+sub new {
+  return shift()->SUPER::new(@_);
+}
+
+sub list_tests {
+  # Check for the required Perl modules:
+  #
+  #  Net-SMTP
+
+  my $required = [qw(
+    Net::SMTP
+  )];
+
+  foreach my $req (@$required) {
+    eval "use $req";
+    if ($@) {
+      print STDERR "\nWARNING:\n + Module '$req' not found, skipping all tests\n";
+
+      if ($ENV{TEST_VERBOSE}) {
+        print STDERR "Unable to load $req: $@\n";
+      }
+
+      return qw(testsuite_empty_test);
+    }
+  }
+
+  return testsuite_get_runnable_tests($TESTS);
+}
+
+sub smtp_session {
+  my $self = shift;
+  my $tmpdir = $self->{tmpdir};
+
+  my $config_file = "$tmpdir/smtp.conf";
+  my $pid_file = File::Spec->rel2abs("$tmpdir/smtp.pid");
+  my $scoreboard_file = File::Spec->rel2abs("$tmpdir/smtp.scoreboard");
+
+  my $log_file = test_get_logfile();
+
+  my $auth_user_file = File::Spec->rel2abs("$tmpdir/smtp.passwd");
+  my $auth_group_file = File::Spec->rel2abs("$tmpdir/smtp.group");
+
+  my $user = 'proftpd';
+  my $passwd = 'test';
+  my $group = 'ftpd';
+  my $home_dir = File::Spec->rel2abs($tmpdir);
+  my $uid = 500;
+  my $gid = 500;
+
+  # Make sure that, if we're running as root, that the home directory has
+  # permissions/privs set for the account we create
+  if ($< == 0) {
+    unless (chmod(0755, $home_dir)) {
+      die("Can't set perms on $home_dir to 0755: $!");
+    }
+
+    unless (chown($uid, $gid, $home_dir)) {
+      die("Can't set owner of $home_dir to $uid/$gid: $!");
+    }
+  }
+
+  auth_user_write($auth_user_file, $user, $passwd, $uid, $gid, $home_dir,
+    '/bin/bash');
+  auth_group_write($auth_group_file, $group, $gid, $user);
+
+  my $config = {
+    PidFile => $pid_file,
+    ScoreboardFile => $scoreboard_file,
+    SystemLog => $log_file,
+
+    AuthUserFile => $auth_user_file,
+    AuthGroupFile => $auth_group_file,
+
+    IfModules => {
+      'mod_delay.c' => {
+        DelayEngine => 'off',
+      },
+    },
+  };
+
+  my ($port, $config_user, $config_group) = config_write($config_file, $config);
+
+  # Open pipes, for use between the parent and child processes.  Specifically,
+  # the child will indicate when it's done with its test by writing a message
+  # to the parent.
+  my ($rfh, $wfh);
+  unless (pipe($rfh, $wfh)) {
+    die("Can't open pipe: $!");
+  }
+
+  require Net::SMTP;
+
+  my $ex;
+
+  # Fork child
+  $self->handle_sigchld();
+  defined(my $pid = fork()) or die("Can't fork: $!");
+  if ($pid) {
+    eval {
+      sleep(1);
+
+      # To reproduce Bug#XXXX, we only need to connect to the server,
+      # then issue an SMTP command.
+
+      my $client = Net::SMTP->new('127.0.0.1',
+        Port => $port,
+        Timeout => 10,
+        Debug => $ENV{TEST_VERBOSE},
+      );
+
+      if ($client) {
+        die("Unexpectedly succeeded in connecting to SMTP server at 127.0.0.1:$port");
+      }
+
+    };
+
+    if ($@) {
+      $ex = $@;
+    }
+
+    $wfh->print("done\n");
+    $wfh->flush();
+
+  } else {
+    eval { server_wait($config_file, $rfh) };
+    if ($@) {
+      warn($@);
+      exit 1;
+    }
+
+    exit 0;
+  }
+
+  # Stop server
+  server_stop($pid_file);
+
+  $self->assert_child_ok($pid);
+
+  if ($ex) {
+    test_append_logfile($log_file, $ex);
+    unlink($log_file);
+
+    die($ex);
+  }
+
+  unlink($log_file);
+}
+
+1;
diff --git a/tests/t/smtp.t b/tests/t/smtp.t
new file mode 100644
index 0000000..33bf652
--- /dev/null
+++ b/tests/t/smtp.t
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+
+use lib qw(t/lib);
+use strict;
+
+use Test::Unit::HarnessUnit;
+
+$| = 1;
+
+my $r = Test::Unit::HarnessUnit->new();
+$r->start("ProFTPD::Tests::SMTP");
diff --git a/utils/Makefile.in b/utils/Makefile.in
index d5defd8..527277f 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -27,36 +27,3 @@ clean:
 depend:
 	makedepend $(CPPFLAGS) -Y *.c 2>/dev/null
 	makedepend $(CPPFLAGS) -Y -fMakefile.in *.c 2>/dev/null
-# DO NOT DELETE
-
-ftpcount.o: utils.h ../config.h ../include/version.h ../include/options.h
-ftpcount.o: ../include/ascii.h ../include/default_paths.h
-ftpscrub.o: utils.h ../config.h ../include/version.h ../include/options.h
-ftpscrub.o: ../include/ascii.h ../include/default_paths.h
-ftpshut.o: ../include/conf.h ../include/version.h ../config.h
-ftpshut.o: ../include/default_paths.h ../include/options.h ../include/pool.h
-ftpshut.o: ../include/str.h ../include/ascii.h ../include/table.h
-ftpshut.o: ../include/proftpd.h ../include/class.h ../include/netacl.h
-ftpshut.o: ../include/support.h ../include/sets.h ../include/dirtree.h
-ftpshut.o: ../include/expr.h ../include/rlimit.h ../include/filter.h
-ftpshut.o: ../include/modules.h ../include/netio.h ../include/regexp.h
-ftpshut.o: ../include/stash.h ../include/auth.h ../include/response.h
-ftpshut.o: ../include/timers.h ../include/inet.h ../include/child.h
-ftpshut.o: ../include/netaddr.h ../include/cmd.h ../include/bindings.h
-ftpshut.o: ../include/help.h ../include/feat.h ../include/ftp.h
-ftpshut.o: ../include/log.h ../include/parser.h ../include/xferlog.h
-ftpshut.o: ../include/scoreboard.h ../include/data.h ../include/display.h
-ftpshut.o: ../include/libsupp.h ../include/glibc-glob.h ../include/fsio.h
-ftpshut.o: ../include/mkhome.h ../include/ctrls.h ../include/session.h
-ftpshut.o: ../include/event.h ../include/var.h ../include/throttle.h
-ftpshut.o: ../include/trace.h ../include/encode.h ../include/compat.h
-ftpshut.o: ../include/proctitle.h ../include/pidfile.h ../include/env.h
-ftpshut.o: ../include/pr-syslog.h ../include/memcache.h ../include/tpl.h
-ftptop.o: utils.h ../config.h ../include/version.h ../include/options.h
-ftptop.o: ../include/ascii.h ../include/default_paths.h
-ftpwho.o: utils.h ../config.h ../include/version.h ../include/options.h
-ftpwho.o: ../include/ascii.h ../include/default_paths.h
-misc.o: utils.h ../config.h ../include/version.h ../include/options.h
-misc.o: ../include/ascii.h ../include/default_paths.h
-scoreboard.o: utils.h ../config.h ../include/version.h ../include/options.h
-scoreboard.o: ../include/ascii.h ../include/default_paths.h
diff --git a/utils/ftpcount.1 b/utils/ftpcount.1
deleted file mode 100644
index ebfbfad..0000000
--- a/utils/ftpcount.1
+++ /dev/null
@@ -1,59 +0,0 @@
-.TH ftpcount 1 "March 2003"
-.\" Process with
-.\" groff -man -Tascii ftpcount.1 
-.\"
-.SH NAME
-ftpcount \- show current number of connections for each proftpd server
-configuration
-.SH SYNOPSIS
-.B ftpcount
-.SH DESCRIPTION
-The
-.BI ftpcount
-command shows the current number of connections per server and
-virtualhost/anonymous configuration defined in the proftpd.conf file.
-Connections spawned by inetd are counted separately from those created
-by a master proftpd
-.I standalone
-server.
-.SH OPTIONS
-.TP 12
-.B \-h,\--help
-Display a short usage description, including all available options.
-.TP
-.BI \-f,\--file " scoreboard\-file"
-Specify the full path to proftpd's run\-time scoreboard file (configured
-via the \fBScoreboardFile\fP directive in
-.I proftpd.conf
-).  If proftpd's
-default directory has been changed via this directive, \fBftpcount\fP
-must either be recompiled or this option must be used in order to find
-proftpd's scoreboard.
-.TP
-.BI \-S,\--server " server\-name"
-Specify the ServerName for a specific virtual host.  If used,
-.I ftpcount
-will only show the session count for the given virtual host.
-.SH FILES
-.PD 0
-.B /usr/local/bin/ftpcount
-.br
-.B /usr/local/var/proftpd.scoreboard
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR inetd(8), ftp(1), proftpd(8), ftpwho(1), ftptop(1), ftpshut(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/utils/ftpcount.c b/utils/ftpcount.c
index 23d0ed8..12eb9dd 100644
--- a/utils/ftpcount.c
+++ b/utils/ftpcount.c
@@ -26,7 +26,7 @@
 
 /* Shows a count of "who" is online via proftpd.  Uses the scoreboard file.
  *
- * $Id: ftpcount.c,v 1.21 2011/05/23 20:46:20 castaglia Exp $
+ * $Id: ftpcount.c,v 1.21 2011-05-23 20:46:20 castaglia Exp $
  */
 
 #include "utils.h"
diff --git a/utils/ftpscrub.8 b/utils/ftpscrub.8
deleted file mode 100644
index caf5daf..0000000
--- a/utils/ftpscrub.8
+++ /dev/null
@@ -1,55 +0,0 @@
-.TH ftpscrub 8 "November 2008"
-.\" Process with
-.\" groff -man -Tascii ftpscrub.8 
-.\"
-.SH NAME
-ftpscrub \- scrub the proftpd scoreboard file of stale entries
-.SH SYNOPSIS
-.B ftpscrub
-.SH DESCRIPTION
-The
-.BI ftpscrub
-command provides a way to scrub the scoreboard file on demand, at times
-which suit the site best.  This should be run periodically on sites
-which run proftpd in
-.I inetd
-mode.
-.SH OPTIONS
-.TP 12
-.B \-h,\--help
-Display a short usage description, including all available options.
-.TP
-.BI \-f,\--file " scoreboard\-file"
-Specify the full path to proftpd's run\-time scoreboard file (configured
-via the \fBScoreboardFile\fP directive in
-.I proftpd.conf
-).  If proftpd's
-default directory has been changed via this directive, \fBftpscrub\fP
-must either be recompiled, or this option must be used in order to find
-proftpd's scoreboard.
-.TP
-.B \-v,\--verbose
-Reports additional information while scrubbing the scoreboard.
-.SH FILES
-.PD 0
-.B /usr/local/sbin/ftpscrub
-.br
-.B /usr/local/var/proftpd.scoreboard
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR inetd(8), ftp(1), proftpd(8), ftpwho(1), ftpcount(1)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/utils/ftpscrub.c b/utils/ftpscrub.c
index ded0609..0ffac6f 100644
--- a/utils/ftpscrub.c
+++ b/utils/ftpscrub.c
@@ -23,7 +23,7 @@
  */
 
 /* "Scrubs" the scoreboard file, clearing it of old/stale entries.
- * $Id: ftpscrub.c,v 1.3 2011/05/23 20:46:20 castaglia Exp $
+ * $Id: ftpscrub.c,v 1.3 2011-05-23 20:46:20 castaglia Exp $
  */
 
 #include "utils.h"
diff --git a/utils/ftpshut.8 b/utils/ftpshut.8
deleted file mode 100644
index d681999..0000000
--- a/utils/ftpshut.8
+++ /dev/null
@@ -1,130 +0,0 @@
-.TH ftpshut 8 "March 2003"
-.\" Process with
-.\" groff -man -Tascii ftpshut.8 
-.\"
-.SH NAME
-ftpshut \- shut down all proftpd servers at a given time
-.SH SYNOPSIS
-.B ftpshut
-[
-.BI \-R
-] [
-.BI \-l " min "
-] [
-.BI \-d " min " 
-]
-.I time
-[
-.I "warning-message "
-]
-.SH DESCRIPTION
-The
-.BI ftpshut
-command provides an automated shutdown procedure that a superuser
-can use to automagically disconnect current proftpd connections,
-and deny new connections.  The command creates a control file as
-.B /etc/shutmsg
-to inform proftpd processes about an impending shutdown.
-.SH OPTIONS
-.TP 10
-.B time
-The time at which the ftp servers will be brought down.  It may be the
-word `now', indicating an immediate shutdown, or a future time in one
-of two formats:
-.I +number 
-or
-.I HHMM.  
-The first form brings the servers down in
-.I number
-minutes, while the second form indicates an exact time of day, using
-a 24-hour clock format.
-.TP
-.B -R
-Instructs ftpshut to
-.I remove
-the /etc/shutmsg file, restoring proftpd to its normal service.  If this option
-is used, this will be the only operation performed by
-.I ftpshut
-.
-.TP
-.B -l min
-Specifies the number of minutes before shutdown that new ftp access will
-be disabled.  If the -l option is not specified, a default of 10 minutes
-(or immediately, if less than 10 minutes remains until shutdown) is used.
-.TP
-.B -d min
-Specifies the number of minutes before shutdown that existing ftp
-connections will be disconnected.  If the -d option is not specified,
-a default of 5 minutes (or immediately, if less than 5 minutes remains
-until shutdown) is used.
-.TP
-.B warning-message
-Optionally provide a message which will be sent to new connections
-(if denied) and existing connections (when disconnected).  The message
-can contain the following magic cookies, which will be replaced as
-follows before being sent to new or existing connections:
-.RS
-.PD 1
-.TP 4
-.B %s
-time proftpd is being shut down
-.PD 0
-.TP
-.B %r
-time new connections will be denied
-.TP
-.B %d
-time current connections will be dropped
-.TP
-.B %C
-current working directory (where applicable)
-.TP
-.B %L
-local host name (or virtualhost name)
-.TP
-.B %R
-remote host name
-.TP
-.B %T
-local time (format Thu Nov 15 17:12:42 1990)
-.TP
-.B %U
-username given at login time
-.PD 1
-.SH CAVEATS
-Proftpd servers can only be shutdown via ftpshut if a master daemon
-is running in
-.I standalone 
-mode.  Servers running in
-.I inetd 
-mode will honor the shutdown message file created by ftpshut, however
-currently running servers may be chroot(2)ed, and unable to read
-the shutdown message control file.
-.PP
-It is possible to set an absolute shutdown time which is 
-.B earlier 
-than the current time.  If this is the case, proftpd will not shutdown
-until the indicated time on the following day.
-.SH FILES
-.PD 0
-.B /usr/local/sbin/ftpshut
-.br
-.B /etc/shutmsg
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR inetd(8), ftp(1), proftpd(8), ftpwho(1), ftpcount(1)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/utils/ftpshut.c b/utils/ftpshut.c
index e26d474..546448e 100644
--- a/utils/ftpshut.c
+++ b/utils/ftpshut.c
@@ -26,7 +26,7 @@
 /* Simple utility to create the proftpd shutdown message file, allowing
  * an admin to configure the shutdown, deny, disconnect times and messages.
  *
- * $Id: ftpshut.c,v 1.10 2013/02/15 22:39:01 castaglia Exp $
+ * $Id: ftpshut.c,v 1.10 2013-02-15 22:39:01 castaglia Exp $
  */
 
 #include "conf.h"
diff --git a/utils/ftptop.1 b/utils/ftptop.1
deleted file mode 100644
index b4253a5..0000000
--- a/utils/ftptop.1
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH ftptop 1 "March 2003"
-.\" Process with
-.\" groff -man -Tascii ftptop.1 
-.\"
-.SH NAME
-ftptop \- display running status on proftpd server connections
-.SH SYNOPSIS
-.B ftptop
-.SH DESCRIPTION
-The
-.BI ftptop
-command displays the current status of FTP sessions in a continuously updating
-.I top
-like format.
-.SH OPTIONS
-.TP 12
-.B \-A
-Filter the display to show sessions that are authenticating.
-.TP
-.B \-a
-Filter the display to hide sessions that are authenticating.
-.TP
-.B \-D
-Filter the display to show sessions that are downloading.
-.TP
-.B \-S
-Specify the ServerName for a specific virtual host.  If used,
-.I ftptop
-will only show sessions for the given virtual host.
-.TP
-.B \-d
-Specify the delay, in seconds, between display refreshes.  The default is 2
-seconds.  Only values between 0 and 15 seconds are accepted.
-.TP
-.BI \-f
-Specify the full path to proftpd's run\-time scoreboard file (configured
-via the \fBScoreboardFile\fP directive in proftpd.conf).  If proftpd's
-default directory has been changed via this directive, \fIftptop\fP
-must either be recompiled or this option must be used in order to find
-proftpd's scoreboard.
-.B \-h
-Display a short usage description, including all available options.
-.TP
-.B \-I
-Filter the display to show sessions that are idle.
-.TP
-.B \-i
-Filter the display to hide sessions that are idle.
-.TP
-.B \-U
-Filter the display to show sessions that are uploading.
-.TP
-.B \-V
-Print out the version of
-.I ftptop
-and quit.
-.PP
-While
-.I ftptop
-is running, hit the 'q' key to quit.  The 't' key toggles between display
-modes.  Currently there are two display modes:
-.B normal
-and
-.B transfer speed
-modes.
-.SH FILES
-.PD 0
-.B /usr/local/bin/ftptop
-.br
-.B /usr/local/var/proftpd.scoreboard
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR inetd(8), ftp(1), proftpd(8), ftpwho(1), ftptop(1), ftpshut(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/utils/ftptop.c b/utils/ftptop.c
index 3f652cb..b8f773a 100644
--- a/utils/ftptop.c
+++ b/utils/ftptop.c
@@ -26,7 +26,7 @@
 /* Shows who is online via proftpd, in a manner similar to top.  Uses the
  * scoreboard files.
  *
- * $Id: ftptop.c,v 1.45 2013/03/08 16:25:27 castaglia Exp $
+ * $Id: ftptop.c,v 1.45 2013-03-08 16:25:27 castaglia Exp $
  */
 
 #define FTPTOP_VERSION "ftptop/0.9"
diff --git a/utils/ftpwho.1 b/utils/ftpwho.1
deleted file mode 100644
index 795ae54..0000000
--- a/utils/ftpwho.1
+++ /dev/null
@@ -1,67 +0,0 @@
-.TH ftpwho 1 "March 2003"
-.\" Process with
-.\" groff -man -Tascii ftpwho.1 
-.\"
-.SH NAME
-ftpwho \- show current process information for each FTP session
-.SH SYNOPSIS
-.B ftpwho
-.SH DESCRIPTION
-The
-.BI ftpwho
-command shows process information for all active proftpd connections,
-and a count of all connected users off of each server.  Proftpd sesssions
-spawned from inetd are counted separately from those created by a
-master proftpd
-.I standalone
-server.
-.SH OPTIONS
-.TP 12
-.B \-h,\--help
-Display a short usage description, including all available options.
-.TP
-.BI \-f,\--file " scoreboard\-file"
-Specify the full path to proftpd's run\-time scoreboard file (configured
-via the \fBScoreboardFile\fP directive in
-.I proftpd.conf
-).  If proftpd's
-default directory has been changed via this directive, \fBftpwho\fP
-must either be recompiled, or this option must be used in order to find
-proftpd's scoreboard.
-.TP
-.BI \-o,\--outform " format"
-Specify an output format.  Currently, two "formats" are supported: \fBcompat\fP
-and \fBoneline\fP.  The \fBcompat\fP format is used for backward compatibility.
-The \fBoneline\fP format causes all of the fields for a session to be displayed
-on a single line, for ease of line-based searches (e.g. grep).
-.TP
-.B \-v,\--verbose
-Reports additional information for each connection, such as the remote
-host and current working directory.
-.BI \-S,\--server " server\-name"
-Specify the ServerName for a specific virtual host.  If used,
-.I ftpwho
-will only show session information for the given virtual host.
-.SH FILES
-.PD 0
-.B /usr/local/bin/ftpwho
-.br
-.B /usr/local/var/proftpd.scoreboard
-.PD
-.SH AUTHORS
-.PP
-ProFTPD is written and maintained by a number of people, full credits
-can be found on
-.BR http://www.proftpd.org/credits.html
-.PD
-.SH SEE ALSO
-.BR inetd(8), ftp(1), proftpd(8), ftpcount(1), ftptop(1), ftpshut(8)
-.PP
-Full documentation on ProFTPD, including configuration and FAQs, is available at
-.BR http://www.proftpd.org/
-.PP 
-For help/support, try the ProFTPD mailing lists, detailed on
-.BR http://www.proftpd.org/lists.html
-.PP
-Report bugs at
-.BR http://bugs.proftpd.org/
diff --git a/utils/ftpwho.c b/utils/ftpwho.c
index fe25513..abb164c 100644
--- a/utils/ftpwho.c
+++ b/utils/ftpwho.c
@@ -26,7 +26,7 @@
 
 /* Shows a count of "who" is online via proftpd.  Uses the scoreboard file.
  *
- * $Id: ftpwho.c,v 1.31 2011/11/16 22:30:09 castaglia Exp $
+ * $Id: ftpwho.c,v 1.31 2011-11-16 22:30:09 castaglia Exp $
  */
 
 #include "utils.h"
diff --git a/utils/misc.c b/utils/misc.c
index ec1c059..ae2d538 100644
--- a/utils/misc.c
+++ b/utils/misc.c
@@ -25,7 +25,7 @@
 
 /* Utility module linked to utilities to provide functions normally
  * present in full src tree.
- * $Id: misc.c,v 1.11 2013/02/15 22:39:01 castaglia Exp $
+ * $Id: misc.c,v 1.11 2013-02-15 22:39:01 castaglia Exp $
  */
 
 #include "utils.h"
diff --git a/utils/scoreboard.c b/utils/scoreboard.c
index 703795b..eb38350 100644
--- a/utils/scoreboard.c
+++ b/utils/scoreboard.c
@@ -23,7 +23,7 @@
  */
 
 /* ProFTPD scoreboard support (modified for use by external utilities).
- * $Id: scoreboard.c,v 1.17 2011/05/23 20:46:20 castaglia Exp $
+ * $Id: scoreboard.c,v 1.17 2011-05-23 20:46:20 castaglia Exp $
  */
 
 #include "utils.h"
diff --git a/utils/utils.h b/utils/utils.h
index 973c886..ef8dab8 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -26,7 +26,7 @@
 
 /* Scoreboard routines.
  *
- * $Id: utils.h,v 1.29 2013/02/15 22:33:23 castaglia Exp $
+ * $Id: utils.h,v 1.29 2013-02-15 22:33:23 castaglia Exp $
  */
 
 #ifndef UTILS_UTILS_H

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



More information about the Pkg-proftpd-maintainers mailing list